Skip to content

SjxSubham/JOB-SEEK

Repository files navigation

JobSeek - AI-Powered Job Search Platform

Live Demo

JobSeek is an intelligent job search platform that leverages AI to help users find their dream jobs more effectively. The platform provides personalized job recommendations, resume analysis, and smart matching algorithms.

job-seek

πŸš€ Live Demo

Visit our live application at: JOB-SEEK

πŸ› οΈ Tech Stack

Frontend

  • React.js (Vite) - Fast and modern frontend framework
  • Tailwind CSS - Utility-first CSS framework
  • Clerk - Authentication and user management
  • Zod - TypeScript-first schema validation

Backend

  • Supabase - Backend as a Service (BaaS)
    • Database
    • Authentication
    • RLS Policy Secured database
    • Storage

πŸ› οΈ Setup Instructions

  1. Clone the repository:
git clone https://github.com/SjxSubham/JOB-SEEK
  1. Install dependencies:
npm install
  1. Environment Setup:

    • Copy .env.sample to .env
    • Add your own API keys and configuration values
    • Required environment variables:
      • VITE_SUPABASE_URL: Your Supabase project URL
      • VITE_SUPABASE_ANON_KEY: Your Supabase anonymous key
      • VITE_CLERK_PUBLISHABLE_KEY: Your Clerk publishable key
      • VITE_HUGGINGFACE_API_TOKEN: Your Hugging Face API token
      • Other configuration variables as specified in .env.sample
  2. Run the development server:

npm run dev
  1. Build for production:
npm run build
npm preview

πŸ€– AI Integration and Job Matching

AI Job Recommendation Feature

The AI Job Recommendation feature uses the Mistral-7B-Instruct-v0.2 model from Hugging Face to provide personalized job matches based on user profiles. Here's how it works: (work is still going on...)

Frontend Implementation

  • Located in src/components/AIJobRecommendation.tsx
  • Collects user profile data including:
    • Skills
    • Years of experience
    • Preferred location
    • Remote work preference
    • Salary expectations
    • Job type preferences
    • Education background
  • Displays job matches in a clean card layout with:
    • Job title and company
    • Match score
    • Job description
    • Required skills

Backend Implementation

  • Uses Hugging Face's API with Mistral-7B-Instruct-v0.2 model
  • Located in src/services/aiService.ts
  • Processes user profile data and generates a structured prompt
  • Returns top 3 job matches with match scores and relevant details

Environment Setup

  1. Add your Hugging Face API key to .env:
VITE_HUGGINGFACE_API_KEY=your_api_key_here

Usage

  1. Navigate to the AI Job Recommendation section
  2. Fill in your profile details
  3. Click "Find My Matches"
  4. View your personalized job recommendations

Technical Details

  • The AI model analyzes the user profile and generates job matches based on:
    • Skill compatibility
    • Experience level
    • Location preferences
    • Salary expectations
    • Job type preferences
  • Each match includes a match score (0-1) indicating the relevance
  • The response is formatted in JSON and processed for display

πŸ“š API Documentation

Authentication

The platform uses Clerk for authentication. To access protected endpoints, include the session token in the request headers:

headers: {
  'Authorization': `Bearer ${sessionToken}`,
  'Content-Type': 'application/json'
}

Endpoints

Jobs

  • GET /api/jobs - Get all jobs
  • GET /api/jobs/:id - Get job by ID
  • POST /api/jobs - Create new job
  • PUT /api/jobs/:id - Update job
  • DELETE /api/jobs/:id - Delete job

Companies

  • GET /api/companies - Get all companies
  • GET /api/companies/:id - Get company by ID
  • POST /api/companies - Create new company
  • PUT /api/companies/:id - Update company
  • DELETE /api/companies/:id - Delete company

Users

  • GET /api/users/profile - Get user profile
  • PUT /api/users/profile - Update user profile
  • GET /api/users/saved-jobs - Get user's saved jobs
  • POST /api/users/saved-jobs/:jobId - Save a job
  • DELETE /api/users/saved-jobs/:jobId - Remove a saved job

RESTful endpoint for querying and managing your database

πŸ—οΈ Code Architecture

Frontend Structure

β”œβ”€β”€ public/    # static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ ui/    # Job listing card component
β”‚   β”œβ”€β”€ data/          # JSON Data
β”‚   β”œβ”€β”€ pages/         # React pages and routing
β”‚   β”œβ”€β”€ hooks/         # fectching database.data
β”‚   β”œβ”€β”€ styles/        # Global styles and Tailwind config
β”‚   β”œβ”€β”€ utils/         # Helper functions and utilities
β”‚   β”œβ”€β”€ api/           # Supabase and API integration
|   β”œβ”€β”€ lib/
β”‚   └── types/         # TypeScript type definitions
β”œβ”€β”€ .env.sample        # Environment variables template
└── vite.config.ts     # Vite configuration

