# poojasree-b/intelligent-allocator architecture

> Architecture diagram of the GitHub repository poojasree-b/intelligent-allocator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/poojasree-b/intelligent-allocator
- Repository: https://github.com/poojasree-b/intelligent-allocator

## Overview

Intelligent Allocator is a workforce-allocation platform: employers describe projects, rank suitable employees, and send requests; employees accept or decline, then follow plans and log hours. The backend owns authorization, allocation capacity checks, and persistent state, while a separate recommender supplies rankings. The graph follows the documented workflow and major capabilities; detailed internal calls are not shown for most unsampled modules, so edges rely on README statements or the supplied excerpts rather than assumed wiring.

Main entry points: [`frontend/src/api/client.js`](https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/api/client.js) (API client), [`backend/src/main/java/com/intelligentallocator/service/AllocationService.java`](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/AllocationService.java) (Allocation decisions), [`backend/src/main/java/com/intelligentallocator/repository/AllocationRepository.java`](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/repository/AllocationRepository.java) (MySQL data), [`frontend/src/App.jsx`](https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/App.jsx) (Role-based workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_webapp["Role-based workspace<br/>[App.jsx]"]
  node_webclient["API client<br/>[client.js]"]
  node_projectui["Project posting"]
  node_candidateui["Candidate views<br/>[TalentPage.jsx]"]
  node_employeeui["Employee workspace<br/>[RequestsPage.jsx]"]
  node_planui["Plan workspace<br/>[PlanPage.jsx]"]
end

subgraph group_api["Allocation API"]
  node_projectapi["Project API"]
  node_matchingapi["Ranking API"]
  node_allocation["Allocation decisions"]
  node_profile["Employee profile"]
  node_documents["Document skills"]
  node_auth["Authentication<br/>[AuthService.java]"]
  node_mail["Mail service<br/>[MailService.java]"]
end

subgraph group_matching["Candidate matching"]
  node_rankerclient["Ranker integration<br/>[RankerClient.java]"]
  node_fallback["Fallback ranking"]
  node_rankerservice["Ranking service<br/>[app.py]"]
  node_rankmodel["Scoring model<br/>[model.py]"]
end

subgraph group_work["Employee work"]
  node_plan["Project planning<br/>[PlanService.java]"]
  node_weekly["Weekly goals"]
end

subgraph group_state["Persistent state"]
  node_database[("MySQL data")]
  node_audit["Audit trail<br/>[AuditService.java]"]
  node_catalog["Skill catalogue"]
end

node_employer(("Employer"))
node_employee(("Employee"))

node_employer -->|"uses"| node_webapp
node_employee -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_projectui
node_webapp -->|"routes to"| node_candidateui
node_webapp -->|"routes to"| node_employeeui
node_webapp -->|"routes to"| node_planui
node_projectui -.->|"submits through"| node_webclient
node_candidateui -.->|"requests through"| node_webclient
node_employeeui -.->|"requests through"| node_webclient
node_planui -.->|"requests through"| node_webclient
node_webclient -->|"calls API"| node_projectapi
node_webclient -->|"calls API"| node_matchingapi
node_webclient -->|"calls API"| node_allocation
node_webclient -->|"calls API"| node_plan
node_projectapi -->|"persists projects"| node_database
node_matchingapi -.->|"requests ranking"| node_rankerclient
node_allocation -->|"gets ranking"| node_rankerclient
node_rankerclient -->|"HTTP ranking"| node_rankerservice
node_rankerservice -->|"scores candidates"| node_rankmodel
node_rankerclient -->|"falls back"| node_fallback
node_allocation -->|"checks capacity"| node_database
node_allocation -->|"sends request"| node_employee
node_employee -->|"accepts or declines"| node_allocation
node_allocation -->|"creates plan"| node_plan
node_plan -->|"stores plan"| node_database
node_plan -.->|"plans work weeks"| node_weekly
node_employee -->|"logs hours"| node_plan
node_profile -.->|"stores profile"| node_database
node_documents -.->|"stores documents"| node_database
node_employeeui -.->|"manages skills"| node_profile
node_employeeui -.->|"uploads documents"| node_documents
node_auth -.->|"stores accounts"| node_database
node_auth -.->|"sends reset mail"| node_mail
node_allocation -.->|"records actions"| node_audit
node_catalog -.->|"loads catalogue"| node_database

click node_webapp "https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/App.jsx"
click node_webclient "https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/api/client.js"
click node_projectui "https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/pages/employer/ProblemFormPage.jsx"
click node_candidateui "https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/pages/employer/TalentPage.jsx"
click node_employeeui "https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/pages/employee/RequestsPage.jsx"
click node_planui "https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/pages/PlanPage.jsx"
click node_projectapi "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/web/EmployerController.java"
click node_matchingapi "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/web/RankingController.java"
click node_allocation "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/AllocationService.java"
click node_profile "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/EmployeeProfileService.java"
click node_documents "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/DocumentService.java"
click node_auth "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/AuthService.java"
click node_plan "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/PlanService.java"
click node_weekly "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/WeeklyGoalService.java"
click node_rankerclient "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/matching/RankerClient.java"
click node_fallback "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/matching/FallbackRanker.java"
click node_rankerservice "https://github.com/poojasree-b/intelligent-allocator/blob/main/recommender/app.py"
click node_rankmodel "https://github.com/poojasree-b/intelligent-allocator/blob/main/recommender/ranker/model.py"
click node_database "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/repository/AllocationRepository.java"
click node_audit "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/AuditService.java"
click node_catalog "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/catalog/CatalogBootstrap.java"
click node_mail "https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/MailService.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_webclient,node_projectui,node_candidateui,node_employeeui,node_planui toneBlue
class node_projectapi,node_matchingapi,node_allocation,node_profile,node_documents,node_auth,node_mail toneAmber
class node_rankerclient,node_fallback,node_rankerservice,node_rankmodel toneMint
class node_plan,node_weekly toneRose
class node_database,node_audit,node_catalog,node_employer,node_employee toneIndigo
```

## Components

### Web application

- [Role-based workspace](https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`
- [Project posting](https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/pages/employer/ProblemFormPage.jsx): `frontend/src/pages/employer/ProblemFormPage.jsx`
- [Candidate views](https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/pages/employer/TalentPage.jsx): `frontend/src/pages/employer/TalentPage.jsx`
- [Employee workspace](https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/pages/employee/RequestsPage.jsx): `frontend/src/pages/employee/RequestsPage.jsx`
- [Plan workspace](https://github.com/poojasree-b/intelligent-allocator/blob/main/frontend/src/pages/PlanPage.jsx): `frontend/src/pages/PlanPage.jsx`

### Allocation API

- [Project API](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/web/EmployerController.java): `backend/src/main/java/com/intelligentallocator/web/EmployerController.java`
- [Ranking API](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/web/RankingController.java): `backend/src/main/java/com/intelligentallocator/web/RankingController.java`
- [Allocation decisions](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/AllocationService.java): `backend/src/main/java/com/intelligentallocator/service/AllocationService.java`
- [Employee profile](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/EmployeeProfileService.java): `backend/src/main/java/com/intelligentallocator/service/EmployeeProfileService.java`
- [Document skills](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/DocumentService.java): `backend/src/main/java/com/intelligentallocator/service/DocumentService.java`
- [Authentication](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/AuthService.java): `backend/src/main/java/com/intelligentallocator/service/AuthService.java`
- [Mail service](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/MailService.java): `backend/src/main/java/com/intelligentallocator/service/MailService.java`

### Candidate matching

- [Ranker integration](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/matching/RankerClient.java): `backend/src/main/java/com/intelligentallocator/matching/RankerClient.java`
- [Fallback ranking](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/matching/FallbackRanker.java): `backend/src/main/java/com/intelligentallocator/matching/FallbackRanker.java`
- [Ranking service](https://github.com/poojasree-b/intelligent-allocator/blob/main/recommender/app.py): `recommender/app.py`
- [Scoring model](https://github.com/poojasree-b/intelligent-allocator/blob/main/recommender/ranker/model.py): `recommender/ranker/model.py`

### Employee work

- [Project planning](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/PlanService.java): `backend/src/main/java/com/intelligentallocator/service/PlanService.java`
- [Weekly goals](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/WeeklyGoalService.java): `backend/src/main/java/com/intelligentallocator/service/WeeklyGoalService.java`

### Persistent state

- [MySQL data](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/repository/AllocationRepository.java): `backend/src/main/java/com/intelligentallocator/repository/AllocationRepository.java`
- [Audit trail](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/service/AuditService.java): `backend/src/main/java/com/intelligentallocator/service/AuditService.java`
- [Skill catalogue](https://github.com/poojasree-b/intelligent-allocator/blob/main/backend/src/main/java/com/intelligentallocator/catalog/CatalogBootstrap.java): `backend/src/main/java/com/intelligentallocator/catalog/CatalogBootstrap.java`

### Other components

- **Employer**
- **Employee**

## Connections

- Employer → Role-based workspace: uses (evidence: `frontend/src/App.jsx`)
- Employee → Role-based workspace: uses (evidence: `frontend/src/App.jsx`)
- Role-based workspace → Project posting: routes to (evidence: `frontend/src/App.jsx`)
- Role-based workspace → Candidate views: routes to (evidence: `frontend/src/App.jsx`)
- Role-based workspace → Employee workspace: routes to (evidence: `frontend/src/App.jsx`)
- Role-based workspace → Plan workspace: routes to (evidence: `frontend/src/App.jsx`)
- Project posting → API client: submits through
- Candidate views → API client: requests through
- Employee workspace → API client: requests through
- Plan workspace → API client: requests through
- API client → Project API: calls API (evidence: `README.md`)
- API client → Ranking API: calls API (evidence: `README.md`)
- API client → Allocation decisions: calls API (evidence: `README.md`)
- API client → Project planning: calls API (evidence: `README.md`)
- Project API → MySQL data: persists projects (evidence: `README.md`)
- Ranking API → Ranker integration: requests ranking
- Allocation decisions → Ranker integration: gets ranking (evidence: `backend/src/main/java/com/intelligentallocator/service/AllocationService.java`)
- Ranker integration → Ranking service: HTTP ranking (evidence: `README.md`)
- Ranking service → Scoring model: scores candidates (evidence: `recommender/app.py`)
- Ranker integration → Fallback ranking: falls back (evidence: `README.md`)
- Allocation decisions → MySQL data: checks capacity (evidence: `README.md`)
- Allocation decisions → Employee: sends request (evidence: `README.md`)
- Employee → Allocation decisions: accepts or declines (evidence: `README.md`)
- Allocation decisions → Project planning: creates plan (evidence: `README.md`)
- Project planning → MySQL data: stores plan (evidence: `README.md`)
- Project planning → Weekly goals: plans work weeks
- Employee → Project planning: logs hours (evidence: `README.md`)
- Employee profile → MySQL data: stores profile
- Document skills → MySQL data: stores documents
- Employee workspace → Employee profile: manages skills
- Employee workspace → Document skills: uploads documents
- Authentication → MySQL data: stores accounts
- Authentication → Mail service: sends reset mail (evidence: `backend/src/main/java/com/intelligentallocator/service/AuthService.java`)
- Allocation decisions → Audit trail: records actions (evidence: `backend/src/main/java/com/intelligentallocator/service/AllocationService.java`)
- Skill catalogue → MySQL data: loads catalogue
