# aamir-sufiyan-n/hoodhire architecture

> Architecture diagram of the GitHub repository aamir-sufiyan-n/hoodhire, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aamir-sufiyan-n/hoodhire
- Repository: https://github.com/aamir-sufiyan-n/hoodhire

## Overview

1. **What this repo is**
   HoodHire is a Go backend for a job marketplace with separate user flows for seekers, hirers, and admins. The architecture is organized as a Clean Architecture / layered system, with HTTP handling, business logic, persistence, and shared utilities kept apart.

2. **Application entry and bootstrap**
   `cmd/main.go` is the executable entrypoint. It likely wires together configuration, database connections, Redis, the Fiber HTTP app, routes, and middleware via `internal/app/app.go`. The boot layer is split from the domain logic so the rest of the code stays framework-agnostic where possible.

3. **Main request flow**
   Requests enter Fiber, pass through middleware, then hit controllers, which delegate to services, which call repositories for persistence. The repositories talk to PostgreSQL through GORM. Redis is a secondary store for short-lived or fast-changing data like OTPs and feature/config state.

4. **Domain-driven module split**
   The backend is organized by business capability rather than by technical concern:
   - authentication
   - seekers
   - hirers/business profiles
   - jobs
   - bonds/applications
   - follows/reviews
   - subscriptions
   - tickets/support
   - roles/permissions
   - web configuration  
   Each of these has its own controller, service, and repository files, which makes the architecture easy to map into bounded subsystems.

5. **Identity and auth subsystem**
   Authentication is built around `user` plus role-specific profiles. The `utils/jwt.go`, `utils/bcrypt.go`, `utils/cookie.go`, and `internal/Controllers/authController.go` / `internal/Services/authServices.go` files show the main auth flow:
   - registration and login
   - OTP verification via Redis TTL
   - password hashing with bcrypt
   - JWT access/refresh tokens stored in cookies  
   Middleware (`authMiddleware.go`, `roleMiddleware.go`, `blockedMiddleware.go`) enforces identity and account state before controllers run.

6. **Profile separation: seeker vs hirer**
   The models under `structures/models/seeker.go`, `hirer.go`, and `user.go` indicate a base identity model with extended profile records. This supports different registration and profile-update flows for seekers and hirers, while keeping shared identity fields centralized in `users`.

7. **Marketplace core: jobs, applications, and bonds**
   The most important business flow is job discovery and application. `jobControllers.go`, `jobServices.go`, and `jobRepoes.go` manage job CRUD and search/filtering. The bond subsystem (`bondController.go`, `bondServices.go`, `bondRepo.go`) appears to represent a confirmed hire or trusted relationship. That bond is the privacy boundary: contact details are only revealed once a bond exists.

8. **Admin, RBAC, and feature gating**
   Admin functionality is separated into its own routes and controllers (`adminRoutes.go`, `roleControllers.go`, `webConfig.go`, etc.). Permissions are not hardcoded; they are data-driven through roles and permission tables, with `permissionMiddleware.go` checking access per request. A separate web-config subsystem lets admins toggle platform features such as registration, job posting, applying, and chat without redeploying.

9. **Payments and subscriptions**
   Subscription logic lives in the subscription controller/service/repository trio and integrates with Razorpay. That subsystem handles plan purchase, payment verification, and activation of hirer benefits like verification and higher job limits. The `utils/crone.go` file and README indicate scheduled expiry/reminder handling, so subscription state is time-driven as well as event-driven.

10. **Secondary engagement features**
   Follow/favorite/review behavior is handled as its own capability (`follow.go`, `followReviewRepo.go`). Support tickets are another independent workflow (`ticketContoller.go`, `ticketServices.go`, `ticketRepo.go`) for user-to-admin issue escalation. These are separate from hiring flow, but they reuse the same account and permission infrastructure.

11. **External integrations**
   The backend depends on a few infrastructure services that materially shape the architecture:
   - PostgreSQL for durable relational data
   - Redis for OTP/session-like short-lived state
   - Cloudinary for media and resume storage
   - SMTP mail delivery through `utils/mail.go`
   - Razorpay for subscription payments
   - cron scheduling for expiry/reminder jobs
   - PDF generation/export utilities in `utils/pdf.go`

