# patadesujal/labourline architecture

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

- Interactive diagram: https://gitdiagram.com/patadesujal/labourline
- Repository: https://github.com/patadesujal/labourline

## Overview

LabourLine connects employers posting local work with workers discovering, bidding on, and accepting it. The worker workflow runs from browsing nearby open work through job details and bidding; the employer workflow covers posting work and reviewing bids. The backend exposes these operations through controllers, services, and repositories over persisted user, work, bid, and acceptance records. The source index and excerpts support several frontend-to-store and backend call paths; frontend-to-backend HTTP wiring and some unsampled features are not confirmed, so those links are omitted or marked unverified.

Main entry points: [`front-end/app/(worker)/WorkScreen.js`](https://github.com/patadesujal/labourline/blob/main/front-end/app/(worker)/WorkScreen.js) (Worker work feed), [`backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java`](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java) (Work endpoints), [`backend/src/main/java/com/LabourLine/LabourLine/service/LabourService.java`](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/service/LabourService.java) (Worker workflows), [`front-end/app/(employer)/PostNewWorkScreen.js`](https://github.com/patadesujal/labourline/blob/main/front-end/app/(employer)/PostNewWorkScreen.js) (Post work)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile app"]
  node_role["Entry and roles"]
  node_signup["Registration and login"]
  node_work_client["Worker work feed<br/>[WorkScreen.js]"]
  node_job_views["Job cards and details<br/>[JobCard.js]"]
  node_bid_modal["Bidding interface<br/>[BiddingModal.js]"]
  node_employer_post["Post work"]
  node_employer_status["Posted work status"]
  node_bid_views["Review bids<br/>[ViewBidsScreen.js]"]
  node_work_data["Work data state<br/>[WorkData.js]"]
  node_work_service["Work API client<br/>[workService.js]"]
  node_location["Location utilities<br/>[locationUtils.js]"]
end

subgraph group_identity["Accounts and profiles"]
  node_auth_api["Authentication API"]
  node_auth_service["Authentication service<br/>[AuthService.java]"]
  node_jwt["JWT utilities<br/>[JwtUtils.java]"]
  node_profile_api["User profiles"]
end

subgraph group_marketplace["Work marketplace"]
  node_work_api["Work endpoints"]
  node_labour_api["Worker endpoints"]
  node_employer_api["Employer endpoints"]
  node_labour_service["Worker workflows<br/>[LabourService.java]"]
  node_employer_service["Bid management"]
end

subgraph group_persistence["Backend persistence"]
  node_work_store[("Work records<br/>[Work.java]")]
  node_bid_store[("Bid records<br/>[Bid.java]")]
  node_user_store[("User and profiles<br/>[User.java]")]
  node_work_repo["Work repository"]
  node_bid_repo["Bid repository<br/>[BidRepository.java]"]
  node_accepted_repo["Accepted work repository"]
end

node_user(("Employer or worker"))

node_user -->|"chooses role"| node_role
node_user -.->|"registers or logs in"| node_signup
node_work_client -->|"renders"| node_job_views
node_work_client -.->|"opens bidding"| node_bid_modal
node_work_client -->|"uses state"| node_work_data
node_work_client -->|"uses API client"| node_work_service
node_work_client -->|"uses location"| node_location
node_job_views -->|"uses distance helpers"| node_location
node_employer_post -->|"uses state"| node_work_data
node_employer_post -->|"uses location"| node_location
node_signup -.->|"submits credentials"| node_auth_api
node_auth_api -.->|"delegates auth"| node_auth_service
node_auth_service -->|"loads and saves users"| node_user_store
node_auth_service -->|"generates token"| node_jwt
node_profile_api -->|"reads profiles"| node_user_store
node_work_api -->|"reads and writes work"| node_work_repo
node_work_api -->|"loads employer or worker"| node_user_store
node_work_api -->|"records acceptance"| node_accepted_repo
node_labour_api -->|"delegates worker operations"| node_labour_service
node_labour_service -->|"loads work"| node_work_repo
node_labour_service -->|"saves bids"| node_bid_repo
node_employer_api -->|"delegates bid operations"| node_employer_service
node_employer_service -->|"loads work"| node_work_repo
node_employer_service -->|"reads and updates bids"| node_bid_repo
node_work_api -.->|"persists work"| node_work_store
node_labour_service -.->|"creates bid records"| node_bid_store
node_work_client -.->|"requests work"| node_work_api
node_employer_post -.->|"submits work"| node_work_api
node_bid_views -.->|"requests bid review"| node_employer_api

click node_role "https://github.com/patadesujal/labourline/blob/main/front-end/app/src/screens/ChooseRoleScreen.js"
click node_signup "https://github.com/patadesujal/labourline/blob/main/front-end/app/src/screens/CreateAccountScreen.js"
click node_auth_api "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/AuthenticationController.java"
click node_auth_service "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/service/AuthService.java"
click node_jwt "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/utils/JwtUtils.java"
click node_profile_api "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/UserController.java"
click node_work_client "https://github.com/patadesujal/labourline/blob/main/front-end/app/(worker)/WorkScreen.js"
click node_job_views "https://github.com/patadesujal/labourline/blob/main/front-end/components/JobCard.js"
click node_bid_modal "https://github.com/patadesujal/labourline/blob/main/front-end/components/BiddingModal.js"
click node_employer_post "https://github.com/patadesujal/labourline/blob/main/front-end/app/(employer)/PostNewWorkScreen.js"
click node_employer_status "https://github.com/patadesujal/labourline/blob/main/front-end/app/src/screens/EmployerWorkStatusScreen.js"
click node_bid_views "https://github.com/patadesujal/labourline/blob/main/front-end/app/src/screens/ViewBidsScreen.js"
click node_work_data "https://github.com/patadesujal/labourline/blob/main/front-end/app/src/store/WorkData.js"
click node_work_service "https://github.com/patadesujal/labourline/blob/main/front-end/app/src/store/workService.js"
click node_location "https://github.com/patadesujal/labourline/blob/main/front-end/app/src/store/locationUtils.js"
click node_work_api "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java"
click node_labour_api "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/LabourController.java"
click node_employer_api "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/EmployerController.java"
click node_labour_service "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/service/LabourService.java"
click node_employer_service "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/service/EmployerService.java"
click node_work_store "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/entity/Work.java"
click node_bid_store "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/entity/Bid.java"
click node_user_store "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/entity/User.java"
click node_work_repo "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/repository/WorkRepository.java"
click node_bid_repo "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/repository/BidRepository.java"
click node_accepted_repo "https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/repository/WorkAcceptedRepository.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_role,node_signup,node_work_client,node_job_views,node_bid_modal,node_employer_post,node_employer_status,node_bid_views,node_work_data,node_work_service,node_location toneBlue
class node_auth_api,node_auth_service,node_jwt,node_profile_api toneAmber
class node_work_api,node_labour_api,node_employer_api,node_labour_service,node_employer_service toneMint
class node_work_store,node_bid_store,node_user_store,node_work_repo,node_bid_repo,node_accepted_repo,node_user toneRose
```

## Components

### Mobile app

- [Entry and roles](https://github.com/patadesujal/labourline/blob/main/front-end/app/src/screens/ChooseRoleScreen.js): `front-end/app/src/screens/ChooseRoleScreen.js`
- [Registration and login](https://github.com/patadesujal/labourline/blob/main/front-end/app/src/screens/CreateAccountScreen.js): `front-end/app/src/screens/CreateAccountScreen.js`
- [Worker work feed](https://github.com/patadesujal/labourline/blob/main/front-end/app/(worker)/WorkScreen.js): `front-end/app/(worker)/WorkScreen.js`
- [Job cards and details](https://github.com/patadesujal/labourline/blob/main/front-end/components/JobCard.js): `front-end/components/JobCard.js`
- [Bidding interface](https://github.com/patadesujal/labourline/blob/main/front-end/components/BiddingModal.js): `front-end/components/BiddingModal.js`
- [Post work](https://github.com/patadesujal/labourline/blob/main/front-end/app/(employer)/PostNewWorkScreen.js): `front-end/app/(employer)/PostNewWorkScreen.js`
- [Posted work status](https://github.com/patadesujal/labourline/blob/main/front-end/app/src/screens/EmployerWorkStatusScreen.js): `front-end/app/src/screens/EmployerWorkStatusScreen.js`
- [Review bids](https://github.com/patadesujal/labourline/blob/main/front-end/app/src/screens/ViewBidsScreen.js): `front-end/app/src/screens/ViewBidsScreen.js`
- [Work data state](https://github.com/patadesujal/labourline/blob/main/front-end/app/src/store/WorkData.js): `front-end/app/src/store/WorkData.js`
- [Work API client](https://github.com/patadesujal/labourline/blob/main/front-end/app/src/store/workService.js): `front-end/app/src/store/workService.js`
- [Location utilities](https://github.com/patadesujal/labourline/blob/main/front-end/app/src/store/locationUtils.js): `front-end/app/src/store/locationUtils.js`

### Accounts and profiles

- [Authentication API](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/AuthenticationController.java): `backend/src/main/java/com/LabourLine/LabourLine/controller/AuthenticationController.java`
- [Authentication service](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/service/AuthService.java): `backend/src/main/java/com/LabourLine/LabourLine/service/AuthService.java`
- [JWT utilities](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/utils/JwtUtils.java): `backend/src/main/java/com/LabourLine/LabourLine/utils/JwtUtils.java`
- [User profiles](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/UserController.java): `backend/src/main/java/com/LabourLine/LabourLine/controller/UserController.java`

### Work marketplace

- [Work endpoints](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java): `backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java`
- [Worker endpoints](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/LabourController.java): `backend/src/main/java/com/LabourLine/LabourLine/controller/LabourController.java`
- [Employer endpoints](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/controller/EmployerController.java): `backend/src/main/java/com/LabourLine/LabourLine/controller/EmployerController.java`
- [Worker workflows](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/service/LabourService.java): `backend/src/main/java/com/LabourLine/LabourLine/service/LabourService.java`
- [Bid management](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/service/EmployerService.java): `backend/src/main/java/com/LabourLine/LabourLine/service/EmployerService.java`

### Backend persistence

- [Work records](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/entity/Work.java): `backend/src/main/java/com/LabourLine/LabourLine/entity/Work.java`
- [Bid records](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/entity/Bid.java): `backend/src/main/java/com/LabourLine/LabourLine/entity/Bid.java`
- [User and profiles](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/entity/User.java): `backend/src/main/java/com/LabourLine/LabourLine/entity/User.java`
- [Work repository](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/repository/WorkRepository.java): `backend/src/main/java/com/LabourLine/LabourLine/repository/WorkRepository.java`
- [Bid repository](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/repository/BidRepository.java): `backend/src/main/java/com/LabourLine/LabourLine/repository/BidRepository.java`
- [Accepted work repository](https://github.com/patadesujal/labourline/blob/main/backend/src/main/java/com/LabourLine/LabourLine/repository/WorkAcceptedRepository.java): `backend/src/main/java/com/LabourLine/LabourLine/repository/WorkAcceptedRepository.java`

### Other components

- **Employer or worker**

## Connections

- Employer or worker → Entry and roles: chooses role
- Employer or worker → Registration and login: registers or logs in
- Worker work feed → Job cards and details: renders (evidence: `front-end/app/(worker)/WorkScreen.js`)
- Worker work feed → Bidding interface: opens bidding (evidence: `front-end/app/(worker)/WorkScreen.js`)
- Worker work feed → Work data state: uses state (evidence: `front-end/app/(worker)/WorkScreen.js`)
- Worker work feed → Work API client: uses API client (evidence: `front-end/app/(worker)/WorkScreen.js`)
- Worker work feed → Location utilities: uses location (evidence: `front-end/app/(worker)/WorkScreen.js`)
- Job cards and details → Location utilities: uses distance helpers (evidence: `front-end/components/JobCard.js`)
- Post work → Work data state: uses state (evidence: `front-end/app/(employer)/PostNewWorkScreen.js`)
- Post work → Location utilities: uses location (evidence: `front-end/app/(employer)/PostNewWorkScreen.js`)
- Registration and login → Authentication API: submits credentials
- Authentication API → Authentication service: delegates auth
- Authentication service → User and profiles: loads and saves users (evidence: `backend/src/main/java/com/LabourLine/LabourLine/service/AuthService.java`)
- Authentication service → JWT utilities: generates token (evidence: `backend/src/main/java/com/LabourLine/LabourLine/service/AuthService.java`)
- User profiles → User and profiles: reads profiles (evidence: `backend/src/main/java/com/LabourLine/LabourLine/controller/UserController.java`)
- Work endpoints → Work repository: reads and writes work (evidence: `backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java`)
- Work endpoints → User and profiles: loads employer or worker (evidence: `backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java`)
- Work endpoints → Accepted work repository: records acceptance (evidence: `backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java`)
- Worker endpoints → Worker workflows: delegates worker operations (evidence: `backend/src/main/java/com/LabourLine/LabourLine/controller/LabourController.java`)
- Worker workflows → Work repository: loads work (evidence: `backend/src/main/java/com/LabourLine/LabourLine/service/LabourService.java`)
- Worker workflows → Bid repository: saves bids (evidence: `backend/src/main/java/com/LabourLine/LabourLine/service/LabourService.java`)
- Employer endpoints → Bid management: delegates bid operations (evidence: `backend/src/main/java/com/LabourLine/LabourLine/controller/EmployerController.java`)
- Bid management → Work repository: loads work (evidence: `backend/src/main/java/com/LabourLine/LabourLine/service/EmployerService.java`)
- Bid management → Bid repository: reads and updates bids (evidence: `backend/src/main/java/com/LabourLine/LabourLine/service/EmployerService.java`)
- Work endpoints → Work records: persists work (evidence: `backend/src/main/java/com/LabourLine/LabourLine/controller/WorkController.java`)
- Worker workflows → Bid records: creates bid records (evidence: `backend/src/main/java/com/LabourLine/LabourLine/service/LabourService.java`)
- Worker work feed → Work endpoints: requests work
- Post work → Work endpoints: submits work
- Review bids → Employer endpoints: requests bid review
