# abeja-inc/system-dev-coding-interview architecture

> Architecture diagram of the GitHub repository abeja-inc/system-dev-coding-interview, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abeja-inc/system-dev-coding-interview
- Repository: https://github.com/abeja-inc/system-dev-coding-interview

## Overview

The repository is a collection of technical interview exercises; the included FastAPI exercise is a small user-and-item API backed by SQLite. Its workflow is HTTP requests through FastAPI routes, request/response validation with Pydantic schemas, CRUD operations, and SQLAlchemy persistence. The excerpts show user creation and lookup, item creation/listing/update, and a health check. The broader repository README only identifies the exercise collection; this map focuses on the implemented sample. Evidence is limited to the README and the sampled source files.

Main entry points: [`exercises/01-fastapi-sample/sql_app/main.py`](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/main.py) (FastAPI Routes), [`exercises/01-fastapi-sample/sql_app/crud.py`](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/crud.py) (User Operations), [`exercises/01-fastapi-sample/sql_app/schemas.py`](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/schemas.py) (Request and Response Schemas), [`exercises/01-fastapi-sample/sql_app/models.py`](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/models.py) (User and Item Models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_routes["FastAPI Routes<br/>[main.py]"]
  node_schemas["Request and Response Schemas<br/>[schemas.py]"]
end

subgraph group_domain["User and Items"]
  node_usercrud["User Operations<br/>[crud.py]"]
  node_itemcrud["Item Operations<br/>[crud.py]"]
  node_orm["User and Item Models<br/>[models.py]"]
  node_passwordhash["Password Hasher"]
end

subgraph group_persistence["Persistence"]
  node_dbsession["Session Configuration<br/>[database.py]"]
  node_sqlite[("SQLite Database")]
end

node_client(("API Client"))

node_client -->|"sends requests"| node_routes
node_routes -->|"returns responses"| node_client
node_routes -->|"validates and serializes"| node_schemas
node_routes -->|"dispatches user operations"| node_usercrud
node_routes -->|"dispatches item operations"| node_itemcrud
node_routes -->|"opens sessions"| node_dbsession
node_routes -->|"creates tables"| node_orm
node_usercrud -->|"queries and updates"| node_orm
node_usercrud -->|"accepts user data"| node_schemas
node_itemcrud -->|"queries and updates"| node_orm
node_itemcrud -->|"accepts item data"| node_schemas
node_usercrud -->|"hashes passwords"| node_passwordhash
node_dbsession -->|"connects to"| node_sqlite

click node_routes "https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/main.py"
click node_schemas "https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/schemas.py"
click node_usercrud "https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/crud.py"
click node_itemcrud "https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/crud.py"
click node_orm "https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/models.py"
click node_dbsession "https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/database.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_routes,node_schemas,node_client toneBlue
class node_usercrud,node_itemcrud,node_orm,node_passwordhash toneAmber
class node_dbsession,node_sqlite toneMint
```

## Components

### HTTP API

- [FastAPI Routes](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/main.py): `exercises/01-fastapi-sample/sql_app/main.py`
- [Request and Response Schemas](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/schemas.py): `exercises/01-fastapi-sample/sql_app/schemas.py`

### User and Items

- [User Operations](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/crud.py): `exercises/01-fastapi-sample/sql_app/crud.py`
- [Item Operations](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/crud.py): `exercises/01-fastapi-sample/sql_app/crud.py`
- [User and Item Models](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/models.py): `exercises/01-fastapi-sample/sql_app/models.py`
- **Password Hasher**

### Persistence

- [Session Configuration](https://github.com/abeja-inc/system-dev-coding-interview/blob/main/exercises/01-fastapi-sample/sql_app/database.py): `exercises/01-fastapi-sample/sql_app/database.py`
- **SQLite Database**

### Other components

- **API Client**

## Connections

- API Client → FastAPI Routes: sends requests (evidence: `exercises/01-fastapi-sample/sql_app/main.py`)
- FastAPI Routes → API Client: returns responses (evidence: `exercises/01-fastapi-sample/sql_app/main.py`)
- FastAPI Routes → Request and Response Schemas: validates and serializes (evidence: `exercises/01-fastapi-sample/sql_app/main.py`)
- FastAPI Routes → User Operations: dispatches user operations (evidence: `exercises/01-fastapi-sample/sql_app/main.py`)
- FastAPI Routes → Item Operations: dispatches item operations (evidence: `exercises/01-fastapi-sample/sql_app/main.py`)
- FastAPI Routes → Session Configuration: opens sessions (evidence: `exercises/01-fastapi-sample/sql_app/main.py`)
- FastAPI Routes → User and Item Models: creates tables (evidence: `exercises/01-fastapi-sample/sql_app/main.py`)
- User Operations → User and Item Models: queries and updates (evidence: `exercises/01-fastapi-sample/sql_app/crud.py`)
- User Operations → Request and Response Schemas: accepts user data (evidence: `exercises/01-fastapi-sample/sql_app/crud.py`)
- Item Operations → User and Item Models: queries and updates (evidence: `exercises/01-fastapi-sample/sql_app/crud.py`)
- Item Operations → Request and Response Schemas: accepts item data (evidence: `exercises/01-fastapi-sample/sql_app/crud.py`)
- User Operations → Password Hasher: hashes passwords (evidence: `exercises/01-fastapi-sample/sql_app/crud.py`)
- Session Configuration → SQLite Database: connects to (evidence: `exercises/01-fastapi-sample/sql_app/database.py`)
