# mouredev/hello-python architecture

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

- Interactive diagram: https://gitdiagram.com/mouredev/hello-python
- Repository: https://github.com/mouredev/hello-python

## Overview

Hello Python is a learning repository: its main user journey is following beginner and intermediate Python lessons, then applying the material in a FastAPI backend course. The backend demonstrates API routing, in-memory and MongoDB-backed users, product endpoints, and two authentication approaches. The README documents these course areas; sampled backend source supports the wiring shown below. The frontend, ChatGPT, and voice-translation courses link to separate projects or gists, so they are not represented as implemented here.

Main entry points: [`Backend/FastAPI/main.py`](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/main.py) (FastAPI application), [`Backend/FastAPI/routers/users_db.py`](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/users_db.py) (Database users API), [`Intermediate/08_python_package_manager.py`](https://github.com/mouredev/hello-python/blob/main/Intermediate/08_python_package_manager.py) (Packages and APIs), [`Backend/FastAPI/db/client.py`](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/db/client.py) (MongoDB client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Python lessons"]
  node_basic_core["Python foundations<br/>[00_helloworld.py]"]
  node_basic_control["Control flow<br/>[08_conditionals.py]"]
  node_basic_functions["Functions and classes<br/>[10_functions.py]"]
  node_basic_modules["Module examples<br/>[13_modules.py]"]
  node_intermediate_core["Intermediate concepts<br/>[00_dates.py]"]
  node_intermediate_functions["Functional tools<br/>[03_lambdas.py]"]
  node_intermediate_files["Files and regex"]
  node_intermediate_packages["Packages and APIs"]
  node_arithmetic_package["Arithmetic package<br/>[arithmetics.py]"]
end

subgraph group_backend["FastAPI backend"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_products["Product endpoints<br/>[products.py]"]
  node_memory_users["In-memory users<br/>[users.py]"]
  node_basic_auth["Basic OAuth2"]
  node_jwt_auth["JWT OAuth2<br/>[jwt_auth_users.py]"]
  node_database_users["Database users API<br/>[users_db.py]"]
end

subgraph group_persistence["MongoDB persistence"]
  node_user_model["User model<br/>[user.py]"]
  node_user_schema["User schemas<br/>[user.py]"]
  node_mongo_client[("MongoDB client<br/>[client.py]")]
end

subgraph group_integrations["External services"]
  node_api_caller(("API client"))
  node_mongodb[("MongoDB")]
  node_pokemon_api["PokéAPI"]
end

node_learner(("Learner"))

node_learner -->|"follows course"| node_basic_core
node_learner -->|"follows course"| node_intermediate_core
node_learner -->|"learns backend"| node_api_app
node_basic_modules -->|"imports example"| node_basic_core
node_intermediate_packages -->|"calls sum"| node_arithmetic_package
node_intermediate_packages -->|"requests data"| node_pokemon_api
node_api_caller -.->|"sends requests"| node_api_app
node_api_app -->|"registers router"| node_products
node_api_app -->|"registers router"| node_memory_users
node_api_app -->|"registers router"| node_basic_auth
node_api_app -->|"registers router"| node_jwt_auth
node_api_app -->|"registers router"| node_database_users
node_database_users -->|"queries users"| node_mongo_client
node_database_users -->|"converts records"| node_user_schema
node_database_users -->|"validates users"| node_user_model
node_mongo_client -->|"connects to"| node_mongodb

click node_basic_core "https://github.com/mouredev/hello-python/blob/main/Basic/00_helloworld.py"
click node_basic_control "https://github.com/mouredev/hello-python/blob/main/Basic/08_conditionals.py"
click node_basic_functions "https://github.com/mouredev/hello-python/blob/main/Basic/10_functions.py"
click node_basic_modules "https://github.com/mouredev/hello-python/blob/main/Basic/13_modules.py"
click node_intermediate_core "https://github.com/mouredev/hello-python/blob/main/Intermediate/00_dates.py"
click node_intermediate_functions "https://github.com/mouredev/hello-python/blob/main/Intermediate/03_lambdas.py"
click node_intermediate_files "https://github.com/mouredev/hello-python/blob/main/Intermediate/06_file_handling.py"
click node_intermediate_packages "https://github.com/mouredev/hello-python/blob/main/Intermediate/08_python_package_manager.py"
click node_arithmetic_package "https://github.com/mouredev/hello-python/blob/main/Intermediate/mypackage/arithmetics.py"
click node_api_app "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/main.py"
click node_products "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/products.py"
click node_memory_users "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/users.py"
click node_basic_auth "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/basic_auth_users.py"
click node_jwt_auth "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/jwt_auth_users.py"
click node_database_users "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/users_db.py"
click node_user_model "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/db/models/user.py"
click node_user_schema "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/db/schemas/user.py"
click node_mongo_client "https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/db/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_basic_core,node_basic_control,node_basic_functions,node_basic_modules,node_intermediate_core,node_intermediate_functions,node_intermediate_files,node_intermediate_packages,node_arithmetic_package toneBlue
class node_api_app,node_products,node_memory_users,node_basic_auth,node_jwt_auth,node_database_users toneAmber
class node_user_model,node_user_schema,node_mongo_client toneMint
class node_api_caller,node_mongodb,node_pokemon_api toneRose
class node_learner toneIndigo
```

## Components

### Python lessons

- [Python foundations](https://github.com/mouredev/hello-python/blob/main/Basic/00_helloworld.py): `Basic/00_helloworld.py`
- [Control flow](https://github.com/mouredev/hello-python/blob/main/Basic/08_conditionals.py): `Basic/08_conditionals.py`
- [Functions and classes](https://github.com/mouredev/hello-python/blob/main/Basic/10_functions.py): `Basic/10_functions.py`
- [Module examples](https://github.com/mouredev/hello-python/blob/main/Basic/13_modules.py): `Basic/13_modules.py`
- [Intermediate concepts](https://github.com/mouredev/hello-python/blob/main/Intermediate/00_dates.py): `Intermediate/00_dates.py`
- [Functional tools](https://github.com/mouredev/hello-python/blob/main/Intermediate/03_lambdas.py): `Intermediate/03_lambdas.py`
- [Files and regex](https://github.com/mouredev/hello-python/blob/main/Intermediate/06_file_handling.py): `Intermediate/06_file_handling.py`
- [Packages and APIs](https://github.com/mouredev/hello-python/blob/main/Intermediate/08_python_package_manager.py): `Intermediate/08_python_package_manager.py`
- [Arithmetic package](https://github.com/mouredev/hello-python/blob/main/Intermediate/mypackage/arithmetics.py): `Intermediate/mypackage/arithmetics.py`

### FastAPI backend

- [FastAPI application](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/main.py): `Backend/FastAPI/main.py`
- [Product endpoints](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/products.py): `Backend/FastAPI/routers/products.py`
- [In-memory users](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/users.py): `Backend/FastAPI/routers/users.py`
- [Basic OAuth2](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/basic_auth_users.py): `Backend/FastAPI/routers/basic_auth_users.py`
- [JWT OAuth2](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/jwt_auth_users.py): `Backend/FastAPI/routers/jwt_auth_users.py`
- [Database users API](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/routers/users_db.py): `Backend/FastAPI/routers/users_db.py`

### MongoDB persistence

- [User model](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/db/models/user.py): `Backend/FastAPI/db/models/user.py`
- [User schemas](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/db/schemas/user.py): `Backend/FastAPI/db/schemas/user.py`
- [MongoDB client](https://github.com/mouredev/hello-python/blob/main/Backend/FastAPI/db/client.py): `Backend/FastAPI/db/client.py`

### External services

- **API client**
- **MongoDB**
- **PokéAPI**

### Other components

- **Learner**

## Connections

- Learner → Python foundations: follows course (evidence: `README.md`)
- Learner → Intermediate concepts: follows course (evidence: `README.md`)
- Learner → FastAPI application: learns backend (evidence: `README.md`)
- Module examples → Python foundations: imports example (evidence: `Basic/13_modules.py`)
- Packages and APIs → Arithmetic package: calls sum (evidence: `Intermediate/08_python_package_manager.py`)
- Packages and APIs → PokéAPI: requests data (evidence: `Intermediate/08_python_package_manager.py`)
- API client → FastAPI application: sends requests
- FastAPI application → Product endpoints: registers router (evidence: `Backend/FastAPI/main.py`)
- FastAPI application → In-memory users: registers router (evidence: `Backend/FastAPI/main.py`)
- FastAPI application → Basic OAuth2: registers router (evidence: `Backend/FastAPI/main.py`)
- FastAPI application → JWT OAuth2: registers router (evidence: `Backend/FastAPI/main.py`)
- FastAPI application → Database users API: registers router (evidence: `Backend/FastAPI/main.py`)
- Database users API → MongoDB client: queries users (evidence: `Backend/FastAPI/routers/users_db.py`)
- Database users API → User schemas: converts records (evidence: `Backend/FastAPI/routers/users_db.py`)
- Database users API → User model: validates users (evidence: `Backend/FastAPI/routers/users_db.py`)
- MongoDB client → MongoDB: connects to (evidence: `Backend/FastAPI/db/client.py`)
