How kshitijomkar/job-application-tracker works
Purpose and topology
This is a MERN job-application tracker: a React single-page frontend manages registration, login, and a protected job dashboard; an Express/Node API persists users and applications in MongoDB. JWT authentication separates public account access from authenticated job-management access.
Runtime entry points
• Backend process: backend/server.js initializes Express, connects to MongoDB, and mounts API routes. Runtime configuration is expected through MONGO_URI, JWT_SECRET, and PORT.
• Frontend process: job-tracker-frontend/src/index.js mounts the React application, with job-tracker-frontend/src/App.js acting as the UI composition/routing boundary.
• The services run independently in development (frontend documented at port 3000; backend default configured through PORT).
Persistence layer
MongoDB, accessed through Mongoose, is the system of record.
• Connection boundary: backend/config/db.js
• Identity schema: backend/models/user.js
• Job-application schema: backend/models/job.js
User records support account/authentication state; job records represent application tracking data such as notes and interview dates. Job ownership is expected to be associated with the authenticated user rather than trusted from browser input.
Authentication and authorization
Account creation and login are handled by the auth route/controller path:
• backend/routes/auth.js
• backend/controllers/userController.js
JWT verification is centralized in backend/middleware/authMiddleware.js. This middleware forms the main trust boundary: protected job endpoints receive an authenticated user context, while registration/login remain public. JWT_SECRET is therefore a required backend secret.
Job-management API
The protected CRUD domain is organized around job routes and controller logic:
• backend/routes/jobRoutes.js
• backend/routes/jobs.js
• backend/controllers/jobController.js
The API accepts job create/update/delete and retrieval requests, applies authentication middleware, then reads or mutates backend/models/job.js. The duplicate-looking route files should be treated as a routing consolidation risk: confirm which is mounted by backend/server.js before extending endpoint behavior.
Frontend application stages
The React client divides user flow into public onboarding and authenticated application management:
• Landing entry: job-tracker-frontend/src/LandingPage.js
• Authentication views: job-tracker-frontend/src/Login.js, job-tracker-frontend/src/Register.js
• Protected management view: job-tracker-frontend/src/Dashboard.js
• Job mutation views: job-tracker-frontend/src/AddJob.js, job-tracker-frontend/src/EditJob.js
Control flow is browser form/action → backend API → JWT-protected controller → MongoDB → frontend state/dashboard refresh. The dashboard is the central read surface; add/edit screens are write surfaces.
External infrastructure and deployment
Required external service: MongoDB Atlas (or another MongoDB endpoint) via MONGO_URI. Backend deployment is intended for a Node service such as Render; frontend is intended for static React hosting such as Vercel. There is no repository evidence of a separate AI service integration despite the README’s AI-powered positioning; the implemented architecture shown is authentication plus job tracking.
Main entry points: server.js Express server · App.js App routing · Dashboard.js Dashboard · userController.js User controller
Components 19
React frontend
- Browser user
- React entry
job-tracker-frontend/src/index.js - App routing
job-tracker-frontend/src/App.js - Landing & auth views
job-tracker-frontend/src/LandingPage.js - Login
job-tracker-frontend/src/Login.js - Register
job-tracker-frontend/src/Register.js - Dashboard · Central job read surface.
job-tracker-frontend/src/Dashboard.js - Add / edit jobs
job-tracker-frontend/src/AddJob.js
Node API
- Express server · Connects MongoDB and mounts API routes.
backend/server.js - Auth routes
backend/routes/auth.js - User controller · Creates accounts and issues login JWTs.
backend/controllers/userController.js - Job routes · Confirm whether jobRoutes.js or jobs.js is mounted before extending endpoints.
backend/routes/jobRoutes.js - JWT middleware · Verifies JWT and supplies authenticated user context.
backend/middleware/authMiddleware.js - Job controller
backend/controllers/jobController.js
Data & infrastructure
- Mongoose connection · Connects using MONGO_URI.
backend/config/db.js - User model
backend/models/user.js - Job model · Jobs are owned by the authenticated user.
backend/models/job.js - MongoDB / Atlas
- JWT_SECRET
Connections 24
- Browser user → React entry: loads SPA
- React entry → App routing: mounts
- App routing → Landing & auth views: public flow
- App routing → Login: login route
- App routing → Register: register route
- App routing → Dashboard: authenticated route
- Dashboard → Add / edit jobs: opens write flows
- Login → Express server: auth API
- Register → Express server: auth API
- Dashboard → Express server: job reads
- Add / edit jobs → Express server: job mutations
- Express server → Auth routes: mounts public routes
- Express server → Job routes: mounts job routes
- Express server → Mongoose connection: initializes
- Auth routes → User controller: delegates
- User controller → User model: accounts
- User controller → JWT_SECRET: signs JWT
- Job routes → JWT middleware: protects endpoints
- JWT middleware → JWT_SECRET: verifies JWT
- JWT middleware → Job controller: authenticated context
- Job controller → Job model: CRUD by owner
- Mongoose connection → MongoDB / Atlas: connects
- User model → MongoDB / Atlas: persists
- Job model → MongoDB / Atlas: persists