Complete Project File Structure

JOB-SEEK/
β”œβ”€β”€ πŸ“ public/                    # Static assets
β”‚   β”œβ”€β”€ πŸ–ΌοΈ vite.svg
β”‚   └── πŸ“„ index.html
β”œβ”€β”€ πŸ“ src/                       # Source code
β”‚   β”œβ”€β”€ πŸ“ api/                   # Supabase API integration layer
β”‚   β”‚   β”œβ”€β”€ πŸ”§ apiJobs.js         # Job CRUD operations
β”‚   β”‚   β”œβ”€β”€ πŸ”§ apiApplication.js  # Application management
β”‚   β”‚   └── πŸ”§ apiCompanies.js    # Company data operations
β”‚   β”œβ”€β”€ πŸ“ components/            # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ πŸ“ ui/                # Base UI components
β”‚   β”‚   β”œβ”€β”€ 🧩 header.jsx         # Navigation header
β”‚   β”‚   β”œβ”€β”€ πŸ”’ protected-route.jsx # Route protection
β”‚   β”‚   └── 🎨 theme-provider.jsx # Theme management
β”‚   β”œβ”€β”€ πŸ“ data/                  # Static JSON data
β”‚   β”‚   β”œβ”€β”€ πŸ“Š companies.json     # Company listings
β”‚   β”‚   └── ❓ faq.json           # FAQ content
β”‚   β”œβ”€β”€ πŸ“ hooks/                 # Custom React hooks
β”‚   β”‚   └── 🎣 use-fetch.js       # Data fetching hook
β”‚   β”œβ”€β”€ πŸ“ layouts/               # Layout components
β”‚   β”‚   └── πŸ“ app-layout.jsx     # Main app layout
β”‚   β”œβ”€β”€ πŸ“ lib/                   # Utility libraries
β”‚   β”œβ”€β”€ πŸ“ pages/                 # React pages/routes
β”‚   β”‚   β”œβ”€β”€ 🏠 landing.jsx        # Landing page
β”‚   β”‚   β”œβ”€β”€ πŸ‘€ onboarding.jsx     # User onboarding
β”‚   β”‚   β”œβ”€β”€ πŸ“‹ jobListing.jsx     # Job listings
β”‚   β”‚   β”œβ”€β”€ πŸ“„ job.jsx            # Job details
β”‚   β”‚   β”œβ”€β”€ βž• post-job.jsx       # Job posting
β”‚   β”‚   β”œβ”€β”€ πŸ’Ό my-jobs.jsx        # Recruiter jobs
β”‚   β”‚   └── ⭐ saved-jobs.jsx     # Saved jobs
β”‚   β”œβ”€β”€ πŸ“ utils/                 # Helper utilities
β”‚   β”‚   └── πŸ”Œ supabase.js        # Supabase client config
β”‚   β”œβ”€β”€ 🎨 App.css               # Global styles
β”‚   β”œβ”€β”€ βš›οΈ App.jsx               # Main App component
β”‚   β”œβ”€β”€ 🎨 index.css             # Base styles
β”‚   └── πŸš€ main.jsx              # App entry point
β”œβ”€β”€ πŸ“„ .env.sample               # Environment variables template
β”œβ”€β”€ πŸ“„ .gitignore               # Git ignore rules
β”œβ”€β”€ πŸ“„ components.json          # shadcn/ui config
β”œβ”€β”€ πŸ“„ eslint.config.js         # ESLint configuration
β”œβ”€β”€ πŸ“„ jsconfig.json            # JavaScript config
β”œβ”€β”€ πŸ“„ package.json             # Dependencies & scripts
β”œβ”€β”€ πŸ“„ postcss.config.js        # PostCSS config
β”œβ”€β”€ πŸ“„ README.md                # Project documentation
β”œβ”€β”€ πŸ“„ tailwind.config.js       # Tailwind CSS config
β”œβ”€β”€ πŸ“„ vercel.json              # Vercel deployment config
└── πŸ“„ vite.config.js           # Vite build config

Client-Server Architecture & Data Flow

