How nguyenhongsac/college-appointment-system works
Project type and purpose
• This is a backend-only REST API (“college-appointment-system”) built with Node.js and Express.
• Its primary purpose is to manage user authentication (students and faculty), appointment booking, and availability slots.
File structure
• Top-level:
• server.js – application entry point
• package.json / .env – dependency and configuration management
• src/ – main source folder
• Under src/:
• app.js – Express application setup (middleware, routes hooking)
• config/db.js – database connection logic
• controllers/ – business logic for each resource (auth, appointments, availability)
• models/ – data models (User, Appointment, AvailabilitySlot) likely implemented with an ORM/ODM
• routes/ – HTTP route definitions mapping URL paths to controller methods
• middleware/authMiddleware.js – JWT validation and route protection
• tests/ – automated tests for application behavior
README for additional insights
• Dependencies: express, bcryptjs (password hashing), jsonwebtoken (JWT auth), dotenv (environment variables).
• No front-end or microservices present—architecture is a single API service.
Detail
• How server.js invokes app.js and config/db.js.
• Middleware insertion points.
• Don’t over-abstract: include all three controllers, their routes, and the data flow to/from the DB.