How lvu237it/wdp301-planning-web-application works
Project Type and Purpose
• This is a full‐stack, team‐collaboration web application.
• Front‐end: Single‐Page Application (SPA) built with React (Vite, Tailwind, shadcn-ui).
• Back‐end: Node.js + Express REST API (MVC pattern), real-time socket support, scheduled jobs, file management, OAuth and JWT-based authentication.
• Persistence: Likely MongoDB via Mongoose models.
File Structure
• Top‐level: /front-end and /back-end.
• Back‐end:
• index.js/app.js – Express app bootstrap
• routes/ → controllers/ → models/ (MVC)
• middlewares/, services/, utils/ (cross-cutting concerns)
• swagger.json for API docs
• cron jobs under utils/cronJobs.js
• OAuth config in configs/passport-config.js
• Front‐end:
• src/ with components/, pages/, contexts/, utils/
• UI library under components/ui/
• Routing via React Router (ProtectedRoute.jsx)
• Real-time client socket in utils/socketClient.js
• Constants and styles grouped under constants/ and styles/
Key README Insights
• (Not provided, but file tree alone indicates tech stack and architecture.)
Main Components & Interactions
a. Components
• Client SPA (React)
• API Server (Express)
• Database (MongoDB)
• Real-time Socket Service (Socket.io)
• External OAuth Service (Google)
• Email Service (SMTP/SendGrid via sendMail.js)
• File Storage (local/disk or cloud)
• Cron Scheduler (background jobs)
b. Interactions
• Browser ↔ SPA (user events, page routing)
• SPA ↔ API (HTTP REST over JWT)
• SPA ↔ API (WebSocket for live updates)
• API ↔ Database (CRUD via Mongoose models)
• API ↔ Google OAuth (OAuth2 handshake)
• API ↔ Email service (notification emails)
• Scheduler ↔ Database (periodic tasks)
c. Architectural Patterns
• Backend: MVC + Services + Middlewares
• Frontend: Component‐based SPA with Context for state
• Authentication: Passport.js + JWT + Protected Routes
• Real-time: Socket.io integration
d. Technologies & Frameworks
• Backend: Node.js, Express, Mongoose, Passport, JWT, Socket.io, Swagger
• Frontend: React, Vite, Tailwind CSS, shadcn-ui, React Router