Skip to content

RaviPandey2002/HireHub

Repository files navigation

System Design Overview Components Frontend

Next.js: Server-side rendering and routing. Tailwind CSS: Styling. Shadcn UI: UI components. Backend

API Routes: Next.js API routes for handling requests. Database: PostgreSQL (or any other relational database). Authentication: NextAuth for handling user authentication. DevOps

Deployment: Vercel for deployment. CI/CD: GitHub Actions for continuous integration and deployment. High-Level Architecture Client Side

Users access the application via a web browser. The frontend application, built with Next.js, serves the web pages. Tailwind CSS is used for styling the application. Shadcn UI components are used for consistent and reusable UI elements. Server Side

Next.js API routes handle server-side logic and interact with the database. NextAuth manages user authentication and session handling. The database stores user information, job listings, and applications. Component Interaction User Authentication

Users sign up, log in, and log out using NextAuth. NextAuth interacts with the database to authenticate users and manage sessions. Job Listings

Users view job listings, which are fetched from the database via API routes. Admins can add, update, or delete job listings using the admin panel. Job Application

Users apply for jobs through the application form. The application data is sent to the server via API routes and stored in the database. Detailed Component Diagram

  1. Frontend Next.js Pages

pages/index.js: Home page pages/auth/signin.js: Sign-in page pages/jobs/index.js: Job listings page pages/jobs/[id].js: Job details page pages/admin/index.js: Admin panel Components

components/Button.js: Reusable button component components/NavBar.js: Navigation bar component components/JobCard.js: Job listing card component

  1. Backend API Routes

pages/api/auth/[...nextauth].js: Authentication route pages/api/jobs/index.js: Get all job listings pages/api/jobs/[id].js: Get a single job listing by ID pages/api/jobs/create.js: Create a new job listing pages/api/jobs/[id]/apply.js: Apply for a job Database

Tables users: Stores user information jobs: Stores job listings applications: Stores job applications Sequence Diagrams

  1. User Authentication Sign Up

User submits the sign-up form. NextAuth API validates and creates a new user. User is redirected to the home page. Sign In

User submits the sign-in form. NextAuth API validates credentials. User session is created, and the user is redirected to the job listings page. 2. Viewing Job Listings User navigates to the job listings page. The frontend requests job listings from the GET /api/jobs API route. The API route fetches job listings from the database and returns them to the frontend. The frontend displays the job listings. 3. Applying for a Job User navigates to a job details page. The frontend requests job details from the GET /api/jobs/[id] API route. The API route fetches job details from the database and returns them to the frontend. User submits the job application form. The frontend sends application data to the POST /api/jobs/[id]/apply API route. The API route stores the application in the database. Deployment Diagram Frontend and Backend Deployed on Vercel. GitHub Actions for CI/CD. Database Hosted on a cloud provider (e.g., AWS RDS, Heroku Postgres).