This project is a Library Management System built using the MVC architecture and MySQL. The system has separate client and admin portals, secure login functionalities, and comprehensive management features.
- Authentication & Authorization: Secure login functionalities for both clients and admins with role-based access control.
- Manage Book Catalog: Admins can list, update, add, and remove books.
- Approve/Deny Requests:
- Checkout and check-in requests from clients.
- Requests from users seeking admin privileges.
- View Books: Clients can view the list of available books.
- Request Management:
- Request checkout and check-in of books from the admin.
- View their borrowing history.
- Secure Password Storage: Passwords are hashed and salted before being stored in the database.
- JWT-based Session Management: Implemented custom session management using JWT tokens.
- Go 1.16+
- MySQL
- golang-migrate
- Clone the Repository:
git clone <repository-url> cd <repository-directory>
- Build and Run the Application::
make run
- help: Print help message.
make help
- tidy: Format code and tidy modfile.
make tidy
- audit: Run quality control checks.
make audit
- test: Run all tests.
make test
- test/cover: Run all tests and display coverage.
make test/cover
- build: Build the application.
make build
- run: Run the application.
make run
- run/live: Run the application with reloading on file changes.
make run/live
- migrate-up: Run database migrations up.
make migrate-up
- migrate-down: Run database migrations down.
make migrate-down
- migrate-new: Create a new database migration.
make migrate-new
- push: Push changes to the remote Git repository.
make push
-
Admin Portal:
- Access via
/admin/
. - Manage book catalog and user requests.
- Access via
-
Client Portal:
- Access via
/client/
. - View available books, request checkouts/check-ins, and view borrowing history.
- Access via