# izone-hub/talent-back architecture

> Architecture diagram of the GitHub repository izone-hub/talent-back, 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/izone-hub/talent-back
- Repository: https://github.com/izone-hub/talent-back

## Overview

Izone-hub Talent is a Go backend for job seekers and employers, combining job listings and applications with CV management and skill assessments. Users authenticate through GitHub, browse and apply for published jobs, then complete a quiz tied to their application; administrators manage jobs, tags, questions, and application review. The API routes requests through middleware and controllers into domain services and PostgreSQL. Source excerpts show the application and quiz paths; some other feature links rely on the source index or README, so unsampled internals are represented at subsystem level.

Main entry points: [`router/v1_routes.go`](https://github.com/izone-hub/talent-back/blob/main/router/v1_routes.go) (API routing), [`database`](https://github.com/izone-hub/talent-back/tree/main/database) (PostgreSQL queries), [`service/quiz_service.go`](https://github.com/izone-hub/talent-back/blob/main/service/quiz_service.go) (Quiz assessment), [`service/application.go`](https://github.com/izone-hub/talent-back/blob/main/service/application.go) (Application workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_server["Server entry<br/>[main.go]"]
  node_router["API routing<br/>[v1_routes.go]"]
  node_middleware["Request middleware<br/>[auth_middleware.go]"]
  node_auth_controller["Auth handlers<br/>[auth_controller.go]"]
  node_job_controller["Job handlers<br/>[job_controller.go]"]
  node_application_controller["Application handlers"]
  node_cv_controller["CV handlers<br/>[cv_controller.go]"]
  node_quiz_controller["Quiz handlers<br/>[quiz_controller.go]"]
end

subgraph group_identity["Identity and CV"]
  node_auth_service["OAuth and JWT<br/>[auth.go]"]
  node_cv_service["CV management<br/>[cv.go]"]
end

subgraph group_talent["Jobs and Applications"]
  node_job_service["Job management<br/>[job.go]"]
  node_application_service["Application workflow<br/>[application.go]"]
  node_tag_service["Skill tags<br/>[tag.go]"]
end

subgraph group_assessment["Skills Assessment"]
  node_quiz_service["Quiz assessment<br/>[quiz_service.go]"]
  node_question_service["Question bank<br/>[question.go]"]
  node_sandbox_service["Code sandbox<br/>[sandbox.go]"]
end

subgraph group_persistence["Persistence"]
  node_postgres[("PostgreSQL queries")]
end

node_user(("Talent user"))
node_github["GitHub OAuth"]

node_user -->|"sends requests"| node_router
node_router -->|"routes jobs"| node_job_controller
node_router -->|"routes applications"| node_application_controller
node_router -->|"routes CV"| node_cv_controller
node_router -->|"routes quizzes"| node_quiz_controller
node_router -->|"routes auth"| node_auth_controller
node_router -->|"protects routes"| node_middleware
node_server -->|"creates handler"| node_router
node_middleware -->|"validates tokens"| node_auth_service
node_auth_controller -->|"delegates auth"| node_auth_service
node_github -->|"OAuth callback"| node_auth_service
node_job_controller -->|"delegates jobs"| node_job_service
node_application_controller -->|"delegates applications"| node_application_service
node_cv_controller -->|"delegates CV"| node_cv_service
node_quiz_controller -->|"delegates quizzes"| node_quiz_service
node_application_service -->|"reads and writes"| node_postgres
node_quiz_service -->|"queries assessment data"| node_postgres
node_job_service -->|"queries jobs"| node_postgres
node_cv_service -->|"stores CV metadata"| node_postgres
node_auth_service -->|"stores user records"| node_postgres
node_question_service -->|"queries questions"| node_postgres
node_tag_service -.->|"queries tags"| node_postgres
node_quiz_service -->|"runs code"| node_sandbox_service
node_application_service -->|"starts assessment"| node_quiz_service
node_quiz_service -.->|"updates application"| node_application_service

click node_server "https://github.com/izone-hub/talent-back/blob/main/main.go"
click node_router "https://github.com/izone-hub/talent-back/blob/main/router/v1_routes.go"
click node_middleware "https://github.com/izone-hub/talent-back/blob/main/middleware/auth_middleware.go"
click node_auth_controller "https://github.com/izone-hub/talent-back/blob/main/controller/auth_controller.go"
click node_job_controller "https://github.com/izone-hub/talent-back/blob/main/controller/job_controller.go"
click node_application_controller "https://github.com/izone-hub/talent-back/blob/main/controller/application_controller.go"
click node_cv_controller "https://github.com/izone-hub/talent-back/blob/main/controller/cv_controller.go"
click node_quiz_controller "https://github.com/izone-hub/talent-back/blob/main/controller/quiz_controller.go"
click node_auth_service "https://github.com/izone-hub/talent-back/blob/main/service/auth.go"
click node_cv_service "https://github.com/izone-hub/talent-back/blob/main/service/cv.go"
click node_job_service "https://github.com/izone-hub/talent-back/blob/main/service/job.go"
click node_application_service "https://github.com/izone-hub/talent-back/blob/main/service/application.go"
click node_quiz_service "https://github.com/izone-hub/talent-back/blob/main/service/quiz_service.go"
click node_question_service "https://github.com/izone-hub/talent-back/blob/main/service/question.go"
click node_sandbox_service "https://github.com/izone-hub/talent-back/blob/main/service/sandbox.go"
click node_tag_service "https://github.com/izone-hub/talent-back/blob/main/service/tag.go"
click node_postgres "https://github.com/izone-hub/talent-back/tree/main/database"

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_server,node_router,node_middleware,node_auth_controller,node_job_controller,node_application_controller,node_cv_controller,node_quiz_controller,node_user toneBlue
class node_auth_service,node_cv_service toneAmber
class node_job_service,node_application_service,node_tag_service toneMint
class node_quiz_service,node_question_service,node_sandbox_service toneRose
class node_postgres,node_github toneIndigo
```

## Components

### HTTP API

- [Server entry](https://github.com/izone-hub/talent-back/blob/main/main.go): `main.go`
- [API routing](https://github.com/izone-hub/talent-back/blob/main/router/v1_routes.go): `router/v1_routes.go`
- [Request middleware](https://github.com/izone-hub/talent-back/blob/main/middleware/auth_middleware.go): `middleware/auth_middleware.go`
- [Auth handlers](https://github.com/izone-hub/talent-back/blob/main/controller/auth_controller.go): `controller/auth_controller.go`
- [Job handlers](https://github.com/izone-hub/talent-back/blob/main/controller/job_controller.go): `controller/job_controller.go`
- [Application handlers](https://github.com/izone-hub/talent-back/blob/main/controller/application_controller.go): `controller/application_controller.go`
- [CV handlers](https://github.com/izone-hub/talent-back/blob/main/controller/cv_controller.go): `controller/cv_controller.go`
- [Quiz handlers](https://github.com/izone-hub/talent-back/blob/main/controller/quiz_controller.go): `controller/quiz_controller.go`

### Identity and CV

- [OAuth and JWT](https://github.com/izone-hub/talent-back/blob/main/service/auth.go): `service/auth.go`
- [CV management](https://github.com/izone-hub/talent-back/blob/main/service/cv.go): `service/cv.go`

### Jobs and Applications

- [Job management](https://github.com/izone-hub/talent-back/blob/main/service/job.go): `service/job.go`
- [Application workflow](https://github.com/izone-hub/talent-back/blob/main/service/application.go): `service/application.go`
- [Skill tags](https://github.com/izone-hub/talent-back/blob/main/service/tag.go): `service/tag.go`

### Skills Assessment

- [Quiz assessment](https://github.com/izone-hub/talent-back/blob/main/service/quiz_service.go): `service/quiz_service.go`
- [Question bank](https://github.com/izone-hub/talent-back/blob/main/service/question.go): `service/question.go`
- [Code sandbox](https://github.com/izone-hub/talent-back/blob/main/service/sandbox.go): `service/sandbox.go`

### Persistence

- [PostgreSQL queries](https://github.com/izone-hub/talent-back/tree/main/database): `database`

### Other components

- **Talent user**
- **GitHub OAuth**

## Connections

- Talent user → API routing: sends requests
- API routing → Job handlers: routes jobs (evidence: `router/v1_routes.go`)
- API routing → Application handlers: routes applications (evidence: `router/v1_routes.go`)
- API routing → CV handlers: routes CV (evidence: `router/v1_routes.go`)
- API routing → Quiz handlers: routes quizzes
- API routing → Auth handlers: routes auth
- API routing → Request middleware: protects routes (evidence: `router/v1_routes.go`)
- Server entry → API routing: creates handler (evidence: `main.go`)
- Request middleware → OAuth and JWT: validates tokens (evidence: `middleware/auth_middleware.go`)
- Auth handlers → OAuth and JWT: delegates auth (evidence: `controller/auth_controller.go`)
- GitHub OAuth → OAuth and JWT: OAuth callback (evidence: `README.md`)
- Job handlers → Job management: delegates jobs (evidence: `controller/job_controller.go`)
- Application handlers → Application workflow: delegates applications (evidence: `controller/application_controller.go`)
- CV handlers → CV management: delegates CV (evidence: `controller/cv_controller.go`)
- Quiz handlers → Quiz assessment: delegates quizzes (evidence: `controller/quiz_controller.go`)
- Application workflow → PostgreSQL queries: reads and writes (evidence: `service/application.go`)
- Quiz assessment → PostgreSQL queries: queries assessment data (evidence: `service/quiz_service.go`)
- Job management → PostgreSQL queries: queries jobs (evidence: `service/job.go`)
- CV management → PostgreSQL queries: stores CV metadata (evidence: `service/cv.go`)
- OAuth and JWT → PostgreSQL queries: stores user records (evidence: `service/auth.go`)
- Question bank → PostgreSQL queries: queries questions (evidence: `service/question.go`)
- Skill tags → PostgreSQL queries: queries tags
- Quiz assessment → Code sandbox: runs code (evidence: `service/quiz_service.go`)
- Application workflow → Quiz assessment: starts assessment (evidence: `service/application.go`)
- Quiz assessment → Application workflow: updates application
