# emedat/uricreative_job_dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/emedat/uricreative_job_dashboard
- Repository: https://github.com/emedat/uricreative_job_dashboard

## Overview

##### Main Components

A. Frontend Layer (Next.js):
- Client-Side Components
- Application Table Component
- Statistics Chart Component
- Filters Component
- API Integration Layer
- Application Fetching Logic
- Statistics Fetching Logic

B. Backend Layer (Nest.js):
- Controllers Layer
- Job Application Controller
- Default Controller
- Service Layer
- Job Application Service
- Data Model Layer
- Job Application Model

**[Client Tier] → [Application Tier] → [Data Tier]**

##### Specific Component Relationships

Frontend (Next.js):
**[Page Component] ↔ [Components]**
- ApplicationTable
- StatisticsChart
- Filters
- ↕
**[API Integration Layer]**
- fetchApplications
- fetchStats

Backend (Nest.js):
**[Controllers] → [Services] → [Models]**

##### Specific elements

a) Frontend Components:
- API integration layer
- Tailwind CSS styling integration
- Chart.js integration for statistics

b) Backend Components:
- Nest.js module structure
- Controller-service-model relationship
- REST API endpoints

c) Deployment & Infrastructure:
- Vercel hosting for frontend
- Render hosting for backend
- API communication paths

##### Key Interactions to Highlight

- HTTP/REST communication between frontend and backend
- Data flow for application listing
- Data flow for statistics
- Filter operations flow

##### Technical Details

- TypeScript usage across both ends
- REST API endpoints (/applications, /applications/stats)
- Frontend routes
- Component dependencies

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client
        FrontPage["Main Page"]
        Layout["Layout"]
        subgraph Components
            AppTable["Application Table"]
            StatsChart["Statistics Chart"]
            FiltersComp["Filters"]
        end
        subgraph APIIntegration
            FetchApps["Fetch Applications"]
            FetchStats["Fetch Statistics"]
        end
        Styles["Component Styles"]
    end

    subgraph Backend
        Entry["Entry Point"]
        subgraph Controllers
            AppController["Job Application Controller"]
            DefController["Default Controller"]
        end
        subgraph Services
            AppService["Job Application Service"]
        end
        subgraph Models
            AppModel["Job Application Model"]
        end
        subgraph Modules
            AppModule["Job Application Module"]
            MainModule["Main Application Module"]
        end
    end

    subgraph Deployment
        Vercel["Vercel (Frontend)"]
        Render["Render (Backend)"]
    end

    %% Relationships
    FrontPage --> Layout
    Layout --> Components
    Components --> APIIntegration
    APIIntegration --> Controllers
    Controllers --> Services
    Services --> Models
    Entry --> MainModule
    MainModule --> AppModule
    AppModule --> AppController
    AppController --> AppService
    AppService --> AppModel
    Client --> Vercel
    Backend --> Render

    %% Click Events
    click AppTable "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/frontend/src/app/components/ApplicationTable.tsx"
    click StatsChart "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/frontend/src/app/components/StatisticsChart.tsx"
    click FiltersComp "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/frontend/src/app/components/Filters.tsx"
    click FetchApps "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/frontend/src/app/api/fetchApplications.ts"
    click FetchStats "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/frontend/src/app/api/fetchStats.ts"
    click AppController "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/backend/src/job-application/job-application.controller.ts"
    click DefController "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/backend/src/default.controller.ts"
    click AppService "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/backend/src/job-application/job-application.service.ts"
    click AppModel "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/backend/src/job-application/job-application.model.ts"
    click AppModule "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/backend/src/job-application/job-application.module.ts"
    click MainModule "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/backend/src/app.module.ts"
    click FrontPage "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/frontend/src/app/page.tsx"
    click Layout "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/frontend/src/app/layout.tsx"
    click Styles "https://github.com/EMEDAT/UriCreative_Job_Dashboard/tree/EMEDAT24/frontend/src/app/styles/"
    click Entry "https://github.com/EMEDAT/UriCreative_Job_Dashboard/blob/EMEDAT24/backend/main.ts"

    %% Styling
    classDef frontend fill:#3b82f6,color:white
    classDef backend fill:#22c55e,color:white
    classDef deployment fill:#eab308,color:white
    classDef default fill:#gray,color:black

    class FrontPage,Layout,AppTable,StatsChart,FiltersComp,FetchApps,FetchStats,Styles frontend
    class Entry,AppController,DefController,AppService,AppModel,AppModule,MainModule backend
    class Vercel,Render deployment
```