graph TB
    subgraph "πŸ–₯️ CLIENT (Frontend)"
        A[βš›οΈ React App<br/>Vite + Tailwind]
        B[🎣 Custom Hooks<br/>use-fetch.js]
        C[πŸ”§ API Layer<br/>apiJobs, apiApplication, apiCompanies]
        D[πŸ”’ Authentication<br/>Clerk JWT]
        E[πŸ“± UI Components<br/>Pages & Layouts]
    end
    
    subgraph "☁️ BACKEND SERVICES"
        F[πŸ” Clerk Auth Service<br/>User Management & JWT]
        G[πŸ—„οΈ Supabase Backend<br/>Database + Storage + Auth]
        H[πŸ€– AI Services<br/>Hugging Face API]
    end
    
    subgraph "πŸ’Ύ DATABASE LAYER"
        I[πŸ“Š PostgreSQL Database<br/>Jobs, Companies, Applications]
        J[πŸ“ File Storage<br/>Resumes & Company Logos]
        K[πŸ” RLS Policies<br/>Row Level Security]
    end

    %% Client Flow
    E --> B
    B --> C
    C --> D
    
    %% Authentication Flow
    A -.->|Sign In/Up| F
    F -.->|JWT Token| D
    D -->|Authenticated Requests| G
    
    %% Data Flow
    C -->|CRUD Operations| G
    G --> I
    G --> J
    I --> K
    
    %% AI Integration
    C -.->|Job Matching| H
    H -.->|AI Recommendations| C
    
    %% Styling
    classDef client fill:#e1f5fe
    classDef backend fill:#f3e5f5
    classDef database fill:#e8f5e8
    classDef auth fill:#fff3e0

 %% Styling for Frontend nodes
    style A color:#E63946
    style B color:#457B9D
    style C color:#1D3557
    style D color:#073B4C
    style E color:#A8DADC
    
    %% Styling for Backend nodes
    style F color:#FF6B6B
    style G color:#4ECDC4
    style H color:#FFA69E
    
    %% Styling for Database nodes
    style I color:#06D6A0
    style J color:#FFD166
    style K color:#073B4C

    class A,B,C,E client
    class F,G,H backend
    class I,J,K database
    class D auth
Loading

Data Flow Diagram

sequenceDiagram
    participant User as πŸ‘€ User
    participant React as βš›οΈ React App
    participant Clerk as πŸ” Clerk Auth
    participant Hooks as 🎣 Custom Hooks
    participant API as πŸ”§ API Layer
    participant Supabase as πŸ—„οΈ Supabase
    participant DB as πŸ’Ύ Database

    %% Authentication Flow
    User->>React: Access Protected Route
    React->>Clerk: Check Authentication
    Clerk-->>React: Return JWT Token
    
    %% Data Fetching Flow
    React->>Hooks: Trigger Data Fetch
    Hooks->>Clerk: Get Session Token
    Clerk-->>Hooks: JWT Token
    Hooks->>API: Call API Function with Token
    API->>Supabase: Authenticated Request
    Supabase->>DB: Query Database
    DB-->>Supabase: Return Data
    Supabase-->>API: Response Data
    API-->>Hooks: Processed Data
    Hooks-->>React: Update State
    React-->>User: Display Content

    %% File Upload Flow (Resume/Logo)
    User->>React: Upload File
    React->>API: Upload Request
    API->>Supabase: Store in Bucket
    Supabase-->>API: File URL
    API->>Supabase: Save URL to Database
    Supabase-->>API: Success Response
    API-->>React: Upload Complete
    React-->>User: Show Success
Loading

Component Communication Flow

graph LR
    subgraph "πŸ“± User Interface"
        A[🏠 Landing Page]
        B[πŸ“‹ Job Listings]
        C[πŸ“„ Job Details]
        D[βž• Post Job]
        E[πŸ’Ό My Jobs]
        F[⭐ Saved Jobs]
    end
    
    subgraph "🎣 Data Management"
        G[use-fetch Hook]
        H[useState/useEffect]
    end
    
    subgraph "πŸ”§ API Integration"
        I[apiJobs.js]
        J[apiApplication.js]
        K[apiCompanies.js]
    end
    
    subgraph "πŸ—„οΈ Backend"
        L[Supabase Client]
        M[Database Tables]
        N[File Storage]
    end

    A --> G
    B --> G
    C --> G
    D --> G
    E --> G
    F --> G
    
    G --> H
    G --> I
    G --> J
    G --> K
    
    I --> L
    J --> L
    K --> L
    
    L --> M
    L --> N

     %% Styling for Frontend nodes
    style A color:#E63946
    style B color:#457B9D
    style C color:#1D3557
    style D color:#F1FAEE
    style E color:#A8DADC
    
    %% Styling for Backend nodes
    style F color:#FF6B6B
    style G color:#4ECDC4
    style H color:#FFA69E
    
    %% Styling for Database nodes
    style I color:#06D6A0
    style J color:#FFD166
    style K color:#073B4C
    style L color:#FF6B6B
    style M color:#4ECDC4
    style N color:#FFA69E

    classDef ui fill:#e3f2fd
    classDef data fill:#f1f8e9
    classDef api fill:#fff8e1
    classDef backend fill:#fce4ec
    
    class A,B,C,D,E,F ui
    class G,H data
    class I,J,K api
    class L,M,N backend
