# elhadj1101/employee-support-services architecture

> Architecture diagram of the GitHub repository elhadj1101/employee-support-services, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/elhadj1101/employee-support-services
- Repository: https://github.com/elhadj1101/employee-support-services

## Overview

##### Project type and purpose
- This is a full-stack web application called “Employee Support Services.”
- Purpose: Let employees submit loan or financial-aid requests online, enable committee members to review and approve/refuse/pay, and let the treasurer view analytics.
- Technologies: React frontend, Django + DRF backend, SQL (SQLite by default), local file storage for uploaded documents.

##### File structure
- Top-level directories:
- frontend/ — React SPA, organized into src (components, pages, api, store), public, config files (jsconfig, tailwind)
- backend/ — Django project (“backend” app), apps: authentication, funds_management, meetings, offres, requests
- Backend modules reflect core domains:
- authentication: user and role management, permissions, JWT/session
- requests: request models, documents, workflows
- funds_management: expense/income records, committees, balances
- meetings: meeting scheduling, minutes (PV)
- offres: offers or announcements
- Configuration & tooling:
- backend/settings.py, wsgi.py, asgi.py
- package.json + package-lock.json in both frontend and backend (npm tooling, possibly webpack)
- requirements.txt for Python dependencies
- manage.py for Django CLI

##### README for additional insights
- Describes user roles: employee, committee member, treasurer
- Mentions core flows: request creation + file upload, status tracking, committee actions, treasurer analytics
- Stack summary: React, Django, DRF, SQL

##### Elements
- Clear labels for each component (e.g., “React SPA”, “Auth Service”, “Requests API”)
- From Browser → React → API → DB/File Storage
- Back responses in opposite direction
- Blue rectangles for UI components
- Gray rectangles for backend services
- Parallel stacks for micro-modules within the API layer

##### Detailed breakdown
- Frontend:
- Component layer: LoginForm, Dashboard, RequestsTable, MeetingCalendar, Charts
- API clients: auth.js, requests.js, meetings.js, records.js, offres.js
- State management: store/index.js (Zustand)
- Backend:
- Django project entry: backend/backend/settings.py, urls.py
- Apps:
– authentication: User, Permissions, JWT/session flows
– requests: Request model, Document uploading
– funds_management: Record model, analytics endpoints
– meetings: Meeting model, PV docs
– offres: Offers model
- Shared utils: backend/backend/utils.py, app/utils.py
- Data stores:
- SQL database (tables for employees, requests, records, meetings, offers)
- File storage: /backend/documents/{year}/{id}/docs/*.pdf

## Diagram (Mermaid)

```mermaid
flowchart TB
    Browser["Web Browser"]:::external

    subgraph "Frontend Tier"
        App["React SPA (App.js)"]:::ui
        subgraph "Pages"
            Pages["Pages Directory"]:::ui
        end
        subgraph "Components"
            Components["Components Directory"]:::ui
        end
        Store["Zustand Store"]:::ui
        APIClients["API Clients (axios)"]:::ui
    end

    Browser --> App
    App --> Pages
    App --> Components
    App --> Store
    App --> APIClients
    App -->|"REST calls"| APIGateway

    subgraph "Backend Tier"
        Settings["Django Settings"]:::service
        Manage["Django CLI (manage.py)"]:::service
        APIGateway["DRF API Gateway (urls.py)"]:::service
        subgraph "Services"
            Auth["Authentication Service"]:::service
            Requests["Requests Service"]:::service
            Funds["Funds Mgmt Service"]:::service
            Meetings["Meetings Service"]:::service
            Offers["Offers Service"]:::service
        end
        Utils["Shared Utils"]:::service
    end

    Settings --> APIGateway
    Manage --> APIGateway
    APIGateway --> Auth
    APIGateway --> Requests
    APIGateway --> Funds
    APIGateway --> Meetings
    APIGateway --> Offers

    Auth --> Utils
    Requests --> Utils
    Funds --> Utils
    Meetings --> Utils
    Offers --> Utils

    subgraph "Persistence"
        Database["SQL Database (db.sqlite3)"]:::database
        FileStorage["File Storage (Documents)"]:::storage
    end

    Auth -->|"DB queries"| Database
    Requests -->|"DB CRUD"| Database
    Funds -->|"DB queries & analytics"| Database
    Meetings -->|"DB CRUD"| Database
    Offers -->|"DB CRUD"| Database
    Requests -->|"store/retrieve docs"| FileStorage

    classDef ui fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef service fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef database fill:#90EE90,stroke:#333,stroke-width:1px
    classDef storage fill:#F0E68C,stroke:#333,stroke-width:1px
    classDef external fill:#E0E0E0,stroke:#333,stroke-width:1px

    click App "https://github.com/elhadj1101/employee-support-services/blob/main/frontend/src/App.js"
    click Pages "https://github.com/elhadj1101/employee-support-services/tree/main/frontend/src/pages"
    click Components "https://github.com/elhadj1101/employee-support-services/tree/main/frontend/src/components"
    click Store "https://github.com/elhadj1101/employee-support-services/blob/main/frontend/src/store/index.js"
    click APIClients "https://github.com/elhadj1101/employee-support-services/tree/main/frontend/src/api"
    click Settings "https://github.com/elhadj1101/employee-support-services/blob/main/backend/backend/settings.py"
    click Manage "https://github.com/elhadj1101/employee-support-services/blob/main/backend/manage.py"
    click APIGateway "https://github.com/elhadj1101/employee-support-services/blob/main/backend/backend/urls.py"
    click Auth "https://github.com/elhadj1101/employee-support-services/tree/main/backend/authentication"
    click Requests "https://github.com/elhadj1101/employee-support-services/tree/main/backend/requests"
    click Funds "https://github.com/elhadj1101/employee-support-services/tree/main/backend/funds_management"
    click Meetings "https://github.com/elhadj1101/employee-support-services/tree/main/backend/meetings"
    click Offers "https://github.com/elhadj1101/employee-support-services/tree/main/backend/offres"
    click Utils "https://github.com/elhadj1101/employee-support-services/blob/main/backend/backend/utils.py"
    click FileStorage "https://github.com/elhadj1101/employee-support-services/tree/main/backend/documents"
    click Database "https://github.com/elhadj1101/employee-support-services/blob/main/backend/db.sqlite3"
```
