# samiulislamsharan/jobsphere architecture

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

- Interactive diagram: https://gitdiagram.com/samiulislamsharan/jobsphere
- Repository: https://github.com/samiulislamsharan/jobsphere

## Overview

##### Main Components Identification
The system should be represented with these key components:

a) Client Layer:
- Web Interface (Public Portal)
- Admin Dashboard
- Authentication System

b) Application Layer:
- Controllers (Admin & Front-end)
- Models
- Mail System
- Middleware

c) Data Layer:
- MySQL Database
- File Storage (for profile pictures)

##### Detailed Component Breakdown

- Public Portal Views (/resources/views/front)
- Home
- Jobs Listing
- Job Details
- Account Management
- Admin Dashboard Views (/resources/views/admin)
- Categories Management
- Jobs Management
- User Management
- Applications Management

- Controllers
- Public Controllers (HomeController, JobsController)
- Admin Controllers (CategoryController, JobController, etc.)
- Authentication Controller
- Models
- User
- Job
- Category
- JobApplication
- SavedJob
- JobType

- Mail Services
- Email Verification
- Job Notification
- Password Reset
- Authentication Services
- File Storage Service

- Users Table
- Jobs Table
- Categories Table
- Job Applications Table
- Saved Jobs Table
- Job Types Table

##### Relationship Flows

- User request flow
- Data flow between components
- Authentication flow
- Email notification flow

**[Client Layer]**
- ↕
**[Application Layer]**
- ↕
**[Service Layer]**
- ↕
**[Data Layer]**

##### Component Relationships

Relationships:
- One-to-Many: User → Jobs
- Many-to-Many: Users ↔ SavedJobs
- One-to-Many: Category → Jobs
- One-to-Many: Job → JobApplications

##### Technical Details

- Laravel 10 Framework
- MySQL Database
- SMTP Email Service
- File Storage System

##### Additional Notes

- Keep the main flow clear and visible
- Important middleware points
- Security boundaries
- Public vs. protected routes

Remember to include the key features mentioned in the README:
- Job listings with search
- User authentication
- Application submissions
- Admin management
- Email notifications

This will create a comprehensive yet clear system design that accurately represents the JobSphere application architecture.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client
        WI["Web Interface"]
        AD["Admin Dashboard"]:::admin
        click AD "https://github.com/samiulislamsharan/JobSphere/tree/main/resources/views/admin"
        AS["Authentication System"]:::auth
        click AS "https://github.com/samiulislamsharan/JobSphere/blob/main/app/Http/Controllers/AuthController.php"
    end

    subgraph Application
        direction TB
        subgraph Controllers
            PC["Public Controllers"]:::controller
            click PC "https://github.com/samiulislamsharan/JobSphere/blob/main/app/Http/Controllers/JobsController.php"
            AC["Admin Controllers"]:::controller
            click AC "https://github.com/samiulislamsharan/JobSphere/tree/main/app/Http/Controllers/Admin"
            AuthC["Auth Controller"]:::controller
            AccC["Account Controller"]:::controller
            click AccC "https://github.com/samiulislamsharan/JobSphere/blob/main/app/Http/Controllers/AccountController.php"
            DashC["Dashboard Controller"]:::controller
            click DashC "https://github.com/samiulislamsharan/JobSphere/blob/main/app/Http/Controllers/Admin/DashboardController.php"
            AppC["Applications Controller"]:::controller
            click AppC "https://github.com/samiulislamsharan/JobSphere/blob/main/app/Http/Controllers/Admin/JobApplicationController.php"
        end

        subgraph Models
            UM["User Model"]:::model
            JM["Job Model"]:::model
            CM["Category Model"]:::model
            AM["Application Model"]:::model
            SM["SavedJob Model"]:::model
            TM["JobType Model"]:::model
            click UM "https://github.com/samiulislamsharan/JobSphere/tree/main/app/Models"
            click JM "https://github.com/samiulislamsharan/JobSphere/tree/main/app/Models"
            click CM "https://github.com/samiulislamsharan/JobSphere/tree/main/app/Models"
            click AM "https://github.com/samiulislamsharan/JobSphere/tree/main/app/Models"
            click SM "https://github.com/samiulislamsharan/JobSphere/tree/main/app/Models"
            click TM "https://github.com/samiulislamsharan/JobSphere/tree/main/app/Models"
        end

        subgraph Middleware
            AuthMW["Auth Middleware"]:::middleware
            AdminMW["Admin Middleware"]:::middleware
            click AuthMW "https://github.com/samiulislamsharan/JobSphere/blob/main/app/Http/Middleware/Authenticate.php"
            click AdminMW "https://github.com/samiulislamsharan/JobSphere/blob/main/app/Http/Middleware/Admin.php"
        end
    end

    subgraph Services
        MS["Mail Service"]:::service
        click MS "https://github.com/samiulislamsharan/JobSphere/tree/main/app/Mail"
        FS["File Storage Service"]:::service
        click FS "https://github.com/samiulislamsharan/JobSphere/tree/main/public/profile_picture"
        AS2["Auth Service"]:::service
    end

    subgraph Views
        PV["Public Views"]:::view
        click PV "https://github.com/samiulislamsharan/JobSphere/tree/main/resources/views/front"
        AV["Admin Views"]:::view
        click AV "https://github.com/samiulislamsharan/JobSphere/tree/main/resources/views/admin"
        EV["Email Templates"]:::view
        click EV "https://github.com/samiulislamsharan/JobSphere/tree/main/resources/views/email"
        JV["Job Management Views"]:::view
        click JV "https://github.com/samiulislamsharan/JobSphere/tree/main/resources/views/front/account/job"
        LV["Layout Views"]:::view
        click LV "https://github.com/samiulislamsharan/JobSphere/tree/main/resources/views/front/layouts"
    end

    subgraph Database
        DB[(MySQL Database)]:::database
        click DB "https://github.com/samiulislamsharan/JobSphere/tree/main/database/migrations"
        Schema["Database Schema"]:::database
        click Schema "https://github.com/samiulislamsharan/JobSphere/blob/main/database/schema/job-sphere-db.sql"
    end

    %% Relationships
    Client --> Controllers
    Controllers --> Models
    Controllers --> Services
    Models --> DB
    Services --> DB
    Controllers --> Views
    Middleware --> Controllers

    %% Styles
    classDef controller fill:#90EE90
    classDef model fill:#98FB98
    classDef service fill:#FFD700
    classDef database fill:#DDA0DD
    classDef view fill:#87CEEB
    classDef middleware fill:#F0E68C
    classDef admin fill:#FFB6C1
    classDef auth fill:#20B2AA

    %% Legend
    subgraph Legend
        L1[Controller]:::controller
        L2[Model]:::model
        L3[Service]:::service
        L4[Database]:::database
        L5[View]:::view
        L6[Middleware]:::middleware
        L7[Admin]:::admin
        L8[Auth]:::auth
    end
```