Loading

Key Technologies

  • React.js (Vite) for fast development and building
  • Supabase for backend services and database
  • Clerk with JWT for secure authentication
  • Tailwind CSS for styling (clean and responsive UI )
  • Zod for runtime type checking and validation

πŸ”„ Working Features & Data Flow Patterns

1. Authentication Flow

User Login β†’ Clerk Authentication β†’ JWT Token β†’ Supabase RLS β†’ Database Access

2. Job Search & Listing

Search Input β†’ API Filter β†’ Supabase Query β†’ Database β†’ Filtered Results β†’ UI Display

3. Job Application Process

Apply Button β†’ Resume Upload β†’ File Storage β†’ Application Record β†’ Database β†’ Email Notification

4. Job Posting (Recruiter)

Job Form β†’ Validation β†’ Company Logo Upload β†’ Job Creation β†’ Database β†’ Live Listing

5. Save/Unsave Jobs

Save Action β†’ Check Auth β†’ Toggle Saved State β†’ Database Update β†’ UI Refresh

6. Real-time Features

  • Live Job Updates: Supabase real-time subscriptions
  • Application Status: Real-time status changes
  • New Job Notifications: Instant updates when jobs match criteria

7. File Management

File Upload β†’ Supabase Storage β†’ URL Generation β†’ Database Reference β†’ Display/Download

8. Role-based Access Control

graph TD
    A[User Login] --> B{Role Check}
    B -->|Candidate| C[Job Search, Apply, Save Jobs]
    B -->|Recruiter| D[Post Jobs, Manage Applications]
    B -->|No Role| E[Onboarding Process]
    E --> F[Select Role] --> B
Loading

9. Data Validation Flow

Form Input β†’ Zod Schema β†’ Client Validation β†’ API Request β†’ Server Validation β†’ Database

10. Error Handling Pattern

API Request β†’ Error Check β†’ User-friendly Message β†’ Fallback UI β†’ Retry Mechanism

βš–οΈ Trade-offs and Assumptions

Trade-offs

  1. Performance vs. Features

    • Real-time AI analysis may impact response times
    • Caching strategies implemented for optimization
    • Supabase real-time subscriptions for live updates
    • Rate limiting for AI API calls
  2. Scalability

    • Supabase handles database scaling
    • Clerk manages authentication scaling
    • AI service rate limits considered in design
    • Ready for horizontal scaling if needed

Assumptions

  1. User Behavior

    • Users will provide accurate profile information
    • Regular updates to job preferences
    • Secure authentication through Clerk
    • Willing to wait for AI processing
  2. Data Quality

    • Job listings are up-to-date
    • Resume data is in supported formats
    • Data validation through Zod schemas
    • AI model responses are reliable

πŸ“‹ Quick Reference

Key File Locations

Component File Path Purpose
πŸ”§ API Layer src/api/ Supabase integration functions
🎣 Data Hooks src/hooks/use-fetch.js Custom data fetching logic
πŸ”Œ Supabase Config src/utils/supabase.js Database client setup
πŸšͺ Routing src/App.jsx React Router configuration
πŸ”’ Auth Guard src/components/protected-route.jsx Route protection logic
πŸ“± Pages src/pages/ Main application views
🎨 Components src/components/ Reusable UI elements

Environment Variables

VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
VITE_HUGGINGFACE_API_TOKEN=your_huggingface_token
JWT_ISSUER_DOMAIN=your_jwt_issuer_domain

Development Commands

npm install          # Install dependencies
npm run dev          # Start development server
npm run build        # Build for production
npm run preview      # Preview production build
npm run lint         # Run ESLint

Database Schema Overview

πŸ“Š Tables:
β”œβ”€β”€ users          # User profiles and roles
β”œβ”€β”€ companies      # Company information
β”œβ”€β”€ jobs          # Job listings
β”œβ”€β”€ applications  # Job applications
└── saved_jobs    # User saved jobs

πŸ—‚οΈ Storage Buckets:
β”œβ”€β”€ resumes       # PDF resume files
└── company-logo  # Company logo images

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

πŸ“§ Feedback

For support or inquiries, Feedback please reach out to - Here

About

This is a Job site, recruiters can add JOB post, applicants can apply for those jobs with AI assistant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •