How wajih1234/ta3lib works
Ta3lib is an appointment reservation application with a React frontend and an Express/MongoDB backend. Users can register and log in, create and view appointments, and change their appointment status; the admin dashboard lists users and appointments and supports user deletion. The backend separates route dispatch, authentication, controllers, and MongoDB models. The dashboard’s API calls are shown explicitly, but their URL prefix does not match the backend mount shown in the excerpts, so they are not mapped to backend routes. Connections among frontend pages and backend subsystems are limited to documented or excerpted evidence.
Main entry points: App.jsx Page router · app.routes.js Appointment routes · index.js API route index · app.controller.js Appointment controller
Components 21
Frontend experience
- React entry
ta3lib-frontend/src/main.jsx - Page router
ta3lib-frontend/src/App.jsx - Home page
ta3lib-frontend/src/pages/Home.jsx - Registration page
ta3lib-frontend/src/pages/Register.jsx - Login page
ta3lib-frontend/src/pages/Login.jsx - Reservation page
ta3lib-frontend/src/pages/Reservation.jsx - Admin dashboard
ta3lib-frontend/src/pages/Admindash.jsx
Backend API
- HTTP server
ta3lib-back/server.js - API route index
ta3lib-back/routes/index.js - Auth routes
ta3lib-back/routes/auth.routes.js - Appointment routes
ta3lib-back/routes/app.routes.js - Appointment controller
ta3lib-back/controllers/app.controller.js
Identity and access
- Auth controller
ta3lib-back/controllers/auth.controller.js - JWT protection
ta3lib-back/middleware/auth.middleware.js
Persistence
- User model
ta3lib-back/models/User.js - Appointment model
ta3lib-back/models/Appointment.js - Mongo connector
ta3lib-back/config/db.js
Other components
- User
- Administrator
- Hosted API
- MongoDB
Connections 21
- User → React entry: opens app
ta3lib-frontend/src/main.jsx - Administrator → React entry: opens app
ta3lib-frontend/src/main.jsx - React entry → Page router: mounts
ta3lib-frontend/src/main.jsx - Page router → Home page: routes to
ta3lib-frontend/src/App.jsx - Page router → Registration page: routes to
ta3lib-frontend/src/App.jsx - Page router → Login page: routes to
ta3lib-frontend/src/App.jsx - Page router → Reservation page: routes to
ta3lib-frontend/src/App.jsx - Page router → Admin dashboard: routes to
ta3lib-frontend/src/App.jsx - Admin dashboard → Hosted API: fetches data
ta3lib-frontend/src/pages/Admindash.jsx - HTTP server → Mongo connector: connects via
ta3lib-back/server.js - HTTP server → API route index: mounts under /api
ta3lib-back/server.js - API route index → Auth routes: includes
ta3lib-back/routes/index.js - API route index → Appointment routes: includes
ta3lib-back/routes/index.js - Auth routes → Auth controller: dispatches to
ta3lib-back/routes/auth.routes.js - Appointment routes → JWT protection: guards routes
ta3lib-back/routes/app.routes.js - Appointment routes → Appointment controller: dispatches to
ta3lib-back/routes/app.routes.js - Appointment routes → Auth controller: dispatches deletion
ta3lib-back/routes/app.routes.js - Auth controller → User model: reads and writes
ta3lib-back/controllers/auth.controller.js - Appointment controller → User model: reads
ta3lib-back/controllers/app.controller.js - Appointment controller → Appointment model: reads and writes
ta3lib-back/controllers/app.controller.js - Mongo connector → MongoDB: connects
ta3lib-back/config/db.js