# manjurulhoque/django-job-portal architecture

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

- Interactive diagram: https://gitdiagram.com/manjurulhoque/django-job-portal
- Repository: https://github.com/manjurulhoque/django-job-portal

## Overview

##### Main Components

a) Frontend Layer:
- Templates directory structure (templates/)
- Static assets (static/)
- User interfaces for:
- Job seekers (employee)
- Employers
- Authentication
- Resume builder

b) Backend Layer:
- Core Django Apps:
- accounts (user management)
- jobsapp (main job functionality)
- resume_cv (resume management)
- tags (job categorization)

c) Database Layer:
- SQLite database (as mentioned in README)
- Models from each app

d) API Layer:
- REST API (with Swagger support)
- GraphQL implementation

e) Monitoring & Observability:
- Prometheus
- Grafana dashboards

**[Client Layer]**
- ↓ ↑
**[Web Server (Nginx)]**
- ↓ ↑
**[Application Layer]**
- ↓ ↑
**[Database Layer]**

##### Specific Component Details

a) Client Layer:
- Job Seeker Portal
- Employer Portal
- Admin Interface
- Resume Builder Interface

b) Web Server Layer:
- Nginx configuration (from deployment/nginx)
- Static/media file serving paths

c) Application Layer (Django):
- Accounts Module
- Jobs Module
- Resume Module
- Tags Module
- API Endpoints:
- REST API routes
- GraphQL endpoint
- Authentication flow (including social auth)

d) Database Layer:
- Main models and their relationships:
- User
- Job
- Application
- Resume
- Tags

##### Additional Elements

a) DevOps Components:
- Docker containers (show container relationships from docker-compose)
- Jenkins pipeline
- Monitoring stack (Prometheus/Grafana)

b) Security Layer:
- Authentication flow
- Permissions structure
- API security

##### Important Relationships to Highlight

- User authentication flow
- Job posting and application process
- Resume creation and management
- Search and filtering functionality
- API interactions

##### Specific Implementation Details

- Separation between employee and employer functionalities
- Resume builder feature
- Monitoring stack integration
- Multi-language support structure (locale directory)

This system design should reflect the Django-centric architecture while showing the modern additions like Docker support, monitoring, and API layers that make it a complete production-ready system.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        JSeeker["Job Seeker Portal"]:::frontend
        EPortal["Employer Portal"]:::frontend
        AInterface["Admin Interface"]:::frontend
        RBuilder["Resume Builder"]:::frontend
    end

    subgraph WebServer
        Nginx["Nginx Server"]:::server
        click Nginx "https://github.com/manjurulhoque/django-job-portal/tree/master/deployment/nginx/"
        Static["Static Assets"]:::static
        click Static "https://github.com/manjurulhoque/django-job-portal/tree/master/static/"
    end

    subgraph Application
        subgraph CoreApps
            Accounts["Accounts Module"]:::backend
            click Accounts "https://github.com/manjurulhoque/django-job-portal/tree/master/accounts/"
            Jobs["Jobs Module"]:::backend
            click Jobs "https://github.com/manjurulhoque/django-job-portal/tree/master/jobsapp/"
            Resume["Resume Module"]:::backend
            click Resume "https://github.com/manjurulhoque/django-job-portal/tree/master/resume_cv/"
            Tags["Tags Module"]:::backend
            click Tags "https://github.com/manjurulhoque/django-job-portal/tree/master/tags/"
        end

        subgraph API
            REST["REST API"]:::api
            click REST "https://github.com/manjurulhoque/django-job-portal/tree/master/jobsapp/api/"
            GraphQL["GraphQL"]:::api
            click GraphQL "https://github.com/manjurulhoque/django-job-portal/blob/master/jobs/schema.py"
        end

        subgraph Templates
            JobTemplates["Job Templates"]:::template
            click JobTemplates "https://github.com/manjurulhoque/django-job-portal/tree/master/templates/jobs/"
            AuthTemplates["Auth Templates"]:::template
            click AuthTemplates "https://github.com/manjurulhoque/django-job-portal/tree/master/templates/accounts/"
            ResumeTemplates["Resume Templates"]:::template
            click ResumeTemplates "https://github.com/manjurulhoque/django-job-portal/tree/master/templates/resumes/"
        end
    end

    subgraph Database
        SQLite["SQLite DB"]:::database
        click SQLite "https://github.com/manjurulhoque/django-job-portal/blob/master/db.sqlite3"
        Migrations["Migrations"]:::database
        click Migrations "https://github.com/manjurulhoque/django-job-portal/tree/master/jobsapp/migrations/"
    end

    subgraph Monitoring
        Prometheus["Prometheus"]:::monitoring
        click Prometheus "https://github.com/manjurulhoque/django-job-portal/blob/master/provisioning/prometheus/prometheus.yml"
        Grafana["Grafana"]:::monitoring
        click Grafana "https://github.com/manjurulhoque/django-job-portal/tree/master/provisioning/grafana/dashboards/"
    end

    subgraph DevOps
        Docker["Docker"]:::devops
        click Docker "https://github.com/manjurulhoque/django-job-portal/tree/master/Dockerfile"
        Jenkins["Jenkins"]:::devops
    end

    %% Client to Web Server
    JSeeker --> Nginx
    EPortal --> Nginx
    AInterface --> Nginx
    RBuilder --> Nginx

    %% Web Server to Application
    Nginx --> CoreApps
    Nginx --> Static

    %% Core Apps Relationships
    Accounts --> Jobs
    Jobs --> Resume
    Jobs --> Tags

    %% Template Relationships
    CoreApps --> Templates

    %% API Relationships
    CoreApps --> REST
    CoreApps --> GraphQL

    %% Database Relationships
    CoreApps --> SQLite
    CoreApps --> Migrations

    %% Monitoring Relationships
    Application --> Prometheus
    Prometheus --> Grafana

    %% Style Definitions
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef database fill:#f1c40f,stroke:#f39c12,color:black
    classDef api fill:#e67e22,stroke:#d35400,color:white
    classDef monitoring fill:#9b59b6,stroke:#8e44ad,color:white
    classDef devops fill:#34495e,stroke:#2c3e50,color:white
    classDef server fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef static fill:#1abc9c,stroke:#16a085,color:white
    classDef template fill:#e74c3c,stroke:#c0392b,color:white

    %% Legend
    subgraph Legend
        Frontend["Frontend"]:::frontend
        Backend["Backend"]:::backend
        DB["Database"]:::database
        APIComp["API"]:::api
        Monitor["Monitoring"]:::monitoring
        DevOpsComp["DevOps"]:::devops
        ServerComp["Server"]:::server
        StaticComp["Static"]:::static
        TemplateComp["Template"]:::template
    end
```
