# melias198/shiftz architecture

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

- Interactive diagram: https://gitdiagram.com/melias198/shiftz
- Repository: https://github.com/melias198/shiftz

## Overview

1. **Repository shape**
   - Shiftz is a single Django monolith organized into domain apps: `accounts`, `cars`, `carts`, `categories`, and `orders`.
   - It is primarily a server-rendered web application rather than an API-first system.

2. **Project shell**
   - The `shiftz` package holds the Django project wiring: settings, root URL routing, ASGI/WSGI entrypoints, and the default landing view.
   - Shared site-level templates live in `templates/`, while global frontend assets live in `static/`.

3. **Presentation layer**
   - Each app owns its own templates, which indicates page-by-page server-side rendering with Django templates.
   - The UI is built from reusable base layout templates plus app-specific pages for browse, account, cart, and checkout flows.

4. **Accounts subsystem**
   - `accounts` covers registration, sign-in, profile management, and customer/order-related pages.
   - It also includes email verification and password-reset screens, plus a `signals.py` file that likely automates account lifecycle behavior.
   - The templates suggest both regular user and seller/admin-facing account screens.

5. **Catalog subsystem**
   - `cars` is the main product-catalog app: car listing, car detail pages, search, and filtering.
   - `categories` provides taxonomy support for grouping or browsing cars by category/brand-type relationships.

6. **Cart subsystem**
   - `carts` acts as the shopping basket layer between browsing and checkout.
   - Its dedicated cart page suggests it stores selected items and prepares them for order submission.

7. **Order and payment subsystem**
   - `orders` handles checkout, payment, order completion/failure, and order tracking.
   - The presence of `ssl.py` and `PaymentGatewaySettings` migrations shows integration with SSL Commerce as the payment boundary.
   - Order model migrations indicate the order lifecycle and payment/status fields have evolved over time.

8. **Data model and persistence**
   - Persistence is backed by SQLite (`db.sqlite3`) for application data.
   - Domain data is split by app through Django models and migrations, which is the main boundary for business state.

9. **Media and static content**
   - Uploaded images are stored under `media/photos/brands` and `media/photos/cars`, so car/brand imagery is runtime content, not bundled assets.
   - CSS, fonts, images, and JS in `static/` are the shared presentation assets for the frontend.

10. **Back-office/admin boundary**
   - Every major app has an `admin.py`, showing Django admin is used as an operational back-office for managing models.
   - The account templates for uploading brands/cars and viewing admin order details imply a seller/admin workflow alongside the customer workflow.

11. **Primary runtime flows**
   - Browse/search flow: browser → `cars` views/templates → catalog data from SQLite/media.
   - Purchase flow: browser → `carts` → `orders` → SSL Commerce payment boundary → order confirmation/tracking.
   - Account flow: browser → `accounts` → authentication/verification/password reset → profile and order history.

12. **Key architectural boundary**
   - The app boundary is centered on Django views/forms/models: views orchestrate pages, forms validate input, models own domain state, and templates render results.
   - External dependencies only become visible at the payment and identity edges, while the rest of the system stays self-contained inside Django.

