# sarthak8822/job-hunt architecture

> Architecture diagram of the GitHub repository sarthak8822/job-hunt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sarthak8822/job-hunt
- Repository: https://github.com/sarthak8822/job-hunt

## Overview

##### Main Components

a. Frontend Layer:
- Pages (src/app/*): Home, JobsListing, and Job Details
- Components (src/components/*): Navbar, HeroSection, Card, Footer
- UI Components (src/components/ui/*): Spotlight, Background Gradient, etc.

b. API Layer:
- External API integration with JSearch API (RapidAPI)
- Two main endpoints: Search and Job Details

c. Data Layer:
- Static data management (src/data/*)
- JobData.ts and jobsList.ts as data sources

##### Interaction Flows

- Client-side navigation between pages
- API calls to external services
- Data flow from static data sources to components

##### Technical Stack Highlights

- Next.js 14 Framework
- TypeScript
- Tailwind CSS
- RapidAPI Integration

##### Specific Implementation Details

- Environment Configuration (.env)
- Static Asset Management (public/)
- Utility Functions (src/utils/)

##### Additional Elements

Include:
- Environment configuration flow
- Build and deployment flow to Vercel
- Client-side routing paths
- Component hierarchy

Key Considerations:

##### UI component hierarchy

- Special indicators or symbols

Level of Detail:
- Notes about key architectural decisions

Remember to maintain clarity while showing the relationship between Next.js's file-system-based routing and the component structure. This will help other developers understand both the application's architecture and its implementation details.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Frontend
        HomePage["Home Page"]
        JobsListingPage["Jobs Listing Page"]
        JobDetailsPage["Job Details Page"]
        RootLayout["Root Layout"]
        
        subgraph Components
            Navbar["Navbar"]
            HeroSection["Hero Section"]
            Card["Card Component"]
            Footer["Footer"]
        end
        
        subgraph UIComponents
            Spotlight["Spotlight Effect"]
            BGGradient["Background Gradient"]
            CardHover["Card Hover Effect"]
            Input["Input Component"]
            NavMenu["Navigation Menu"]
            LoadingAnim["Loading Animation"]
        end
    end
    
    subgraph APILayer
        APIRoutes["API Routes"]
        JSearchAPI["JSearch API (RapidAPI)"]
        SearchEndpoint["Search Endpoint"]
        DetailsEndpoint["Details Endpoint"]
    end
    
    subgraph DataLayer
        JobData["Job Data Source"]
        JobsList["Jobs List Source"]
    end
    
    subgraph Config
        NextConfig["Next.js Config"]
        TSConfig["TypeScript Config"]
        TailwindConfig["Tailwind Config"]
        PostCSSConfig["PostCSS Config"]
        GlobalStyles["Global Styles"]
        Utils["Utilities"]
    end

    %% Relationships
    HomePage --> JobsListingPage
    JobsListingPage --> JobDetailsPage
    RootLayout --> HomePage
    RootLayout --> JobsListingPage
    RootLayout --> JobDetailsPage
    
    Components --> HomePage
    Components --> JobsListingPage
    Components --> JobDetailsPage
    
    UIComponents --> Components
    
    APIRoutes --> JSearchAPI
    SearchEndpoint --> JSearchAPI
    DetailsEndpoint --> JSearchAPI
    
    JobData --> Components
    JobsList --> Components
    
    %% Click Events
    click HomePage "https://github.com/Sarthak8822/job-hunt/blob/main/src/app/page.tsx"
    click JobsListingPage "https://github.com/Sarthak8822/job-hunt/blob/main/src/app/Jobslisting/page.tsx"
    click JobDetailsPage "https://github.com/Sarthak8822/job-hunt/blob/main/src/app/Jobslisting/[job_id]/page.tsx"
    click RootLayout "https://github.com/Sarthak8822/job-hunt/blob/main/src/app/layout.tsx"
    click Navbar "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/Navbar.tsx"
    click HeroSection "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/HeroSection.tsx"
    click Card "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/Card.tsx"
    click Footer "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/Footer.tsx"
    click Spotlight "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/ui/Spotlight.tsx"
    click BGGradient "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/ui/background-gradient.tsx"
    click CardHover "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/ui/card-hover-effect.tsx"
    click Input "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/ui/input.tsx"
    click NavMenu "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/ui/navbar-menu.tsx"
    click LoadingAnim "https://github.com/Sarthak8822/job-hunt/blob/main/src/components/ui/multi-step-loader.tsx"
    click JobData "https://github.com/Sarthak8822/job-hunt/blob/main/src/data/jobData.ts"
    click JobsList "https://github.com/Sarthak8822/job-hunt/blob/main/src/data/jobsList.ts"
    click NextConfig "https://github.com/Sarthak8822/job-hunt/blob/main/next.config.mjs"
    click TSConfig "https://github.com/Sarthak8822/job-hunt/blob/main/tsconfig.json"
    click TailwindConfig "https://github.com/Sarthak8822/job-hunt/blob/main/tailwind.config.ts"
    click PostCSSConfig "https://github.com/Sarthak8822/job-hunt/blob/main/postcss.config.js"
    click GlobalStyles "https://github.com/Sarthak8822/job-hunt/blob/main/src/app/globals.css"
    click Utils "https://github.com/Sarthak8822/job-hunt/blob/main/src/utils/cn.ts"

    %% Styling
    classDef frontend fill:#3b82f6,color:white
    classDef api fill:#22c55e,color:white
    classDef data fill:#eab308,color:black
    classDef config fill:#6b7280,color:white
    classDef external fill:#a855f7,color:white

    class HomePage,JobsListingPage,JobDetailsPage,RootLayout,Components,UIComponents frontend
    class APIRoutes,SearchEndpoint,DetailsEndpoint api
    class JobData,JobsList data
    class NextConfig,TSConfig,TailwindConfig,PostCSSConfig,GlobalStyles,Utils config
    class JSearchAPI external
```
