How niharika1102/jobify works
Project Type and Purpose
• Jobify is a full-stack web application (MERN: MongoDB, Express, React, Node).
• Purpose: allow job seekers to add/edit/delete job applications, track stats, and manage profiles via a sleek UI.
File Structure
• Top-level:
• client/ – React front-end (Vite, JSX, components, pages, wrappers, assets).
• controllers/, routes/, models/ – Backend Express MVC layers.
• middleware/ – Express middleware (auth, validation, error handling, file uploads).
• utils/ – Shared utilities (constants, token/password helpers, mock data).
• server.js – Entry point for the Node/Express server.
• populate.js – Script to seed the database.
• package.json (root & client) – Dependencies and scripts.
• Architecture: clearly follows MVC, RESTful API, React component/page hierarchy, React Query for data fetching.
README for Additional Insights
• Built with: MERN stack, Axios, React Router, MVC, bcryptjs, Recharts, React Query.
• Features: REST API for CRUD on jobs, JWT auth, password hashing, responsive React UI with charts.
Main Components and Their Interactions
a. Frontend (React App)
• Pages: Landing, Register, Login, Dashboard, Stats, AllJobs, AddJob, EditJob, Profile, Admin
• Components/Wrappers: Navbar, Sidebars, ChartsContainer, FormRow, JobList, ErrorPage, etc.
• Utils: customFetch (Axios wrapper), links config, React Query hooks.
• Build: Vite for bundling.
b. Backend (Node/Express API)
• server.js – Configures Express, global middleware, routes.
• Routes: /api/v1/auth, /api/v1/jobs, /api/v1/users
• Controllers: authController (login/register), jobController (CRUD jobs), userController (profile update)
• Models: userModel (defines User schema), jobModel (defines Job schema)
• Middleware: authMiddleware (JWT verification), validationMiddleware, multerMiddleware (file uploads), errorHandlerMiddleware
• Utils: passwordUtils (hash/compare), tokenUtils (sign/verify JWT), constants (status codes).
c. Database
• MongoDB – hosted (e.g., Atlas or local), stores users and jobs collections.
d. External Services
• Render (hosting front and back)
• Potential file storage if multer uploads to S3 or similar (not shown but easy to add).
Relationships and Data Flows
• Browser → React App: user interacts via UI, React Router manages routes.
• React App → Express API: Axios (customFetch) sends HTTP requests (with JWT in headers).
• Express API → MongoDB: Mongoose ORM reads/writes user and job documents.
• Middleware intercepts requests for auth, validation, error handling.
• Controllers orchestrate business logic, models handle persistence.
Important Architectural Patterns and Design Principles
• MVC on backend: separation of routes, controllers, models.
• RESTful API design: clear resource endpoints.
• JWT-based stateless authentication.
• React Query for caching and synchronizing server state.
• Recharts for data visualization (Stats page).
Additional Details to Capture
• Use of Vite dev server on the client side.
• React Query layer between Components and Axios.
• Population script (populate.js) as an initialization task.
• Error handling flow: Controller → errorHandlerMiddleware → HTTP response.