This repository contains the working source code for the "Sprint 0" increment of the Library Management Application.
- server/: Node.js + Express + Prisma (SQLite Backend)
- client/: React + Vite + TailwindCSS (Frontend)
- Node.js (v18 or higher)
- npm
cd server
npm install
npx prisma generate
npx prisma db push
node scripts/seed.js # Populates DB with Admin, Librarian, Member & Books# Inside /server directory
npm start
# Server runs on http://localhost:3000cd client
npm install
npm run dev
# Frontend runs on http://localhost:5173| Role | Password | |
|---|---|---|
| Administrator | admin@library.com |
password123 |
| Librarian | biblio@library.com |
password123 |
| Member | student@school.com |
password123 |
- Login as
student@school.com. - Browse the Catalog: Filter by "Science-fiction".
- Check My Books to see current "Clean Code" borrowing (due in 14 days).
- Login as
biblio@library.com. - Go to Borrowings Dashboard.
- See active loans.
- Action: Create a new borrowing for a user.
- Action: Return a book (mark as available).
- Login as
admin@library.com. - View Global Status.
- Manage users (future sprint).
- Backend: Node.js, Express, Prisma ORM, SQLite
- Frontend: React, TailwindCSS, React Router, Vite
- Security: JWT Authentication, Bcrypt Password Hashing, Role-Based Access Control (RBAC)
Run the automated test suite:
# Backend Tests (Unit & Integration)
cd server && npm test
# Frontend Tests (Components)
cd client && npm test- User Guide - Instructions for Members, Librarians, and Admins.
- Cloud Deployment - Recommended: Guide for Vercel/Railway (requires Postgres).
To build and run the entire application (Backend + Frontend) on a single port:
./deploy.shAccess the app at http://localhost:3000.