How athithyan24/library works
Reading Room is a role-based departmental e-library. Users sign in, then work through role-specific screens: the registrar maintains departments and academic structure; HODs enrol students and catalogue department-scoped titles; students browse, request or reserve books, and use their library; librarians manage issues, returns, and fines. The React app routes these workflows to an Express API backed by MongoDB. The README documents the end-to-end circulation and review capabilities; some page-to-API and optional subsystem wiring is not shown in the excerpts, so uncertain links are omitted or marked dashed.
Main entry points: App.jsx Role-based app · api.js API client · routes/index.js API routes · models/index.js Domain records
Components 27
Web application
- Role-based app
client/src/App.jsx - Sign in
client/src/pages/Login.jsx - Registrar screens
client/src/pages/admin/Departments.jsx - HOD screens
client/src/pages/hod/Shelf.jsx - Student screens
client/src/pages/student/Catalog.jsx - Book detail
client/src/pages/student/Book.jsx - Librarian desk
client/src/pages/librarian/Desk.jsx - Shared pages
client/src/pages/shared/Resources.jsx - Session state
client/src/store/useAuth.js - API client
client/src/lib/api.js - App shell
client/src/components/Shell.jsx
Identity and structure
- Authentication
server/src/controllers/authController.js - College structure
server/src/controllers/structureController.js
Books and circulation
- Catalog and reviews
server/src/controllers/bookController.js - Loans and fines
server/src/controllers/circulationController.js
Insights and support
- API routes
server/src/routes/index.js - Dashboards and activity
server/src/controllers/insightController.js - Domain records
server/src/models/index.js - Activity logging
server/src/utils/activity.js - Notifications
server/src/utils/notify.js - Async wrapper
server/src/utils/asyncHandler.js - Express service
server/src/index.js
Other components
- Registrar
- Head of department
- Student
- Librarian
- MongoDB
Connections 48
- Registrar → Role-based app: uses
README.md - Head of department → Role-based app: uses
README.md - Student → Role-based app: uses
README.md - Librarian → Role-based app: uses
README.md - Role-based app → Sign in: routes to
client/src/App.jsx - Role-based app → Registrar screens: routes to
client/src/App.jsx - Role-based app → HOD screens: routes to
client/src/App.jsx - Role-based app → Student screens: routes to
client/src/App.jsx - Role-based app → Book detail: routes to
client/src/App.jsx - Role-based app → Librarian desk: routes to
client/src/App.jsx - Role-based app → Shared pages: routes to
client/src/App.jsx - Role-based app → Session state: checks session
client/src/App.jsx - Role-based app → App shell: wraps routes
client/src/App.jsx - Sign in → API client: calls
client/src/pages/Login.jsx - Sign in → Session state: sets session
client/src/pages/Login.jsx - Registrar screens → API client: calls
- HOD screens → API client: calls
client/src/pages/hod/Shelf.jsx - Student screens → API client: calls
client/src/pages/student/Catalog.jsx - Book detail → API client: calls
client/src/pages/student/Book.jsx - Librarian desk → API client: calls
client/src/pages/librarian/Desk.jsx - Shared pages → API client: calls
client/src/pages/shared/Resources.jsx - App shell → API client: calls
client/src/components/Shell.jsx - API client → API routes: sends requests
- Express service → API routes: mounts
server/src/index.js - Express service → MongoDB: connects
server/src/index.js - API routes → Authentication: routes to
server/src/routes/index.js - API routes → College structure: routes to
server/src/routes/index.js - API routes → Catalog and reviews: routes to
server/src/routes/index.js - API routes → Loans and fines: routes to
server/src/routes/index.js - API routes → Dashboards and activity: routes to
server/src/routes/index.js - Authentication → Domain records: reads and writes
server/src/controllers/authController.js - College structure → Domain records: reads and writes
server/src/controllers/structureController.js - Catalog and reviews → Domain records: reads and writes
server/src/controllers/bookController.js - Loans and fines → Domain records: reads and writes
server/src/controllers/circulationController.js - Dashboards and activity → Domain records: queries
server/src/controllers/insightController.js - College structure → Authentication: uses public user
server/src/controllers/structureController.js - Catalog and reviews → Activity logging: logs actions
server/src/controllers/bookController.js - Loans and fines → Activity logging: logs actions
server/src/controllers/circulationController.js - College structure → Activity logging: logs actions
server/src/controllers/structureController.js - Dashboards and activity → Activity logging: logs actions
server/src/controllers/insightController.js - Catalog and reviews → Notifications: notifies users
server/src/controllers/bookController.js - Loans and fines → Notifications: notifies users
server/src/controllers/circulationController.js - Authentication → Async wrapper: wraps handlers
server/src/controllers/authController.js - College structure → Async wrapper: wraps handlers
server/src/controllers/structureController.js - Catalog and reviews → Async wrapper: wraps handlers
server/src/controllers/bookController.js - Loans and fines → Async wrapper: wraps handlers
server/src/controllers/circulationController.js - Dashboards and activity → Async wrapper: wraps handlers
server/src/controllers/insightController.js - Domain records → MongoDB: persists records