# f-mtqn/sistemtiketevent_awan architecture

> Architecture diagram of the GitHub repository f-mtqn/sistemtiketevent_awan, 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/f-mtqn/sistemtiketevent_awan
- Repository: https://github.com/f-mtqn/sistemtiketevent_awan

## Overview

Sistem Tiket Event is a browser-based event-ticket sales app. Users manage events and buyers, then create, filter, update, and delete ticket orders; order operations validate availability and adjust stock. The frontend’s router selects a page, page modules use a fetch wrapper, and FastAPI serves the API and static app. Backend data is held in seeded in-memory dictionaries, not a persistent database. The graph follows the documented capabilities; unsampled details are represented only where the README supports them.

Main entry points: [`backend/main.py`](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/backend/main.py) (FastAPI endpoints), [`frontend/static/api.js`](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/api.js) (Fetch client), [`frontend/static/app.js`](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/app.js) (Page router), [`frontend/static/events.js`](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/events.js) (Event pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser application"]
  node_router["Page router<br/>[app.js]"]
  node_event_ui["Event pages<br/>[events.js]"]
  node_buyer_ui["Buyer pages<br/>[buyers.js]"]
  node_order_ui["Order pages<br/>[orders.js]"]
  node_api_client["Fetch client<br/>[api.js]"]
  node_app_shell["HTML shell<br/>[index.html]"]
end

subgraph group_backend["API and domain"]
  node_api["FastAPI endpoints<br/>[main.py]"]
end

subgraph group_state["In-memory state"]
  node_event_state[("Event records<br/>[main.py]")]
  node_buyer_state[("Buyer records<br/>[main.py]")]
  node_order_state[("Order records<br/>[main.py]")]
end

node_browser(("Browser user"))

node_browser -.->|"opens app"| node_app_shell
node_api -->|"serves shell"| node_app_shell
node_router -->|"renders"| node_event_ui
node_router -->|"renders"| node_buyer_ui
node_router -->|"renders"| node_order_ui
node_event_ui -->|"requests data"| node_api_client
node_buyer_ui -->|"requests data"| node_api_client
node_order_ui -->|"requests data"| node_api_client
node_api_client -->|"sends HTTP"| node_api
node_api -->|"reads and writes"| node_event_state
node_api -->|"reads and writes"| node_buyer_state
node_api -->|"reads and writes"| node_order_state
node_api -->|"adjusts ticket stock"| node_event_state
node_api -->|"validates buyer"| node_buyer_state
node_api -->|"validates order links"| node_order_state

click node_router "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/app.js"
click node_event_ui "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/events.js"
click node_buyer_ui "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/buyers.js"
click node_order_ui "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/orders.js"
click node_api_client "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/api.js"
click node_app_shell "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/index.html"
click node_api "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/backend/main.py"
click node_event_state "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/backend/main.py"
click node_buyer_state "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/backend/main.py"
click node_order_state "https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/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_router,node_event_ui,node_buyer_ui,node_order_ui,node_api_client,node_app_shell,node_browser toneBlue
class node_api toneAmber
class node_event_state,node_buyer_state,node_order_state toneMint
```

## Components

### Browser application

- [Page router](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/app.js): `frontend/static/app.js`
- [Event pages](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/events.js): `frontend/static/events.js`
- [Buyer pages](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/buyers.js): `frontend/static/buyers.js`
- [Order pages](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/orders.js): `frontend/static/orders.js`
- [Fetch client](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/static/api.js): `frontend/static/api.js`
- [HTML shell](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/frontend/index.html): `frontend/index.html`

### API and domain

- [FastAPI endpoints](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/backend/main.py): `backend/main.py`

### In-memory state

- [Event records](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/backend/main.py): `backend/main.py`
- [Buyer records](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/backend/main.py): `backend/main.py`
- [Order records](https://github.com/f-mtqn/sistemtiketevent_awan/blob/main/backend/main.py): `backend/main.py`

### Other components

- **Browser user**

## Connections

- Browser user → HTML shell: opens app (evidence: `README.md`)
- FastAPI endpoints → HTML shell: serves shell (evidence: `backend/main.py`)
- Page router → Event pages: renders (evidence: `frontend/static/app.js`)
- Page router → Buyer pages: renders (evidence: `frontend/static/app.js`)
- Page router → Order pages: renders (evidence: `frontend/static/app.js`)
- Event pages → Fetch client: requests data (evidence: `frontend/static/events.js`)
- Buyer pages → Fetch client: requests data (evidence: `frontend/static/buyers.js`)
- Order pages → Fetch client: requests data (evidence: `frontend/static/orders.js`)
- Fetch client → FastAPI endpoints: sends HTTP (evidence: `frontend/static/api.js`)
- FastAPI endpoints → Event records: reads and writes (evidence: `backend/main.py`)
- FastAPI endpoints → Buyer records: reads and writes (evidence: `backend/main.py`)
- FastAPI endpoints → Order records: reads and writes (evidence: `backend/main.py`)
- FastAPI endpoints → Event records: adjusts ticket stock (evidence: `backend/main.py`)
- FastAPI endpoints → Buyer records: validates buyer (evidence: `backend/main.py`)
- FastAPI endpoints → Order records: validates order links (evidence: `backend/main.py`)