Main entry points: [`orders`](https://github.com/melias198/shiftz/tree/main/orders) (Orders), [`shiftz`](https://github.com/melias198/shiftz/tree/main/shiftz) (shiftz), [`accounts`](https://github.com/melias198/shiftz/tree/main/accounts) (Accounts), [`cars`](https://github.com/melias198/shiftz/tree/main/cars) (Cars)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_project["Project shell"]
  node_shiftz_project["shiftz<br/>django project"]
end

subgraph group_group_presentation["Presentation"]
  node_root_templates["Base pages<br/>shared templates"]
  node_static_assets["Static assets<br/>frontend assets"]
end

subgraph group_group_domain["Domain apps"]
  node_accounts_app["Accounts<br/>auth/profile app"]
  node_accounts_ui["Account pages<br/>templates"]
  node_accounts_signals["Account signals<br/>lifecycle hooks<br/>[signals.py]"]
  node_cars_app["Cars<br/>catalog app"]
  node_cars_ui["Catalog pages<br/>templates"]
  node_categories_app["Categories<br/>taxonomy app"]
  node_carts_app["Carts<br/>basket app"]
  node_carts_ui["Cart page<br/>templates"]
  node_orders_app["Orders<br/>checkout app"]
  node_orders_ui["Order pages<br/>templates"]
  node_payment_boundary{{"SSL Commerce<br/>payment boundary<br/>[ssl.py]"}}
  node_admin_backoffice["Django admin<br/>operational back-office"]
end

subgraph group_group_data["Data & runtime"]
  node_db_sqlite[("SQLite DB<br/>database<br/>[db.sqlite3]")]
  node_uploads_media["Media uploads<br/>runtime media"]
  node_shared_models["Domain models<br/>migrations/models"]
end

node_shiftz_project -->|"renders"| node_root_templates
node_shiftz_project -->|"serves"| node_static_assets
node_shiftz_project -->|"routes"| node_accounts_app
node_shiftz_project -->|"routes"| node_cars_app
node_shiftz_project -->|"routes"| node_carts_app
node_shiftz_project -->|"routes"| node_orders_app
node_accounts_app -->|"renders"| node_accounts_ui
node_accounts_app -->|"triggers"| node_accounts_signals
node_accounts_app -->|"uses"| node_shared_models
node_cars_app -->|"renders"| node_cars_ui
node_cars_app -->|"groups by"| node_categories_app
node_cars_app -->|"reads"| node_uploads_media
node_cars_app -->|"uses"| node_shared_models
node_categories_app -->|"uses"| node_shared_models
node_carts_app -->|"renders"| node_carts_ui
node_carts_app -->|"hands off to"| node_orders_app
node_carts_app -->|"uses"| node_shared_models
node_orders_app -->|"renders"| node_orders_ui
node_orders_app -->|"integrates"| node_payment_boundary
node_orders_app -->|"uses"| node_shared_models
node_shared_models -->|"persists to"| node_db_sqlite
node_admin_backoffice -->|"manages"| node_accounts_app
node_admin_backoffice -->|"manages"| node_cars_app
node_admin_backoffice -->|"manages"| node_orders_app
node_admin_backoffice -->|"manages"| node_categories_app
node_shared_models -->|"references"| node_uploads_media
node_accounts_app -->|"shows history"| node_orders_app

click node_shiftz_project "https://github.com/melias198/shiftz/tree/main/shiftz"
click node_root_templates "https://github.com/melias198/shiftz/tree/main/templates"
click node_static_assets "https://github.com/melias198/shiftz/tree/main/static"
click node_accounts_app "https://github.com/melias198/shiftz/tree/main/accounts"
click node_accounts_ui "https://github.com/melias198/shiftz/tree/main/accounts/templates/accounts"
click node_accounts_signals "https://github.com/melias198/shiftz/blob/main/accounts/signals.py"
click node_cars_app "https://github.com/melias198/shiftz/tree/main/cars"
click node_cars_ui "https://github.com/melias198/shiftz/tree/main/cars/templates/cars"
click node_categories_app "https://github.com/melias198/shiftz/tree/main/categories"
click node_carts_app "https://github.com/melias198/shiftz/tree/main/carts"
click node_carts_ui "https://github.com/melias198/shiftz/tree/main/carts/templates/carts"
click node_orders_app "https://github.com/melias198/shiftz/tree/main/orders"
click node_orders_ui "https://github.com/melias198/shiftz/tree/main/orders/templates/orders"
click node_payment_boundary "https://github.com/melias198/shiftz/blob/main/orders/ssl.py"
click node_db_sqlite "https://github.com/melias198/shiftz/blob/main/db.sqlite3"
click node_uploads_media "https://github.com/melias198/shiftz/tree/main/media"

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_shiftz_project toneBlue
class node_root_templates,node_static_assets toneAmber
class node_accounts_app,node_accounts_ui,node_accounts_signals,node_cars_app,node_cars_ui,node_categories_app,node_carts_app,node_carts_ui,node_orders_app,node_orders_ui,node_payment_boundary,node_admin_backoffice toneMint
class node_db_sqlite,node_uploads_media,node_shared_models toneRose
```

## Components

### Project shell

Django wiring and shared site entrypoints

- [shiftz](https://github.com/melias198/shiftz/tree/main/shiftz): django project · Settings, root URLs, ASGI/WSGI, and landing view · `shiftz`

### Presentation

Server-rendered templates and shared static assets

- [Base pages](https://github.com/melias198/shiftz/tree/main/templates): shared templates · Site-wide layout and landing page templates · `templates`
- [Static assets](https://github.com/melias198/shiftz/tree/main/static): frontend assets · Shared CSS, JS, fonts, and images · `static`

### Domain apps

Core business subsystems organized as Django apps

- [Accounts](https://github.com/melias198/shiftz/tree/main/accounts): auth/profile app · Registration, login, profile, verification, and account pages · `accounts`
- [Account pages](https://github.com/melias198/shiftz/tree/main/accounts/templates/accounts): templates · Sign-in, sign-up, profile, admin, reset, and verification screens · `accounts/templates/accounts`
- [Account signals](https://github.com/melias198/shiftz/blob/main/accounts/signals.py): lifecycle hooks · Automated account-side behavior and notifications · `accounts/signals.py`
- [Cars](https://github.com/melias198/shiftz/tree/main/cars): catalog app · Car listing, detail, search, and filtering · `cars`
- [Catalog pages](https://github.com/melias198/shiftz/tree/main/cars/templates/cars): templates · Browse, detail, search, and filter views for cars · `cars/templates/cars`
- [Categories](https://github.com/melias198/shiftz/tree/main/categories): taxonomy app · Car grouping and category relationships · `categories`
- [Carts](https://github.com/melias198/shiftz/tree/main/carts): basket app · Shopping basket and item selection before checkout · `carts`
- [Cart page](https://github.com/melias198/shiftz/tree/main/carts/templates/carts): templates · Cart review and handoff to checkout · `carts/templates/carts`
- [Orders](https://github.com/melias198/shiftz/tree/main/orders): checkout app · Checkout, payment, completion, tracking, and order history · `orders`
- [Order pages](https://github.com/melias198/shiftz/tree/main/orders/templates/orders): templates · Place order, completion, failure, and tracking screens · `orders/templates/orders`
- [SSL Commerce](https://github.com/melias198/shiftz/blob/main/orders/ssl.py): payment boundary · External payment integration surfaced through order processing · `orders/ssl.py`
- **Django admin**: operational back-office · Model administration across the major apps

### Data & runtime

Persistence and uploaded media

- [SQLite DB](https://github.com/melias198/shiftz/blob/main/db.sqlite3): database · Primary persistence for Django models and migrations · `db.sqlite3`
- [Media uploads](https://github.com/melias198/shiftz/tree/main/media): runtime media · Brand and car photos stored under media/ · `media`
- **Domain models**: migrations/models · App-owned models and migrations define business state

## Connections

- shiftz → Base pages: renders · Project landing and shared layout use base templates
- shiftz → Static assets: serves · Django serves shared static presentation assets
- shiftz → Accounts: routes · Root project dispatches into account flows
- shiftz → Cars: routes · Root project dispatches into catalog flows
- shiftz → Carts: routes · Root project dispatches into cart flows
- shiftz → Orders: routes · Root project dispatches into checkout flows
- Accounts → Account pages: renders · Account views render dedicated auth/profile templates
- Accounts → Account signals: triggers · Lifecycle hooks support verification and account automation
- Accounts → Domain models: uses · Account state is persisted through app models and migrations
- Cars → Catalog pages: renders · Catalog views render browse/search/detail pages
- Cars → Categories: groups by · Catalog browsing is organized by categories
- Cars → Media uploads: reads · Car and brand images are runtime content
- Cars → Domain models: uses · Catalog data is defined in app models and migrations
- Categories → Domain models: uses · Taxonomy state is stored in app models and migrations
- Carts → Cart page: renders · Basket views render the cart page
- Carts → Orders: hands off to · Cart contents move into checkout and order placement
- Carts → Domain models: uses · Cart state is persisted through app models and migrations
- Orders → Order pages: renders · Checkout, order completion, failure, and tracking pages
- Orders → SSL Commerce: integrates · Payment processing crosses into SSL Commerce
- Orders → Domain models: uses · Order lifecycle and payment status live in models and migrations
- Domain models → SQLite DB: persists to · Django models and migrations store state in SQLite
- Django admin → Accounts: manages · Admin workflows cover account data and operations
- Django admin → Cars: manages · Admin workflows cover catalog data and uploads
- Django admin → Orders: manages · Admin workflows cover order review and tracking
- Django admin → Categories: manages · Admin workflows cover taxonomy data
- Domain models → Media uploads: references · Model records point to uploaded brand and car photos
- Accounts → Orders: shows history · Account pages surface order history and details
