How mahirshahriar1/cse-299-nsu-cpc works
Main Components
• Front-End Client:
• Components: Break down major UI parts such as landing pages, authentication (login, registration), dashboards (user, corporate, and admin), job listings, and CV processing pages.
• Routing & State Management: Show the role of React Router (or any routing system in use) and how contexts (like StepperContext and UserContext) are used.
• Styling: Label integration with modern styling libraries (Tailwind CSS & DaisyUI) and configuration files (postcss.config.js, tailwind.config.js).
• Back-End Server:
• Express.js Application: Highlight how the entry point (backend/index.js) coordinates the Express server.
• Controllers: A set of controllers handling various domain actions (admin, corporate, job applications, CV handling, and user management).
• Middlewares: Indicate error handling and access control with specific middlewares (adminMiddleware, corporateMiddleware, errorMiddleware).
• Routes: Show how different routers (adminRoutes, authRoutes, corporateRoutes, etc.) correspond to the REST API endpoints.
• Models: Display the Mongoose models (adminModel, alumniModel, appliedJobsModel, corporateModel, cvModel, jobModel, studentModel, userModel) that interact with MongoDB.
• Utilities: Include generation of tokens (JWT) and Passport integration from backend/utils.
• Database:
• MongoDB: Point out where the connection is configured (backend/config/db.js) and note that it supports flexible schema for various entities.
• External Services:
• Firebase Cloud Storage: Emphasize its role in handling file uploads (CVs and profile images).
• Authentication: Google Sign-In integrated with JWT for secure authentication.
Relationships and Interactions
• That the back-end processes incoming requests via controllers, applies business logic using middlewares, and interacts with MongoDB through models.
• That the back-end also communicates with Firebase for file storage.
• For deployment, include the environment management (.env files for both front-end and back-end) and a note of Railway as the hosting platform.
Architectural Patterns & Design Principles
• MVC-Like Structure: Explain that the back-end follows a pattern where routes invoke controllers which then interact with models.
• Separation of Concerns: Differentiate clearly between front-end and back-end concerns, ensuring a clean API boundary.
• Security and Middleware Usage: Highlight the integration of JWT, Google authentication, and security-focused middleware.
• Component-Based Front-End: Indicate that the React architecture is modular, with components managing specific UI pieces.