How wizardgeeky/job-recommendation-system works
Project Type & Purpose
• The system is a full-stack web application built with Next.js, aimed at facilitating job search, resume management, and job recommendations.
• It combines user authentication (signup, login, password management, OTP, JWT). It also integrates external job APIs (e.g., Remote OK) for job listings, along with resume upload and skills extraction functionalities.
• The tech stack includes Next.js (frontend and backend), TypeScript, Tailwind CSS, MongoDB, Nodemailer, and JWT.
File Structure
• The project is organized in a Next.js structure. Under the “app” directory, you have:
• API Routes: Located in app/api/auth with subdirectories for various authentication endpoints and a jobs route (which likely handles jobs fetching or management).
• Components: UI elements like dashboards, job pages, navbar, recommendation pages, and resume upload pages.
• Configuration: Database and email configurations in app/config.
• Models: Representing data schemas (JobModel, Otp, UserModel), suggesting Mongoose/MongoDB is used.
• Utilities: Helper functions for token creation, ciphering, and skills extraction.
• This directory structure clearly separates API endpoints from UI components, implying an MVC-like separation between frontend rendering and backend API logic.
Key Components
a. Frontend:
• Next.js Pages & Components (Found in app/page.tsx and app/components/* directories).
• User Interface for Dashboard, Job listings, Resume upload, Recommendations, and Navbar.
b. API/Backend:
• Next.js API Routes (inside app/api/auth, including various endpoints for login, signup, OTP verification, password management, recommendations, and job-related operations).
c. Business Logic:
• Controllers/Handlers in your API routes interacting with models and util functions.
• Authentication management (JWT and session handling).
• Skills extraction from resumes.
d. Database:
• MongoDB integration with connections configured in app/config/database-config.ts.
• Models representing users, jobs, OTPs.
e. External Services & Integrations:
• Remote Job API integration to fetch remote job listings.
• Email Service (via Nodemailer) for password recovery and OTP validations.
f. Utilities & Configurations:
• Utility functions (app/util) for tasks like token generation and data encryption/decryption.
• Configuration files for email and database connections.
g. Deployment:
• The project is hosted on Vercel.
• The Frontend makes API calls to the Backend (shown as Next.js API endpoints) for authentication, job management, and resume upload operations.
• The API layer communicates with the MongoDB database (for user data, job data, session details).
• There’s an integration link between the backend API and the external Remote Job API for retrieving job listings.
• Email/OTP processes are handled by another connection from the API layer to an Email Service (using Nodemailer).
Architectural Patterns & Design Principles
• Client-Server Architecture: Separation between client (Next.js pages/components) and server (API routes).
• MVC-like Structure: Presentation layer (components), business logic (API endpoints and utilities), and data (MongoDB models).
• RESTful API: Each API route (e.g., route.ts files in auth/login, auth/jobs, etc.) adheres to HTTP methods to interact with the data layer.
• Modular design: The clear separation of concerns (authentication, job management, external API integration) allows extensibility.