# metinmeki/z_padel architecture

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

- Interactive diagram: https://gitdiagram.com/metinmeki/z_padel
- Repository: https://github.com/metinmeki/z_padel

## Overview

This is a Flask web application for operating a padel club and its café: customers can book courts, browse the shop or menu, and register for tournaments; staff administer bookings, sales, sessions, and club operations. The main workflow runs from a customer or staff request through a registered route to domain models and a rendered page or response. Other documented-by-template capabilities include coaching requests, live court snapshots and clips, tabs, and tournament brackets. Evidence is limited to the supplied excerpts and source index; the README was empty, so some feature details and links remain unverified.

Main entry points: [`app/__init__.py`](https://github.com/metinmeki/z_padel/blob/main/app/__init__.py) (Flask app setup), [`app/models/main.py`](https://github.com/metinmeki/z_padel/blob/main/app/models/main.py) (Club domain models), [`app/models/store.py`](https://github.com/metinmeki/z_padel/blob/main/app/models/store.py) (Store and order models), [`app/routes/main.py`](https://github.com/metinmeki/z_padel/blob/main/app/routes/main.py) (Public pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and identity"]
  node_app["Flask app setup<br/>[__init__.py]"]
  node_config["App configuration<br/>[config.py]"]
  node_auth["Login and access<br/>[auth.py]"]
end

subgraph group_club["Club operations"]
  node_home["Public pages<br/>[main.py]"]
  node_booking["Court booking<br/>[booking.py]"]
  node_admin["Club administration<br/>[admin.py]"]
end

subgraph group_commerce["Sales and commerce"]
  node_pos["Point of sale<br/>[pos.py]"]
  node_tabs["Customer tabs<br/>[tabs.py]"]
  node_storefront["Online store<br/>[store.py]"]
  node_menu["Café menu<br/>[menu.py]"]
end

subgraph group_events["Community and media"]
  node_tournaments["Tournament management<br/>[tournaments.py]"]
end

subgraph group_domain["Domain data"]
  node_clubdata["Club domain models<br/>[main.py]"]
  node_storedata["Store and order models<br/>[store.py]"]
  node_expenses["Expense model<br/>[expenses.py]"]
end

node_visitor(("Customer"))
node_staff(("Club staff"))
node_camera["Court camera service"]

node_visitor -->|"requests pages"| node_app
node_staff -->|"uses operations"| node_app
node_app -->|"loads settings"| node_config
node_app -->|"registers route"| node_auth
node_app -->|"registers route"| node_home
node_app -->|"registers route"| node_admin
node_app -->|"registers route"| node_booking
node_app -->|"registers route"| node_storefront
node_app -->|"registers route"| node_pos
node_app -->|"registers route"| node_tabs
node_app -->|"registers route"| node_tournaments
node_app -->|"registers route"| node_menu
node_auth -->|"authenticates users"| node_clubdata
node_booking -->|"reads and writes"| node_clubdata
node_admin -->|"manages records"| node_clubdata
node_admin -->|"manages products"| node_storedata
node_home -->|"reads club data"| node_clubdata
node_home -->|"reads products"| node_storedata
node_pos -->|"updates sessions"| node_clubdata
node_pos -->|"records sales"| node_storedata
node_tabs -->|"updates tabs"| node_clubdata
node_tabs -->|"updates stock"| node_storedata
node_storefront -->|"serves store"| node_storedata
node_menu -->|"resolves places"| node_clubdata
node_menu -->|"handles menu orders"| node_storedata
node_tournaments -->|"stores registrations"| node_clubdata
node_home -->|"fetches snapshots"| node_camera

click node_app "https://github.com/metinmeki/z_padel/blob/main/app/__init__.py"
click node_config "https://github.com/metinmeki/z_padel/blob/main/config.py"
click node_auth "https://github.com/metinmeki/z_padel/blob/main/app/routes/auth.py"
click node_home "https://github.com/metinmeki/z_padel/blob/main/app/routes/main.py"
click node_booking "https://github.com/metinmeki/z_padel/blob/main/app/routes/booking.py"
click node_admin "https://github.com/metinmeki/z_padel/blob/main/app/routes/admin.py"
click node_pos "https://github.com/metinmeki/z_padel/blob/main/app/routes/pos.py"
click node_tabs "https://github.com/metinmeki/z_padel/blob/main/app/routes/tabs.py"
click node_storefront "https://github.com/metinmeki/z_padel/blob/main/app/routes/store.py"
click node_menu "https://github.com/metinmeki/z_padel/blob/main/app/routes/menu.py"
click node_tournaments "https://github.com/metinmeki/z_padel/blob/main/app/routes/tournaments.py"
click node_clubdata "https://github.com/metinmeki/z_padel/blob/main/app/models/main.py"
click node_storedata "https://github.com/metinmeki/z_padel/blob/main/app/models/store.py"
click node_expenses "https://github.com/metinmeki/z_padel/blob/main/app/models/expenses.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_app,node_config,node_auth toneBlue
class node_home,node_booking,node_admin toneAmber
class node_pos,node_tabs,node_storefront,node_menu toneMint
class node_tournaments toneRose
class node_clubdata,node_storedata,node_expenses,node_visitor,node_staff,node_camera toneIndigo
```

## Components

### Web entry and identity

- [Flask app setup](https://github.com/metinmeki/z_padel/blob/main/app/__init__.py): `app/__init__.py`
- [App configuration](https://github.com/metinmeki/z_padel/blob/main/config.py): `config.py`
- [Login and access](https://github.com/metinmeki/z_padel/blob/main/app/routes/auth.py): `app/routes/auth.py`

### Club operations

- [Public pages](https://github.com/metinmeki/z_padel/blob/main/app/routes/main.py): `app/routes/main.py`
- [Court booking](https://github.com/metinmeki/z_padel/blob/main/app/routes/booking.py): `app/routes/booking.py`
- [Club administration](https://github.com/metinmeki/z_padel/blob/main/app/routes/admin.py): `app/routes/admin.py`

### Sales and commerce

- [Point of sale](https://github.com/metinmeki/z_padel/blob/main/app/routes/pos.py): `app/routes/pos.py`
- [Customer tabs](https://github.com/metinmeki/z_padel/blob/main/app/routes/tabs.py): `app/routes/tabs.py`
- [Online store](https://github.com/metinmeki/z_padel/blob/main/app/routes/store.py): `app/routes/store.py`
- [Café menu](https://github.com/metinmeki/z_padel/blob/main/app/routes/menu.py): `app/routes/menu.py`

### Community and media

- [Tournament management](https://github.com/metinmeki/z_padel/blob/main/app/routes/tournaments.py): `app/routes/tournaments.py`

### Domain data

- [Club domain models](https://github.com/metinmeki/z_padel/blob/main/app/models/main.py): `app/models/main.py`
- [Store and order models](https://github.com/metinmeki/z_padel/blob/main/app/models/store.py): `app/models/store.py`
- [Expense model](https://github.com/metinmeki/z_padel/blob/main/app/models/expenses.py): `app/models/expenses.py`

### Other components

- **Customer**
- **Club staff**
- **Court camera service**

## Connections

- Customer → Flask app setup: requests pages
- Club staff → Flask app setup: uses operations
- Flask app setup → App configuration: loads settings (evidence: `app/__init__.py`)
- Flask app setup → Login and access: registers route (evidence: `app/__init__.py`)
- Flask app setup → Public pages: registers route (evidence: `app/__init__.py`)
- Flask app setup → Club administration: registers route (evidence: `app/__init__.py`)
- Flask app setup → Court booking: registers route (evidence: `app/__init__.py`)
- Flask app setup → Online store: registers route (evidence: `app/__init__.py`)
- Flask app setup → Point of sale: registers route (evidence: `app/__init__.py`)
- Flask app setup → Customer tabs: registers route (evidence: `app/__init__.py`)
- Flask app setup → Tournament management: registers route (evidence: `app/__init__.py`)
- Flask app setup → Café menu: registers route (evidence: `app/__init__.py`)
- Login and access → Club domain models: authenticates users (evidence: `app/routes/auth.py`)
- Court booking → Club domain models: reads and writes (evidence: `app/routes/booking.py`)
- Club administration → Club domain models: manages records (evidence: `app/routes/admin.py`)
- Club administration → Store and order models: manages products (evidence: `app/routes/admin.py`)
- Public pages → Club domain models: reads club data (evidence: `app/routes/main.py`)
- Public pages → Store and order models: reads products (evidence: `app/routes/main.py`)
- Point of sale → Club domain models: updates sessions (evidence: `app/routes/pos.py`)
- Point of sale → Store and order models: records sales (evidence: `app/routes/pos.py`)
- Customer tabs → Club domain models: updates tabs (evidence: `app/routes/tabs.py`)
- Customer tabs → Store and order models: updates stock (evidence: `app/routes/tabs.py`)
- Online store → Store and order models: serves store (evidence: `app/routes/store.py`)
- Café menu → Club domain models: resolves places (evidence: `app/routes/menu.py`)
- Café menu → Store and order models: handles menu orders (evidence: `app/routes/menu.py`)
- Tournament management → Club domain models: stores registrations (evidence: `app/routes/tournaments.py`)
- Public pages → Court camera service: fetches snapshots (evidence: `app/routes/main.py`)