12. **Data modeling boundary**
   The `structures/Dto` folder defines transport objects for request/response shaping, while `structures/models` holds persistence models. That separation suggests the API does not expose database entities directly; controllers likely bind DTOs, services transform them, and repositories persist model objects.

13. **Infrastructure and runtime shape**
   The repo is a single Go backend service, container-friendly and likely configured via environment files. The README mentions a separate chat/WebSocket service, but in this repository the visible code is the main API and its supporting domain modules. From an architecture diagram perspective, this repo should be drawn as one primary HTTP API service with PostgreSQL and Redis dependencies, plus external integrations for email, storage, and payments.

Main entry points: [`internal/routes/userRoutes.go`](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/routes/userRoutes.go) (User Routes), [`internal/app/app.go`](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/app/app.go) (App Wire-up), [`internal/Services/authServices.go`](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/authServices.go) (Auth Service), [`structures/models/user.go`](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/structures/models/user.go) (Models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_bootstrap["Bootstrap"]
  node_cmd_main["Main<br/>entrypoint<br/>[main.go]"]
  node_app_boot["App Wire-up<br/>composition root<br/>[app.go]"]
end

subgraph group_grp_api["API Layer"]
  node_routes_user["User Routes<br/>router<br/>[userRoutes.go]"]
  node_routes_admin["Admin Routes<br/>router<br/>[adminRoutes.go]"]
  node_mw_auth["Auth Guard<br/>middleware<br/>[authMiddleware.go]"]
  node_mw_role["Role Guard<br/>middleware<br/>[roleMiddleware.go]"]
  node_mw_perm["Permission Guard<br/>middleware"]
  node_mw_block["Block Guard<br/>middleware"]
end

subgraph group_grp_domain["Domain Modules"]
  node_auth_ctrl["Auth<br/>controller<br/>[authController.go]"]
  node_job_ctrl["Jobs<br/>controller<br/>[jobControllers.go]"]
  node_bond_ctrl["Bonds<br/>controller<br/>[bondController.go]"]
  node_seek_ctrl["Seekers<br/>controller"]
  node_hirer_ctrl["Hirers<br/>controller<br/>[hirerController.go]"]
  node_sub_ctrl["Subscriptions<br/>controller<br/>[subscription.go]"]
  node_ticket_ctrl["Tickets<br/>controller<br/>[ticketContoller.go]"]
  node_role_ctrl["RBAC<br/>controller<br/>[roleControllers.go]"]
  node_webcfg_ctrl["Web Config<br/>controller<br/>[webConfig.go]"]
  node_auth_svc["Auth Service<br/>[authServices.go]"]
  node_job_svc["Job Service<br/>[jobServices.go]"]
  node_bond_svc["Bond Service<br/>[bondServices.go]"]
  node_sub_svc["Subscription Service<br/>[subscription.go]"]
end

subgraph group_grp_data["Data and Integrations"]
  node_auth_repo["Auth Repo<br/>[authRepos.go]"]
  node_job_repo["Job Repo<br/>[jobRepoes.go]"]
  node_bond_repo["Bond Repo<br/>[bondRepo.go]"]
  node_sub_repo["Subscription Repo"]
  node_dto["DTOs<br/>contracts<br/>[authDto.go]"]
  node_models["Models<br/>entities<br/>[user.go]"]
  node_db[("Postgres<br/>database<br/>[db.go]")]
  node_redis[("Redis<br/>cache<br/>[redis.go]")]
  node_cloudinary["Cloudinary<br/>storage<br/>[cloudinary.go]"]
  node_mail["Mail<br/>[mail.go]"]
  node_razorpay["Razorpay<br/>payments<br/>[subscription.go]"]
  node_jwt_utils["JWT Utils<br/>[jwt.go]"]
  node_bcrypt_utils["Hashing<br/>[bcrypt.go]"]
end

node_cmd_main -->|"starts"| node_app_boot
node_app_boot -->|"registers"| node_routes_user
node_app_boot -->|"registers"| node_routes_admin
node_app_boot -->|"uses"| node_mw_auth
node_app_boot -->|"uses"| node_mw_role
node_app_boot -->|"uses"| node_mw_perm
node_app_boot -->|"uses"| node_mw_block
node_routes_user -->|"dispatches"| node_auth_ctrl
node_routes_user -->|"dispatches"| node_job_ctrl
node_routes_user -->|"dispatches"| node_bond_ctrl
node_routes_user -->|"dispatches"| node_seek_ctrl
node_routes_user -->|"dispatches"| node_hirer_ctrl
node_routes_user -->|"dispatches"| node_sub_ctrl
node_routes_user -->|"dispatches"| node_ticket_ctrl
node_routes_admin -->|"dispatches"| node_role_ctrl
node_routes_admin -->|"dispatches"| node_webcfg_ctrl
node_auth_ctrl -->|"delegates"| node_auth_svc
node_job_ctrl -->|"delegates"| node_job_svc
node_bond_ctrl -->|"delegates"| node_bond_svc
node_sub_ctrl -->|"delegates"| node_sub_svc
node_auth_svc -->|"persists"| node_auth_repo
node_job_svc -->|"persists"| node_job_repo
node_bond_svc -->|"persists"| node_bond_repo
node_sub_svc -->|"persists"| node_sub_repo
node_auth_ctrl -->|"binds"| node_dto
node_job_ctrl -->|"binds"| node_dto
node_auth_repo -->|"stores"| node_models
node_job_repo -->|"stores"| node_models
node_bond_repo -->|"stores"| node_models
node_sub_repo -->|"stores"| node_models
node_auth_repo -->|"uses"| node_db
node_job_repo -->|"uses"| node_db
node_bond_repo -->|"uses"| node_db
node_sub_repo -->|"uses"| node_db
node_auth_svc -->|"uses"| node_redis
node_auth_svc -->|"uses"| node_jwt_utils
node_auth_svc -->|"uses"| node_bcrypt_utils
node_auth_svc -->|"uses"| node_mail
node_sub_svc -->|"uses"| node_razorpay
node_seek_ctrl -->|"uses"| node_cloudinary
node_hirer_ctrl -->|"uses"| node_cloudinary

click node_cmd_main "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/cmd/main.go"
click node_app_boot "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/app/app.go"
click node_routes_user "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/routes/userRoutes.go"
click node_routes_admin "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/routes/adminRoutes.go"
click node_mw_auth "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/middlewares/authMiddleware.go"
click node_mw_role "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/middlewares/roleMiddleware.go"
click node_mw_perm "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/middlewares/permissionMiddleware.go"
click node_mw_block "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/middlewares/blockedMiddleware.go"
click node_auth_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/authController.go"
click node_job_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/jobControllers.go"
click node_bond_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/bondController.go"
click node_seek_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/seekerController.go"
click node_hirer_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/hirerController.go"
click node_sub_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/subscription.go"
click node_ticket_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/ticketContoller.go"
click node_role_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/roleControllers.go"
click node_webcfg_ctrl "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/webConfig.go"
click node_auth_svc "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/authServices.go"
click node_job_svc "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/jobServices.go"
click node_bond_svc "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/bondServices.go"
click node_sub_svc "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/subscription.go"
click node_auth_repo "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Repositories/authRepos.go"
click node_job_repo "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Repositories/jobRepoes.go"
click node_bond_repo "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Repositories/bondRepo.go"
click node_sub_repo "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Repositories/subscriptionRepo.go"
click node_dto "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/structures/Dto/authDto.go"
click node_models "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/structures/models/user.go"
click node_db "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/database/db.go"
click node_redis "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/config/redis.go"
click node_cloudinary "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/utils/cloudinary.go"
click node_mail "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/utils/mail.go"
click node_razorpay "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/subscription.go"
click node_jwt_utils "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/utils/jwt.go"
click node_bcrypt_utils "https://github.com/aamir-sufiyan-n/hoodhire/blob/main/utils/bcrypt.go"

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_cmd_main,node_app_boot toneBlue
class node_routes_user,node_routes_admin,node_mw_auth,node_mw_role,node_mw_perm,node_mw_block toneAmber
class node_auth_ctrl,node_job_ctrl,node_bond_ctrl,node_seek_ctrl,node_hirer_ctrl,node_sub_ctrl,node_ticket_ctrl,node_role_ctrl,node_webcfg_ctrl,node_auth_svc,node_job_svc,node_bond_svc,node_sub_svc toneMint
class node_auth_repo,node_job_repo,node_bond_repo,node_sub_repo,node_dto,node_models,node_db,node_redis,node_cloudinary,node_mail,node_razorpay,node_jwt_utils,node_bcrypt_utils toneRose
```

## Components

### Bootstrap

Process entrypoint and application wiring.

- [Main](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/cmd/main.go): entrypoint · Executable entrypoint for the backend service. · `cmd/main.go`
- [App Wire-up](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/app/app.go): composition root · Assembles config, database, redis, routes, and middleware. · `internal/app/app.go`

### API Layer

HTTP handling, middleware, and routing.

- [User Routes](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/routes/userRoutes.go): router · Public and authenticated user-facing route registration. · `internal/routes/userRoutes.go`
- [Admin Routes](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/routes/adminRoutes.go): router · Admin route registration and protected admin surfaces. · `internal/routes/adminRoutes.go`
- [Auth Guard](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/middlewares/authMiddleware.go): middleware · Validates identity before protected handlers run. · `internal/middlewares/authMiddleware.go`
- [Role Guard](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/middlewares/roleMiddleware.go): middleware · Checks user role constraints for requests. · `internal/middlewares/roleMiddleware.go`
- [Permission Guard](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/middlewares/permissionMiddleware.go): middleware · Enforces permission-based access control. · `internal/middlewares/permissionMiddleware.go`
- [Block Guard](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/middlewares/blockedMiddleware.go): middleware · Stops blocked or inactive accounts from proceeding. · `internal/middlewares/blockedMiddleware.go`

### Domain Modules

Business capabilities organized by bounded context.

- [Auth](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/authController.go): controller · Login, registration, OTP, and token handling. · `internal/Controllers/authController.go`
- [Jobs](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/jobControllers.go): controller · Job CRUD, discovery, and filtering endpoints. · `internal/Controllers/jobControllers.go`
- [Bonds](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/bondController.go): controller · Hire-confirmation and trusted relationship endpoints. · `internal/Controllers/bondController.go`
- [Seekers](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/seekerController.go): controller · Seeker profile and account flows. · `internal/Controllers/seekerController.go`
- [Hirers](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/hirerController.go): controller · Hirer profile and business account flows. · `internal/Controllers/hirerController.go`
- [Subscriptions](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/subscription.go): controller · Plan purchase, verification, and activation endpoints. · `internal/Controllers/subscription.go`
- [Tickets](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/ticketContoller.go): controller · Support ticket and escalation endpoints. · `internal/Controllers/ticketContoller.go`
- [RBAC](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/roleControllers.go): controller · Roles, permissions, and admin control endpoints. · `internal/Controllers/roleControllers.go`
- [Web Config](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Controllers/webConfig.go): controller · Feature gating and platform configuration endpoints. · `internal/Controllers/webConfig.go`
- [Auth Service](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/authServices.go): service · Coordinates login, OTP, token, and account flows. · `internal/Services/authServices.go`
- [Job Service](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/jobServices.go): service · Implements job discovery and posting logic. · `internal/Services/jobServices.go`
- [Bond Service](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/bondServices.go): service · Manages relationship state that unlocks private contact access. · `internal/Services/bondServices.go`
- [Subscription Service](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/subscription.go): service · Handles plans, payment confirmation, and expiry state. · `internal/Services/subscription.go`

### Data and Integrations

Persistence models, DTOs, and external service adapters.

- [Auth Repo](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Repositories/authRepos.go): repository · Persists users, credentials, and auth-related state. · `internal/Repositories/authRepos.go`
- [Job Repo](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Repositories/jobRepoes.go): repository · Persists job records and search data. · `internal/Repositories/jobRepoes.go`
- [Bond Repo](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Repositories/bondRepo.go): repository · Persists hire bonds and relationship records. · `internal/Repositories/bondRepo.go`
- [Subscription Repo](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Repositories/subscriptionRepo.go): repository · Persists subscription plans, purchases, and status. · `internal/Repositories/subscriptionRepo.go`
- [DTOs](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/structures/Dto/authDto.go): contracts · Request and response shaping objects. · `structures/Dto/authDto.go`
- [Models](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/structures/models/user.go): entities · Persistence entities for users, jobs, bonds, and related records. · `structures/models/user.go`
- [Postgres](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/database/db.go): database · Primary relational datastore accessed through GORM. · `database/db.go`
- [Redis](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/config/redis.go): cache · Short-lived state for OTPs and other ephemeral data. · `config/redis.go`
- [Cloudinary](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/utils/cloudinary.go): storage · Media and resume storage integration. · `utils/cloudinary.go`
- [Mail](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/utils/mail.go): email · SMTP-based notification delivery. · `utils/mail.go`
- [Razorpay](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/internal/Services/subscription.go): payments · External payment provider for subscriptions. · `internal/Services/subscription.go`
- [JWT Utils](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/utils/jwt.go): utility · Token creation and verification helpers. · `utils/jwt.go`
- [Hashing](https://github.com/aamir-sufiyan-n/hoodhire/blob/main/utils/bcrypt.go): utility · Password hashing helpers. · `utils/bcrypt.go`

## Connections

- Main → App Wire-up: starts · Main launches application wiring.
- App Wire-up → User Routes: registers · Bootstraps user-facing routes.
- App Wire-up → Admin Routes: registers · Bootstraps admin routes.
- App Wire-up → Auth Guard: uses · Installs authentication middleware.
- App Wire-up → Role Guard: uses · Installs role middleware.
- App Wire-up → Permission Guard: uses · Installs permission middleware.
- App Wire-up → Block Guard: uses · Installs account-state middleware.
- User Routes → Auth: dispatches · Routes direct requests to auth handlers.
- User Routes → Jobs: dispatches · Routes direct requests to job handlers.
- User Routes → Bonds: dispatches · Routes direct requests to bond handlers.
- User Routes → Seekers: dispatches · Routes direct requests to seeker handlers.
- User Routes → Hirers: dispatches · Routes direct requests to hirer handlers.
- User Routes → Subscriptions: dispatches · Routes direct requests to subscription handlers.
- User Routes → Tickets: dispatches · Routes direct requests to support handlers.
- Admin Routes → RBAC: dispatches · Routes direct requests to RBAC handlers.
- Admin Routes → Web Config: dispatches · Routes direct requests to web-config handlers.
- Auth → Auth Service: delegates · Controllers defer business logic to services.
- Jobs → Job Service: delegates · Controllers defer business logic to services.
- Bonds → Bond Service: delegates · Controllers defer business logic to services.
- Subscriptions → Subscription Service: delegates · Controllers defer business logic to services.
- Auth Service → Auth Repo: persists · Service reads and writes auth-related data.
- Job Service → Job Repo: persists · Service reads and writes job data.
- Bond Service → Bond Repo: persists · Service reads and writes bond data.
- Subscription Service → Subscription Repo: persists · Service reads and writes subscription data.
- Auth → DTOs: binds · Controllers accept shaped request/response payloads.
- Jobs → DTOs: binds · Controllers accept shaped request/response payloads.
- Auth Repo → Models: stores · Repositories work with persistence entities.
- Job Repo → Models: stores · Repositories work with persistence entities.
- Bond Repo → Models: stores · Repositories work with persistence entities.
- Subscription Repo → Models: stores · Repositories work with persistence entities.
- Auth Repo → Postgres: uses · Primary relational persistence.
- Job Repo → Postgres: uses · Primary relational persistence.
- Bond Repo → Postgres: uses · Primary relational persistence.
- Subscription Repo → Postgres: uses · Primary relational persistence.
- Auth Service → Redis: uses · Stores ephemeral OTP and session-like state.
- Auth Service → JWT Utils: uses · Issues and validates tokens.
- Auth Service → Hashing: uses · Hashes passwords.
- Auth Service → Mail: uses · Sends OTP and account notifications.
- Subscription Service → Razorpay: uses · Integrates payment processing.
- Seekers → Cloudinary: uses · Handles profile media and document uploads.
- Hirers → Cloudinary: uses · Handles profile media and document uploads.
