# abdul-rahman24/hire-platform-idp architecture

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

- Interactive diagram: https://gitdiagram.com/abdul-rahman24/hire-platform-idp
- Repository: https://github.com/abdul-rahman24/hire-platform-idp

## Overview

The Test Configuration Service is a FastAPI backend for creating, organizing, and delivering test configurations. Clients enter through the API routes; test and section services apply lifecycle rules, persist metadata, and connect sections to live Question Bank data, while full-test retrieval assembles ordered sections and questions. The graph includes the documented test, section, health, and question-set capabilities. Some implementation paths, especially test-service internals and full-test assembly, were not excerpted; those links are included only where the README documents them.

Main entry points: [`app/services/section_service.py`](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/services/section_service.py) (Section lifecycle), [`app/dependencies/providers.py`](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/dependencies/providers.py) (Dependency providers), [`app/api/router.py`](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/router.py) (API router), [`app/services/test_service.py`](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/services/test_service.py) (Test lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_app["FastAPI application<br/>[main.py]"]
  node_router["API router<br/>[router.py]"]
  node_health["Health endpoint<br/>[health.py]"]
  node_tests_route["Test endpoints<br/>[tests.py]"]
  node_sections_route["Section endpoints<br/>[sections.py]"]
  node_qb_route["Question-set endpoints<br/>[question_bank.py]"]
end

subgraph group_domain["Test Domain"]
  node_providers["Dependency providers<br/>[providers.py]"]
  node_test_service["Test lifecycle<br/>[test_service.py]"]
  node_section_service["Section lifecycle<br/>[section_service.py]"]
  node_section_model["Section entity<br/>[section.py]"]
  node_section_schema["Section API schema<br/>[section.py]"]
end

subgraph group_persistence["Persistence"]
  node_test_repository["Test repository<br/>[test_repository.py]"]
  node_section_repository["Section repository"]
  node_dynamodb_base["DynamoDB operations<br/>[dynamodb_base.py]"]
  node_dynamodb[("DynamoDB")]
end

subgraph group_integration["Question Bank Integration"]
  node_qb_service["Question Bank service"]
  node_qb_client["Question Bank client"]
end

node_client(("API client"))
node_api_gateway["API Gateway"]
node_qb_external["Question Bank API"]

node_client -->|"sends HTTPS"| node_api_gateway
node_api_gateway -->|"invokes Lambda"| node_app
node_app -->|"mounts routes"| node_router
node_router -->|"routes requests"| node_health
node_router -->|"routes requests"| node_tests_route
node_router -->|"routes requests"| node_sections_route
node_router -->|"routes requests"| node_qb_route
node_tests_route -->|"resolves service"| node_providers
node_sections_route -->|"resolves service"| node_providers
node_qb_route -->|"resolves service"| node_providers
node_providers -->|"constructs"| node_test_service
node_providers -->|"constructs"| node_section_service
node_providers -->|"constructs"| node_qb_service
node_section_service -->|"verifies test"| node_test_repository
node_section_service -->|"persists sections"| node_section_repository
node_section_service -->|"validates question set"| node_qb_client
node_section_service -->|"creates entity"| node_section_model
node_section_service -->|"maps response"| node_section_schema
node_section_repository -->|"delegates storage"| node_dynamodb_base
node_test_repository -->|"delegates storage"| node_dynamodb_base
node_dynamodb_base -->|"reads and writes"| node_dynamodb
node_test_service -->|"stores test data"| node_test_repository
node_test_service -->|"loads sections"| node_section_repository
node_test_service -->|"fetches questions"| node_qb_client
node_qb_service -->|"uses client"| node_qb_client
node_qb_client -->|"requests question data"| node_qb_external

click node_app "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/main.py"
click node_router "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/router.py"
click node_health "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/routes/health.py"
click node_tests_route "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/routes/tests.py"
click node_sections_route "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/routes/sections.py"
click node_qb_route "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/routes/question_bank.py"
click node_providers "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/dependencies/providers.py"
click node_test_service "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/services/test_service.py"
click node_section_service "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/services/section_service.py"
click node_section_model "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/models/section.py"
click node_section_schema "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/schemas/section.py"
click node_test_repository "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/repositories/test_repository.py"
click node_section_repository "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/repositories/section_repository.py"
click node_dynamodb_base "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/repositories/dynamodb_base.py"
click node_qb_service "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/services/question_bank_service.py"
click node_qb_client "https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/utils/question_bank_client.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_router,node_health,node_tests_route,node_sections_route,node_qb_route,node_client toneBlue
class node_providers,node_test_service,node_section_service,node_section_model,node_section_schema toneAmber
class node_test_repository,node_section_repository,node_dynamodb_base,node_dynamodb,node_api_gateway,node_qb_external toneMint
class node_qb_service,node_qb_client toneRose
```

## Components

### HTTP API

- [FastAPI application](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/main.py): `app/main.py`
- [API router](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/router.py): `app/api/router.py`
- [Health endpoint](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/routes/health.py): `app/api/routes/health.py`
- [Test endpoints](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/routes/tests.py): `app/api/routes/tests.py`
- [Section endpoints](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/routes/sections.py): `app/api/routes/sections.py`
- [Question-set endpoints](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/api/routes/question_bank.py): `app/api/routes/question_bank.py`

### Test Domain

- [Dependency providers](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/dependencies/providers.py): `app/dependencies/providers.py`
- [Test lifecycle](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/services/test_service.py): `app/services/test_service.py`
- [Section lifecycle](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/services/section_service.py): `app/services/section_service.py`
- [Section entity](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/models/section.py): `app/models/section.py`
- [Section API schema](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/schemas/section.py): `app/schemas/section.py`

### Persistence

- [Test repository](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/repositories/test_repository.py): `app/repositories/test_repository.py`
- [Section repository](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/repositories/section_repository.py): `app/repositories/section_repository.py`
- [DynamoDB operations](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/repositories/dynamodb_base.py): `app/repositories/dynamodb_base.py`
- **DynamoDB**

### Question Bank Integration

- [Question Bank service](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/services/question_bank_service.py): `app/services/question_bank_service.py`
- [Question Bank client](https://github.com/abdul-rahman24/hire-platform-idp/blob/main/app/utils/question_bank_client.py): `app/utils/question_bank_client.py`

### Other components

- **API client**
- **API Gateway**
- **Question Bank API**

## Connections

- API client → API Gateway: sends HTTPS (evidence: `README.md`)
- API Gateway → FastAPI application: invokes Lambda (evidence: `README.md`)
- FastAPI application → API router: mounts routes (evidence: `app/main.py`)
- API router → Health endpoint: routes requests (evidence: `app/api/router.py`)
- API router → Test endpoints: routes requests (evidence: `app/api/router.py`)
- API router → Section endpoints: routes requests (evidence: `app/api/router.py`)
- API router → Question-set endpoints: routes requests (evidence: `app/api/router.py`)
- Test endpoints → Dependency providers: resolves service (evidence: `app/api/routes/tests.py`)
- Section endpoints → Dependency providers: resolves service (evidence: `app/api/routes/sections.py`)
- Question-set endpoints → Dependency providers: resolves service (evidence: `app/api/routes/question_bank.py`)
- Dependency providers → Test lifecycle: constructs (evidence: `app/dependencies/providers.py`)
- Dependency providers → Section lifecycle: constructs (evidence: `app/dependencies/providers.py`)
- Dependency providers → Question Bank service: constructs (evidence: `app/dependencies/providers.py`)
- Section lifecycle → Test repository: verifies test (evidence: `app/services/section_service.py`)
- Section lifecycle → Section repository: persists sections (evidence: `app/services/section_service.py`)
- Section lifecycle → Question Bank client: validates question set (evidence: `app/services/section_service.py`)
- Section lifecycle → Section entity: creates entity (evidence: `app/services/section_service.py`)
- Section lifecycle → Section API schema: maps response (evidence: `app/services/section_service.py`)
- Section repository → DynamoDB operations: delegates storage (evidence: `app/repositories/section_repository.py`)
- Test repository → DynamoDB operations: delegates storage (evidence: `app/repositories/dynamodb_base.py`)
- DynamoDB operations → DynamoDB: reads and writes (evidence: `app/repositories/dynamodb_base.py`)
- Test lifecycle → Test repository: stores test data (evidence: `README.md`)
- Test lifecycle → Section repository: loads sections (evidence: `README.md`)
- Test lifecycle → Question Bank client: fetches questions (evidence: `README.md`)
- Question Bank service → Question Bank client: uses client (evidence: `app/services/question_bank_service.py`)
- Question Bank client → Question Bank API: requests question data (evidence: `app/utils/question_bank_client.py`)
