# fortune678/python-practice-programs architecture

> Architecture diagram of the GitHub repository fortune678/python-practice-programs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fortune678/python-practice-programs
- Repository: https://github.com/fortune678/python-practice-programs

## Overview

This repository is a collection of Python practice programs rather than one unified application. The sampled Event Analyzer scripts load event records from a sibling JSON file and print summaries; one is procedural and one wraps the analysis in a class. A separate Litestar entry point registers authentication-related controllers and runs a startup health check. Controller implementations and the authentication README were not sampled, so their internal behavior is not inferred.

Main entry points: [`AuthenticationAPIv2/app.py`](https://github.com/fortune678/python-practice-programs/blob/main/AuthenticationAPIv2/app.py) (Litestar application), [`Event-Analyzer/source_code.py`](https://github.com/fortune678/python-practice-programs/blob/main/Event-Analyzer/source_code.py) (Procedural analyzer), [`Event-Analyzer/source_code_with_class.py`](https://github.com/fortune678/python-practice-programs/blob/main/Event-Analyzer/source_code_with_class.py) (Class-based analyzer), [`AuthenticationAPIv2`](https://github.com/fortune678/python-practice-programs/tree/main/AuthenticationAPIv2) (Auth and user controllers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_events["Event analysis"]
  node_event_script["Procedural analyzer<br/>[source_code.py]"]
  node_event_class["Class-based analyzer"]
end

subgraph group_auth["Authentication API"]
  node_auth_app["Litestar application<br/>[app.py]"]
  node_auth_routes["Auth and user controllers"]
  node_health_check["Startup health check"]
end

node_analyst(("Program user"))

node_analyst -->|"runs"| node_event_script
node_analyst -->|"runs"| node_event_class
node_auth_app -->|"registers routes"| node_auth_routes
node_auth_app -->|"runs at startup"| node_health_check

click node_event_script "https://github.com/fortune678/python-practice-programs/blob/main/Event-Analyzer/source_code.py"
click node_event_class "https://github.com/fortune678/python-practice-programs/blob/main/Event-Analyzer/source_code_with_class.py"
click node_auth_app "https://github.com/fortune678/python-practice-programs/blob/main/AuthenticationAPIv2/app.py"
click node_auth_routes "https://github.com/fortune678/python-practice-programs/tree/main/AuthenticationAPIv2"
click node_health_check "https://github.com/fortune678/python-practice-programs/tree/main/AuthenticationAPIv2"

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_event_script,node_event_class,node_analyst toneBlue
class node_auth_app,node_auth_routes,node_health_check toneAmber
```

## Components

### Event analysis

- [Procedural analyzer](https://github.com/fortune678/python-practice-programs/blob/main/Event-Analyzer/source_code.py): `Event-Analyzer/source_code.py`
- [Class-based analyzer](https://github.com/fortune678/python-practice-programs/blob/main/Event-Analyzer/source_code_with_class.py): `Event-Analyzer/source_code_with_class.py`

### Authentication API

- [Litestar application](https://github.com/fortune678/python-practice-programs/blob/main/AuthenticationAPIv2/app.py): `AuthenticationAPIv2/app.py`
- [Auth and user controllers](https://github.com/fortune678/python-practice-programs/tree/main/AuthenticationAPIv2): `AuthenticationAPIv2`
- [Startup health check](https://github.com/fortune678/python-practice-programs/tree/main/AuthenticationAPIv2): `AuthenticationAPIv2`

### Other components

- **Program user**

## Connections

- Program user → Procedural analyzer: runs (evidence: `Event-Analyzer/source_code.py`)
- Program user → Class-based analyzer: runs (evidence: `Event-Analyzer/source_code_with_class.py`)
- Litestar application → Auth and user controllers: registers routes (evidence: `AuthenticationAPIv2/app.py`)
- Litestar application → Startup health check: runs at startup (evidence: `AuthenticationAPIv2/app.py`)
