How rajtiwari23/careernest works
Project type and purpose
• This is a full-stack web application: a job portal with user and admin interfaces for browsing, posting, and managing job listings and applications.
• The frontend is built in React (Vite, Tailwind CSS, Redux) and the backend is an Express/Node.js REST API with MongoDB (Mongoose) and Cloudinary for file uploads.
File structure
• Top-level “backend” and “frontend” directories
• Backend follows an MVC-style pattern:
• controllers/ (application.controller.js, job.controller.js, etc.)
• models/ (application.model.js, job.model.js, etc.)
• routes/ (application.route.js, job.route.js, etc.)
• middlewares/ (authentication, file upload)
• utils/ (db connection, Cloudinary integration, data URI conversion)
• index.js as entry point
• Frontend is a Vite-React app:
• src/components/ subdivided into auth, admin, shared, UI primitives
• src/hooks/ for data fetching
• src/redux/ for application state slices (auth, job, company, application)
• tailwind.config.js, postcss.config.js, vite.config.js for styling/build
README
• (Empty in this case; all insights come from file structure.)
a. Main components:
• Client Browser (React UI)
• Frontend App (Vite development server / static assets)
• Backend API Server (Express)
• Database (MongoDB)
• External Service (Cloudinary)
b. Relationships and interactions:
1. Browser ↔ Frontend: User events → React components; state stored in Redux; HTTP calls via fetch/axios to backend.
2. Frontend → Backend: REST API calls (GET/POST/PUT/DELETE) to /api/users, /api/jobs, /api/applications, /api/companies.
3. Backend:
• Request → middleware (authentication, Multer upload) → route → controller → model (Mongoose) → MongoDB.
• For file uploads: controller calls utils/datauri → utils/cloudinary → Cloudinary.
4. Backend → Database: CRUD operations via Mongoose.
c. Architectural patterns/design principles:
• MVC pattern on the server side (routes → controllers → models).
• Separation of concerns: authentication and file processing in middlewares; utility modules for external integrations.
• Unidirectional data flow on frontend: React components dispatch Redux actions → update store → propagate to UI.
d. Relevant technologies/frameworks:
• Frontend: React, Vite, Redux Toolkit, Tailwind CSS, Sonner, Headless UI (implicit), custom hooks.
• Backend: Node.js, Express, Mongoose, Cloudinary SDK, Multer, JWT (implied by isAuthenticated), dotenv.
• Database: MongoDB (self-hosted or Atlas).
Detailed guidance
• Drill down to a “Container” view: separate code-level containers for the React app, Express app, MongoDB, Cloudinary.
• A “Component” view within the Express app, showing routes → controllers → models.
• Technology names and ports (e.g., Frontend on port 3000, Backend on port 5000).