# afeefa9500/route53-clone architecture

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

- Interactive diagram: https://gitdiagram.com/afeefa9500/route53-clone
- Repository: https://github.com/afeefa9500/route53-clone

## Overview

This is a Route 53-style console for managing hosted zones and DNS records, not a DNS hosting service or AWS integration. The main workflow is sign in, browse or create a zone, then manage its records, including import and export. The frontend calls a FastAPI API, which validates requests and persists state in SQLite. The README documents additional console placeholders and capabilities; backend excerpts are partial, so internal relationships beyond the shown calls and database operations are not inferred.

Main entry points: [`frontend/lib/api.ts`](https://github.com/afeefa9500/route53-clone/blob/master/frontend/lib/api.ts) (API client), [`backend/main.py`](https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py) (SQLite database), [`frontend/components/Shell.tsx`](https://github.com/afeefa9500/route53-clone/blob/master/frontend/components/Shell.tsx) (Session shell), [`frontend/app/hosted-zones/[id]/page.tsx`](https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/hosted-zones/%5Bid%5D/page.tsx) (Zone details and records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Web console"]
  node_providers["Theme and notifications<br/>[Providers.tsx]"]
  node_placeholders["Console placeholders<br/>[page.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_access["Authentication"]
  node_login["Sign-in page<br/>[page.tsx]"]
  node_session_ui["Session shell<br/>[Shell.tsx]"]
  node_auth_api["Authentication API<br/>[main.py]"]
end

subgraph group_dns["Zone and DNS management"]
  node_zone_list["Hosted zone list<br/>[page.tsx]"]
  node_zone_create["Zone creation<br/>[page.tsx]"]
  node_zone_details["Zone details and records<br/>[page.tsx]"]
  node_zone_api["Hosted zone API<br/>[main.py]"]
  node_record_api["DNS record API<br/>[main.py]"]
  node_transfer_api["Import and export<br/>[main.py]"]
end

subgraph group_storage["Persistence"]
  node_sqlite[("SQLite database<br/>[main.py]")]
end

node_admin(("Console user"))

node_admin -->|"signs in"| node_login
node_login -->|"submits credentials"| node_api_client
node_session_ui -->|"checks session"| node_api_client
node_api_client -->|"calls auth endpoints"| node_auth_api
node_api_client -->|"calls zone endpoints"| node_zone_api
node_api_client -->|"calls record endpoints"| node_record_api
node_api_client -->|"calls transfer endpoints"| node_transfer_api
node_admin -->|"manages zones"| node_zone_list
node_zone_list -->|"loads and edits zones"| node_api_client
node_zone_create -->|"creates zone"| node_api_client
node_zone_details -->|"loads zone and records"| node_api_client
node_zone_details -->|"imports and exports"| node_transfer_api
node_session_ui -->|"uses theme and toasts"| node_providers
node_admin -->|"views console sections"| node_placeholders
node_auth_api -->|"reads and writes sessions"| node_sqlite
node_zone_api -->|"reads and writes zones"| node_sqlite
node_record_api -->|"reads and writes records"| node_sqlite
node_transfer_api -->|"reads and writes records"| node_sqlite

click node_login "https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/login/page.tsx"
click node_session_ui "https://github.com/afeefa9500/route53-clone/blob/master/frontend/components/Shell.tsx"
click node_auth_api "https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py"
click node_providers "https://github.com/afeefa9500/route53-clone/blob/master/frontend/components/Providers.tsx"
click node_zone_list "https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/hosted-zones/page.tsx"
click node_zone_create "https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/hosted-zones/create/page.tsx"
click node_zone_details "https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/hosted-zones/%5Bid%5D/page.tsx"
click node_placeholders "https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/coming-soon/page.tsx"
click node_api_client "https://github.com/afeefa9500/route53-clone/blob/master/frontend/lib/api.ts"
click node_zone_api "https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py"
click node_record_api "https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py"
click node_transfer_api "https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py"
click node_sqlite "https://github.com/afeefa9500/route53-clone/blob/master/backend/main.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_providers,node_placeholders,node_api_client,node_admin toneBlue
class node_login,node_session_ui,node_auth_api toneAmber
class node_zone_list,node_zone_create,node_zone_details,node_zone_api,node_record_api,node_transfer_api toneMint
class node_sqlite toneRose
```

## Components

### Web console

- [Theme and notifications](https://github.com/afeefa9500/route53-clone/blob/master/frontend/components/Providers.tsx): `frontend/components/Providers.tsx`
- [Console placeholders](https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/coming-soon/page.tsx): `frontend/app/coming-soon/page.tsx`
- [API client](https://github.com/afeefa9500/route53-clone/blob/master/frontend/lib/api.ts): `frontend/lib/api.ts`

### Authentication

- [Sign-in page](https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/login/page.tsx): `frontend/app/login/page.tsx`
- [Session shell](https://github.com/afeefa9500/route53-clone/blob/master/frontend/components/Shell.tsx): `frontend/components/Shell.tsx`
- [Authentication API](https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py): `backend/main.py`

### Zone and DNS management

- [Hosted zone list](https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/hosted-zones/page.tsx): `frontend/app/hosted-zones/page.tsx`
- [Zone creation](https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/hosted-zones/create/page.tsx): `frontend/app/hosted-zones/create/page.tsx`
- [Zone details and records](https://github.com/afeefa9500/route53-clone/blob/master/frontend/app/hosted-zones/%5Bid%5D/page.tsx): `frontend/app/hosted-zones/[id]/page.tsx`
- [Hosted zone API](https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py): `backend/main.py`
- [DNS record API](https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py): `backend/main.py`
- [Import and export](https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py): `backend/main.py`

### Persistence

- [SQLite database](https://github.com/afeefa9500/route53-clone/blob/master/backend/main.py): `backend/main.py`

### Other components

- **Console user**

## Connections

- Console user → Sign-in page: signs in (evidence: `README.md`)
- Sign-in page → API client: submits credentials (evidence: `frontend/app/login/page.tsx`)
- Session shell → API client: checks session (evidence: `frontend/components/Shell.tsx`)
- API client → Authentication API: calls auth endpoints (evidence: `README.md`)
- API client → Hosted zone API: calls zone endpoints (evidence: `README.md`)
- API client → DNS record API: calls record endpoints (evidence: `README.md`)
- API client → Import and export: calls transfer endpoints (evidence: `README.md`)
- Console user → Hosted zone list: manages zones (evidence: `frontend/app/hosted-zones/page.tsx`)
- Hosted zone list → API client: loads and edits zones (evidence: `frontend/app/hosted-zones/page.tsx`)
- Zone creation → API client: creates zone (evidence: `frontend/app/hosted-zones/create/page.tsx`)
- Zone details and records → API client: loads zone and records (evidence: `frontend/app/hosted-zones/[id]/page.tsx`)
- Zone details and records → Import and export: imports and exports (evidence: `frontend/app/hosted-zones/[id]/page.tsx`)
- Session shell → Theme and notifications: uses theme and toasts (evidence: `frontend/components/Shell.tsx`)
- Console user → Console placeholders: views console sections
- Authentication API → SQLite database: reads and writes sessions (evidence: `backend/main.py`)
- Hosted zone API → SQLite database: reads and writes zones (evidence: `backend/main.py`)
- DNS record API → SQLite database: reads and writes records (evidence: `backend/main.py`)
- Import and export → SQLite database: reads and writes records (evidence: `backend/main.py`)
