Giter VIP home page Giter VIP logo

lms-frontend's Introduction

Library Management System ๐Ÿ“š

Introduction

The Library Management System is a comprehensive solution for managing a library's various operations, built with React, TypeScript, Tailwind, Redux, and Vite.js. It is designed to simplify the process of borrowing, returning, loaning of books, making/canceling reservations, managing books, with RBAC.

Features

  • User Interface: Sleek and modern UI built with Tailwind.
  • Borrowing and Returning: Easy process for users to borrow and return books.
  • Loaning of Books: Simplified loaning mechanism for authorized users.
  • Making/Canceling Reservations: Handle reservations for popular books.
  • CRUD Books: Complete control over book creation, retrieval, update, and deletion.
  • Manage Users and Roles: Robust User Management and Role-Based Access Control.

Getting Started

Below are the instructions to get the project up and running on your local machine.

Prerequisites

curl -fsSL https://bun.sh/install | bash

Installation

  1. Clone the Repository:

    git clone https://github.com/ForAeons/lms-frontend-v2.git
  2. Navigate to the Project Directory:

    cd lms-frontend-v2
  3. Install Dependencies:

    bun i
  4. Start the Development Server:

    bun dev

The application should now be running at http://localhost:5173/.

Setting Up Development Environment

  • Make a copy of the .env.example file and rename it to .env.development.

  • Make necessary changes to the .env.development file.

  • Install ESLint and Prettier extensions for your code editor.

  • Optional: Install Go if you haven't already. You can download it from here.

  • Optional: Install Captain Githook (for running pre-commit/pre-push hooks):

    go install github.com/swellaby/captain-githook@latest
    captain-githook init

Making Changes to Production

Note: You only need to do this if you are serving the frontend from the Go backend as static files, which is the default behavior.

  1. Build the Project:

    bun run build
  2. Copy the Build Files to the Backend:

    cp -r dist/* ../lms-backend/frontend/ # Assuming you are in the lms-frontend-v2 directory and the backend is in the parent directory
  3. Commit and Push the Changes in the Backend

License

This project is licensed under the MIT License - see the LICENSE file for details.

lms-frontend's People

Contributors

wxiaoyun avatar

Watchers

 avatar

lms-frontend's Issues

feat(book): Google API

  "imageLinks": {
   "smallThumbnail": "https://books.google.com/books?id=zyTCAlFPjgYC&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api",
   "thumbnail": "https://books.google.com/books?id=zyTCAlFPjgYC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api",
   "small": "https://books.google.com/books?id=zyTCAlFPjgYC&printsec=frontcover&img=1&zoom=2&edge=curl&source=gbs_api",
   "medium": "https://books.google.com/books?id=zyTCAlFPjgYC&printsec=frontcover&img=1&zoom=3&edge=curl&source=gbs_api",
   "large": "https://books.google.com/books?id=zyTCAlFPjgYC&printsec=frontcover&img=1&zoom=4&edge=curl&source=gbs_api",
   "extraLarge": "https://books.google.com/books?id=zyTCAlFPjgYC&printsec=frontcover&img=1&zoom=6&edge=curl&source=gbs_api"
  },

feat(home-page): improve home page

  • Add notifications regarding loans, reservations, fines, books on login
  • Notify if loans is overdue/close to overdue
  • Notify if reservations is overdue/close to overdue
  • Notify if there are outstanding fines
  • Notify if any bookmarked books are now available
  • Render

feat(app): rbac

  • Manage user page - edit user roles
  • Render UI based on level of access of the current user
  • sign up page

feat(app): Localisation

Localisation support

  • Option to switch language
  • English messages
  • Khmer messages
  • Replace text with FormatText component

feat(user/person): CRUD

CRUD User Person

  • Create User / Person
  • Search User / Person
  • List User / Person
  • Update User / Person
  • Delete User / Person

feat(admin): manage book copies

  • Remove book/book_id page, remove link btn to these pages
  • Add manage/book/book_id page
    • Render book card at the top
    • list book copies in tabs by state (loaned, reserved, etc)
    • show id of each copies, the latest person that acted on it and display the corresponding actionable buttons (return/renew for loaned copies, cancellation for reservations)

feat(book): upload and render book thumbnail

Edit book card

  • if canEditBook, book thumbnail should show edit button on hover which allows user to upload a thumbnail
  • book thumbnail should try to display thumbnail if available

feat(QR-Code): Loan/Return books with qr code

  • QR code scanner helper function
    • takes in a zod schema for qr code parsing
    • onSuccess handler, onError handler
    • returns the parsed item
  • Implementation: on success
    • use the info from scanned qr code to optimistically update fetching the book copy
    // Optimistically update to the new value
    queryClient.setQueryData(['todos'], (old) => [...old, newTodo])
  • Generic Scanner page:

    • Takes in a onSubmit func that will be called
    • Takes in a qrcode scanner
    • Have local state to check whether user wish to receive confirmation
    • Option 1: manual key in book copy id, autocomplete command, on select triggers the confirmation dialog
    • Option 2: gigantic camera icon, click to turn on camera to detect qrcode
    • On scan success/key in book copy id, show confirmation dialog that renders the details of the book
  • Scan QR code to loan book (all logged in user)

    • A page that allows librarians to manually key in bookcopy id to loan book or
    • Turns on the camera and scans only qr that matches the expected format, then loans the book on detection. (2 modes, ask for confirmation/disable confirmation)
  • Scan QR code to return book (librarian only)

    • A page that allows librarians to manually key in bookcopy id to return book or
    • Turns on the camera and scans only qr that matches the expected format, then returns the book on detection. (2 modes, ask for confirmation/disable confirmation)
  • Search ISBN code to auto populated create book info

  • Disallow loaning from catalogue and my reservation page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.