# thanusree7744/worklink-ai architecture

> Architecture diagram of the GitHub repository thanusree7744/worklink-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thanusree7744/worklink-ai
- Repository: https://github.com/thanusree7744/worklink-ai

## Overview

WorkLink AI is a two-sided labor marketplace: customers post jobs and find workers, while workers discover jobs, apply, and manage their profiles. The frontend also exposes recommendations, reviews, messaging, and administrator views; the backend provides corresponding API areas and persists marketplace records. The graph follows documented route registration and sampled imports/calls. Several router implementations and frontend pages were not sampled, so their internal behavior and specific frontend-to-backend HTTP links are not asserted.

Main entry points: [`backend/app/main.py`](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/main.py) (API application), [`frontend/src/app/routes.tsx`](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/routes.tsx) (Role-based routes), [`backend/app/crud.py`](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/crud.py) (Marketplace operations), [`backend/app/seed_db.py`](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/seed_db.py) (Demo data seeding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Marketplace frontend"]
  node_app["App entry<br/>[App.tsx]"]
  node_routes["Role-based routes<br/>[routes.tsx]"]
  node_authguard["Auth guard<br/>[RequireAuth.tsx]"]
  node_authstate["Auth state<br/>[AuthContext.tsx]"]
  node_clientapi["HTTP client<br/>[api.ts]"]
  node_workerseek["Worker discovery"]
  node_workerprofile["Worker profiles"]
  node_workerdash["Worker dashboard"]
  node_recommendations["AI recommendations"]
  node_reviews["Reviews<br/>[ReviewsPage.tsx]"]
  node_customerjobs["Customer job flows<br/>[JobPostingPage.tsx]"]
  node_admin["Administration<br/>[AdminDashboard.tsx]"]
end

subgraph group_api["Backend API"]
  node_shell["API application<br/>[main.py]"]
  node_authroutes["Authentication API<br/>[auth.py]"]
  node_jobroutes["Jobs API<br/>[jobs.py]"]
  node_workerroutes["Workers API<br/>[workers.py]"]
  node_recroutes["Recommendations API<br/>[recommendations.py]"]
  node_reviewroutes["Reviews API<br/>[reviews.py]"]
  node_uploadroutes["Uploads API<br/>[uploads.py]"]
  node_userroutes["Users API<br/>[users.py]"]
end

subgraph group_domain["Backend domain and persistence"]
  node_dependencies["Auth dependencies<br/>[deps.py]"]
  node_crud["Marketplace operations<br/>[crud.py]"]
  node_security["Token and passwords<br/>[security.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
  node_models["Marketplace records<br/>[models.py]"]
  node_session["Database session<br/>[session.py]"]
  node_config["Runtime settings<br/>[config.py]"]
  node_seed["Demo data seeding<br/>[seed_db.py]"]
end

node_visitor(("Marketplace user"))

node_visitor -->|"uses"| node_app
node_app -->|"loads routes"| node_routes
node_app -->|"provides auth"| node_authstate
node_routes -->|"guards pages"| node_authguard
node_authguard -->|"checks identity"| node_authstate
node_authstate -->|"uses"| node_clientapi
node_routes -->|"routes to"| node_workerseek
node_routes -->|"routes to"| node_workerprofile
node_routes -->|"routes to"| node_workerdash
node_routes -->|"routes to"| node_recommendations
node_routes -->|"routes to"| node_reviews
node_routes -->|"routes to"| node_customerjobs
node_routes -->|"routes to"| node_admin
node_workerseek -->|"renders cards"| node_workerprofile
node_workerseek -->|"imports client"| node_clientapi
node_workerprofile -->|"imports client"| node_clientapi
node_workerdash -->|"uses client"| node_clientapi
node_shell -->|"registers"| node_authroutes
node_shell -->|"registers"| node_userroutes
node_shell -->|"registers"| node_jobroutes
node_shell -->|"registers"| node_workerroutes
node_shell -->|"registers"| node_recroutes
node_shell -->|"registers"| node_uploadroutes
node_shell -->|"registers"| node_reviewroutes
node_shell -->|"seeds on startup"| node_seed
node_shell -->|"creates tables"| node_session
node_shell -->|"loads metadata"| node_models
node_authroutes -->|"calls operations"| node_crud
node_jobroutes -->|"calls operations"| node_crud
node_workerroutes -->|"calls operations"| node_crud
node_reviewroutes -->|"calls operations"| node_crud
node_dependencies -->|"decodes token"| node_security
node_dependencies -->|"loads user"| node_crud
node_crud -->|"queries and writes"| node_models
node_crud -->|"accepts inputs"| node_schemas
node_crud -->|"hashes passwords"| node_security
node_session -->|"reads settings"| node_config
node_security -->|"reads settings"| node_config
node_seed -->|"imports session"| node_session
node_seed -->|"uses records"| node_models
node_seed -->|"uses password hashing"| node_security

click node_app "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/App.tsx"
click node_routes "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/routes.tsx"
click node_authguard "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/components/RequireAuth.tsx"
click node_authstate "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/contexts/AuthContext.tsx"
click node_clientapi "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/services/api.ts"
click node_workerseek "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/WorkerSearchPage.tsx"
click node_workerprofile "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/WorkerProfilePage.tsx"
click node_workerdash "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/WorkerDashboard.tsx"
click node_recommendations "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/AIRecommendationsPage.tsx"
click node_reviews "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/ReviewsPage.tsx"
click node_customerjobs "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/JobPostingPage.tsx"
click node_admin "https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/AdminDashboard.tsx"
click node_shell "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/main.py"
click node_authroutes "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/auth.py"
click node_jobroutes "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/jobs.py"
click node_workerroutes "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/workers.py"
click node_recroutes "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/recommendations.py"
click node_reviewroutes "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/reviews.py"
click node_uploadroutes "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/uploads.py"
click node_userroutes "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/users.py"
click node_dependencies "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/deps.py"
click node_crud "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/crud.py"
click node_security "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/core/security.py"
click node_schemas "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/schemas.py"
click node_models "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/models.py"
click node_session "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/db/session.py"
click node_config "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/core/config.py"
click node_seed "https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/seed_db.py"

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_app,node_routes,node_authguard,node_authstate,node_clientapi,node_workerseek,node_workerprofile,node_workerdash,node_recommendations,node_reviews,node_customerjobs,node_admin,node_visitor toneBlue
class node_shell,node_authroutes,node_jobroutes,node_workerroutes,node_recroutes,node_reviewroutes,node_uploadroutes,node_userroutes toneAmber
class node_dependencies,node_crud,node_security,node_schemas,node_models,node_session,node_config,node_seed toneMint
```

## Components

### Marketplace frontend

- [App entry](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Role-based routes](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/routes.tsx): `frontend/src/app/routes.tsx`
- [Auth guard](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/components/RequireAuth.tsx): `frontend/src/app/components/RequireAuth.tsx`
- [Auth state](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/contexts/AuthContext.tsx): `frontend/src/app/contexts/AuthContext.tsx`
- [HTTP client](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/services/api.ts): `frontend/src/app/services/api.ts`
- [Worker discovery](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/WorkerSearchPage.tsx): `frontend/src/app/pages/WorkerSearchPage.tsx`
- [Worker profiles](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/WorkerProfilePage.tsx): `frontend/src/app/pages/WorkerProfilePage.tsx`
- [Worker dashboard](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/WorkerDashboard.tsx): `frontend/src/app/pages/WorkerDashboard.tsx`
- [AI recommendations](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/AIRecommendationsPage.tsx): `frontend/src/app/pages/AIRecommendationsPage.tsx`
- [Reviews](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/ReviewsPage.tsx): `frontend/src/app/pages/ReviewsPage.tsx`
- [Customer job flows](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/JobPostingPage.tsx): `frontend/src/app/pages/JobPostingPage.tsx`
- [Administration](https://github.com/thanusree7744/worklink-ai/blob/main/frontend/src/app/pages/AdminDashboard.tsx): `frontend/src/app/pages/AdminDashboard.tsx`

### Backend API

- [API application](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication API](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/auth.py): `backend/app/api/routers/auth.py`
- [Jobs API](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/jobs.py): `backend/app/api/routers/jobs.py`
- [Workers API](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/workers.py): `backend/app/api/routers/workers.py`
- [Recommendations API](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/recommendations.py): `backend/app/api/routers/recommendations.py`
- [Reviews API](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/reviews.py): `backend/app/api/routers/reviews.py`
- [Uploads API](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/uploads.py): `backend/app/api/routers/uploads.py`
- [Users API](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/routers/users.py): `backend/app/api/routers/users.py`

### Backend domain and persistence

- [Auth dependencies](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/api/deps.py): `backend/app/api/deps.py`
- [Marketplace operations](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/crud.py): `backend/app/crud.py`
- [Token and passwords](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [API schemas](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/schemas.py): `backend/app/schemas.py`
- [Marketplace records](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/models.py): `backend/app/models.py`
- [Database session](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/db/session.py): `backend/app/db/session.py`
- [Runtime settings](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/core/config.py): `backend/app/core/config.py`
- [Demo data seeding](https://github.com/thanusree7744/worklink-ai/blob/main/backend/app/seed_db.py): `backend/app/seed_db.py`

### Other components

- **Marketplace user**

## Connections

- Marketplace user → App entry: uses
- App entry → Role-based routes: loads routes (evidence: `frontend/src/app/App.tsx`)
- App entry → Auth state: provides auth (evidence: `frontend/src/app/App.tsx`)
- Role-based routes → Auth guard: guards pages (evidence: `frontend/src/app/routes.tsx`)
- Auth guard → Auth state: checks identity (evidence: `frontend/src/app/components/RequireAuth.tsx`)
- Auth state → HTTP client: uses (evidence: `frontend/src/app/contexts/AuthContext.tsx`)
- Role-based routes → Worker discovery: routes to (evidence: `frontend/src/app/routes.tsx`)
- Role-based routes → Worker profiles: routes to (evidence: `frontend/src/app/routes.tsx`)
- Role-based routes → Worker dashboard: routes to (evidence: `frontend/src/app/routes.tsx`)
- Role-based routes → AI recommendations: routes to (evidence: `frontend/src/app/routes.tsx`)
- Role-based routes → Reviews: routes to (evidence: `frontend/src/app/routes.tsx`)
- Role-based routes → Customer job flows: routes to (evidence: `frontend/src/app/routes.tsx`)
- Role-based routes → Administration: routes to (evidence: `frontend/src/app/routes.tsx`)
- Worker discovery → Worker profiles: renders cards (evidence: `frontend/src/app/pages/WorkerSearchPage.tsx`)
- Worker discovery → HTTP client: imports client (evidence: `frontend/src/app/pages/WorkerSearchPage.tsx`)
- Worker profiles → HTTP client: imports client (evidence: `frontend/src/app/pages/WorkerProfilePage.tsx`)
- Worker dashboard → HTTP client: uses client (evidence: `frontend/src/app/pages/WorkerDashboard.tsx`)
- API application → Authentication API: registers (evidence: `backend/app/main.py`)
- API application → Users API: registers (evidence: `backend/app/main.py`)
- API application → Jobs API: registers (evidence: `backend/app/main.py`)
- API application → Workers API: registers (evidence: `backend/app/main.py`)
- API application → Recommendations API: registers (evidence: `backend/app/main.py`)
- API application → Uploads API: registers (evidence: `backend/app/main.py`)
- API application → Reviews API: registers (evidence: `backend/app/main.py`)
- API application → Demo data seeding: seeds on startup (evidence: `backend/app/main.py`)
- API application → Database session: creates tables (evidence: `backend/app/main.py`)
- API application → Marketplace records: loads metadata (evidence: `backend/app/main.py`)
- Authentication API → Marketplace operations: calls operations (evidence: `backend/app/api/routers/auth.py`)
- Jobs API → Marketplace operations: calls operations (evidence: `backend/app/api/routers/jobs.py`)
- Workers API → Marketplace operations: calls operations (evidence: `backend/app/api/routers/workers.py`)
- Reviews API → Marketplace operations: calls operations (evidence: `backend/app/api/routers/reviews.py`)
- Auth dependencies → Token and passwords: decodes token (evidence: `backend/app/api/deps.py`)
- Auth dependencies → Marketplace operations: loads user (evidence: `backend/app/api/deps.py`)
- Marketplace operations → Marketplace records: queries and writes (evidence: `backend/app/crud.py`)
- Marketplace operations → API schemas: accepts inputs (evidence: `backend/app/crud.py`)
- Marketplace operations → Token and passwords: hashes passwords (evidence: `backend/app/crud.py`)
- Database session → Runtime settings: reads settings (evidence: `backend/app/db/session.py`)
- Token and passwords → Runtime settings: reads settings (evidence: `backend/app/core/security.py`)
- Demo data seeding → Database session: imports session (evidence: `backend/app/seed_db.py`)
- Demo data seeding → Marketplace records: uses records (evidence: `backend/app/seed_db.py`)
- Demo data seeding → Token and passwords: uses password hashing (evidence: `backend/app/seed_db.py`)
