# seangt01/eflora-system architecture

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

- Interactive diagram: https://gitdiagram.com/seangt01/eflora-system
- Repository: https://github.com/seangt01/eflora-system

## Overview

This is a Flask-based multi-store commerce platform: customers browse stores and place orders, sellers manage products and fulfillment, and riders support delivery. The graph preserves the major role-based workflows, checkout and payment verification, communications, and operational reporting. The README is empty and several central modules are unsampled, so those components are included from the source index and tree; links are limited to relationships evidenced by excerpts or index references.

Main entry points: [`app/models.py`](https://github.com/seangt01/eflora-system/blob/master/app/models.py) (Commerce data models), [`app/__init__.py`](https://github.com/seangt01/eflora-system/blob/master/app/__init__.py) (Flask application), [`app/auth.py`](https://github.com/seangt01/eflora-system/blob/master/app/auth.py) (Account access), [`app/utils/otp_delivery.py`](https://github.com/seangt01/eflora-system/blob/master/app/utils/otp_delivery.py) (OTP delivery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Application Core"]
  node_app["Flask application<br/>[__init__.py]"]
  node_extensions["Framework extensions<br/>[extensions.py]"]
  node_models[("Commerce data models<br/>[models.py]")]
  node_templates["Pages and storefront"]
end

subgraph group_commerce["Marketplace Commerce"]
  node_customer["Customer workflows<br/>[customer.py]"]
  node_checkout["Cart and checkout<br/>[checkout_routes.py]"]
  node_payment["Payment verification"]
  node_chat["Customer chat<br/>[chat.py]"]
  node_chat_socket["Chat transport<br/>[chat_socket.py]"]
end

subgraph group_operations["Store Operations"]
  node_seller["Seller workflows<br/>[seller.py]"]
  node_store_admin["Store administration"]
  node_rider["Rider workflows<br/>[rider.py]"]
  node_archive["Product archiving<br/>[archive_routes.py]"]
  node_cloudinary["Image storage helpers"]
  node_seller_notifications["Seller notifications"]
end

subgraph group_identity["Identity and Messaging"]
  node_auth["Account access<br/>[auth.py]"]
  node_phone_utils["Phone identity helpers<br/>[phone_utils.py]"]
  node_otp_service["OTP verification<br/>[otp_service.py]"]
  node_otp_delivery["OTP delivery<br/>[otp_delivery.py]"]
  node_email["Email delivery<br/>[email_helper.py]"]
  node_sms["SMS delivery<br/>[sms_helper.py]"]
  node_push["Push notifications<br/>[push.py]"]
end

subgraph group_insights["Reporting and Health"]
  node_reports["Reports and forecasts<br/>[report_service.py]"]
  node_system_checker["System health checks<br/>[runner.py]"]
end

node_customer_actor(("Customer"))
node_seller_actor(("Seller"))
node_rider_actor(("Rider"))
node_email_service["Email provider"]
node_sms_service["SMS provider"]
node_fcm["Firebase messaging"]

node_customer_actor -.->|"signs in"| node_auth
node_customer_actor -.->|"uses storefront"| node_customer
node_seller_actor -.->|"manages store"| node_seller
node_rider_actor -.->|"handles delivery"| node_rider
node_app -->|"registers routes"| node_auth
node_app -->|"registers routes"| node_templates
node_app -->|"registers routes"| node_checkout
node_app -->|"registers routes"| node_store_admin
node_app -->|"loads models"| node_models
node_auth -->|"uses account records"| node_models
node_auth -->|"normalizes identifiers"| node_phone_utils
node_auth -->|"generates codes"| node_otp_service
node_auth -->|"delivers codes"| node_otp_delivery
node_otp_delivery -->|"resolves destination"| node_phone_utils
node_otp_delivery -->|"uses code helpers"| node_otp_service
node_otp_delivery -->|"sends email"| node_email
node_otp_delivery -->|"sends SMS"| node_sms
node_email -->|"queues messages"| node_email_service
node_sms -->|"sends messages"| node_sms_service
node_checkout -->|"creates orders"| node_models
node_checkout -->|"notifies sellers"| node_seller_notifications
node_checkout -->|"uses image helpers"| node_cloudinary
node_payment -->|"updates payment records"| node_models
node_store_admin -->|"delivers invitations"| node_otp_delivery
node_store_admin -->|"sends invitation email"| node_email
node_store_admin -->|"sends invitation SMS"| node_sms
node_store_admin -->|"manages admin records"| node_models
node_archive -->|"archives products"| node_models
node_archive -->|"deletes images"| node_cloudinary
node_cloudinary -.->|"optional storage integration"| node_email_service
node_push -->|"sends notifications"| node_fcm
node_seller_notifications -->|"creates alerts"| node_models
node_seller_notifications -->|"sends stock alerts"| node_email
node_chat -.->|"uses transport"| node_chat_socket
node_reports -->|"queries commerce data"| node_models
node_system_checker -->|"checks application"| node_app
node_system_checker -.->|"checks inventory"| node_models

click node_app "https://github.com/seangt01/eflora-system/blob/master/app/__init__.py"
click node_extensions "https://github.com/seangt01/eflora-system/blob/master/app/extensions.py"
click node_models "https://github.com/seangt01/eflora-system/blob/master/app/models.py"
click node_templates "https://github.com/seangt01/eflora-system/blob/master/app/templates_routes.py"
click node_auth "https://github.com/seangt01/eflora-system/blob/master/app/auth.py"
click node_phone_utils "https://github.com/seangt01/eflora-system/blob/master/app/utils/phone_utils.py"
click node_otp_service "https://github.com/seangt01/eflora-system/blob/master/app/utils/otp_service.py"
click node_otp_delivery "https://github.com/seangt01/eflora-system/blob/master/app/utils/otp_delivery.py"
click node_email "https://github.com/seangt01/eflora-system/blob/master/app/utils/email_helper.py"
click node_sms "https://github.com/seangt01/eflora-system/blob/master/app/utils/sms_helper.py"
click node_push "https://github.com/seangt01/eflora-system/blob/master/app/utils/push.py"
click node_customer "https://github.com/seangt01/eflora-system/blob/master/app/customer.py"
click node_checkout "https://github.com/seangt01/eflora-system/blob/master/app/checkout_routes.py"
click node_payment "https://github.com/seangt01/eflora-system/blob/master/app/payment_verification_routes.py"
click node_chat "https://github.com/seangt01/eflora-system/blob/master/app/chat.py"
click node_chat_socket "https://github.com/seangt01/eflora-system/blob/master/app/chat_socket.py"
click node_seller "https://github.com/seangt01/eflora-system/blob/master/app/seller.py"
click node_store_admin "https://github.com/seangt01/eflora-system/blob/master/app/store_admin_routes.py"
click node_rider "https://github.com/seangt01/eflora-system/blob/master/app/rider.py"
click node_archive "https://github.com/seangt01/eflora-system/blob/master/app/archive_routes.py"
click node_cloudinary "https://github.com/seangt01/eflora-system/blob/master/app/utils/cloudinary_helper.py"
click node_seller_notifications "https://github.com/seangt01/eflora-system/blob/master/app/utils/seller_notifications.py"
click node_reports "https://github.com/seangt01/eflora-system/blob/master/app/utils/report_service.py"
click node_system_checker "https://github.com/seangt01/eflora-system/blob/master/app/system_checker/runner.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_extensions,node_models,node_templates toneBlue
class node_customer,node_checkout,node_payment,node_chat,node_chat_socket toneAmber
class node_seller,node_store_admin,node_rider,node_archive,node_cloudinary,node_seller_notifications toneMint
class node_auth,node_phone_utils,node_otp_service,node_otp_delivery,node_email,node_sms,node_push toneRose
class node_reports,node_system_checker,node_customer_actor,node_seller_actor,node_rider_actor,node_email_service,node_sms_service,node_fcm toneIndigo
```

## Components

### Application Core

- [Flask application](https://github.com/seangt01/eflora-system/blob/master/app/__init__.py): `app/__init__.py`
- [Framework extensions](https://github.com/seangt01/eflora-system/blob/master/app/extensions.py): `app/extensions.py`
- [Commerce data models](https://github.com/seangt01/eflora-system/blob/master/app/models.py): `app/models.py`
- [Pages and storefront](https://github.com/seangt01/eflora-system/blob/master/app/templates_routes.py): `app/templates_routes.py`

### Marketplace Commerce

- [Customer workflows](https://github.com/seangt01/eflora-system/blob/master/app/customer.py): `app/customer.py`
- [Cart and checkout](https://github.com/seangt01/eflora-system/blob/master/app/checkout_routes.py): `app/checkout_routes.py`
- [Payment verification](https://github.com/seangt01/eflora-system/blob/master/app/payment_verification_routes.py): `app/payment_verification_routes.py`
- [Customer chat](https://github.com/seangt01/eflora-system/blob/master/app/chat.py): `app/chat.py`
- [Chat transport](https://github.com/seangt01/eflora-system/blob/master/app/chat_socket.py): `app/chat_socket.py`

### Store Operations

- [Seller workflows](https://github.com/seangt01/eflora-system/blob/master/app/seller.py): `app/seller.py`
- [Store administration](https://github.com/seangt01/eflora-system/blob/master/app/store_admin_routes.py): `app/store_admin_routes.py`
- [Rider workflows](https://github.com/seangt01/eflora-system/blob/master/app/rider.py): `app/rider.py`
- [Product archiving](https://github.com/seangt01/eflora-system/blob/master/app/archive_routes.py): `app/archive_routes.py`
- [Image storage helpers](https://github.com/seangt01/eflora-system/blob/master/app/utils/cloudinary_helper.py): `app/utils/cloudinary_helper.py`
- [Seller notifications](https://github.com/seangt01/eflora-system/blob/master/app/utils/seller_notifications.py): `app/utils/seller_notifications.py`

### Identity and Messaging

- [Account access](https://github.com/seangt01/eflora-system/blob/master/app/auth.py): `app/auth.py`
- [Phone identity helpers](https://github.com/seangt01/eflora-system/blob/master/app/utils/phone_utils.py): `app/utils/phone_utils.py`
- [OTP verification](https://github.com/seangt01/eflora-system/blob/master/app/utils/otp_service.py): `app/utils/otp_service.py`
- [OTP delivery](https://github.com/seangt01/eflora-system/blob/master/app/utils/otp_delivery.py): `app/utils/otp_delivery.py`
- [Email delivery](https://github.com/seangt01/eflora-system/blob/master/app/utils/email_helper.py): `app/utils/email_helper.py`
- [SMS delivery](https://github.com/seangt01/eflora-system/blob/master/app/utils/sms_helper.py): `app/utils/sms_helper.py`
- [Push notifications](https://github.com/seangt01/eflora-system/blob/master/app/utils/push.py): `app/utils/push.py`

### Reporting and Health

- [Reports and forecasts](https://github.com/seangt01/eflora-system/blob/master/app/utils/report_service.py): `app/utils/report_service.py`
- [System health checks](https://github.com/seangt01/eflora-system/blob/master/app/system_checker/runner.py): `app/system_checker/runner.py`

### Other components

- **Customer**
- **Seller**
- **Rider**
- **Email provider**
- **SMS provider**
- **Firebase messaging**

## Connections

- Customer → Account access: signs in
- Customer → Customer workflows: uses storefront
- Seller → Seller workflows: manages store
- Rider → Rider workflows: handles delivery
- Flask application → Account access: registers routes (evidence: `app/__init__.py`)
- Flask application → Pages and storefront: registers routes (evidence: `app/__init__.py`)
- Flask application → Cart and checkout: registers routes (evidence: `app/__init__.py`)
- Flask application → Store administration: registers routes (evidence: `app/__init__.py`)
- Flask application → Commerce data models: loads models (evidence: `app/__init__.py`)
- Account access → Commerce data models: uses account records (evidence: `app/auth.py`)
- Account access → Phone identity helpers: normalizes identifiers (evidence: `app/auth.py`)
- Account access → OTP verification: generates codes (evidence: `app/auth.py`)
- Account access → OTP delivery: delivers codes (evidence: `app/auth.py`)
- OTP delivery → Phone identity helpers: resolves destination (evidence: `app/utils/otp_delivery.py`)
- OTP delivery → OTP verification: uses code helpers (evidence: `app/utils/otp_delivery.py`)
- OTP delivery → Email delivery: sends email (evidence: `app/utils/otp_delivery.py`)
- OTP delivery → SMS delivery: sends SMS (evidence: `app/utils/otp_delivery.py`)
- Email delivery → Email provider: queues messages (evidence: `app/utils/email_helper.py`)
- SMS delivery → SMS provider: sends messages (evidence: `app/utils/sms_helper.py`)
- Cart and checkout → Commerce data models: creates orders (evidence: `app/checkout_routes.py`)
- Cart and checkout → Seller notifications: notifies sellers (evidence: `app/checkout_routes.py`)
- Cart and checkout → Image storage helpers: uses image helpers (evidence: `app/checkout_routes.py`)
- Payment verification → Commerce data models: updates payment records (evidence: `app/payment_verification_routes.py`)
- Store administration → OTP delivery: delivers invitations (evidence: `app/store_admin_routes.py`)
- Store administration → Email delivery: sends invitation email (evidence: `app/store_admin_routes.py`)
- Store administration → SMS delivery: sends invitation SMS (evidence: `app/store_admin_routes.py`)
- Store administration → Commerce data models: manages admin records (evidence: `app/store_admin_routes.py`)
- Product archiving → Commerce data models: archives products (evidence: `app/archive_routes.py`)
- Product archiving → Image storage helpers: deletes images (evidence: `app/archive_routes.py`)
- Image storage helpers → Email provider: optional storage integration
- Push notifications → Firebase messaging: sends notifications (evidence: `app/utils/push.py`)
- Seller notifications → Commerce data models: creates alerts (evidence: `app/utils/seller_notifications.py`)
- Seller notifications → Email delivery: sends stock alerts (evidence: `app/utils/seller_notifications.py`)
- Customer chat → Chat transport: uses transport
- Reports and forecasts → Commerce data models: queries commerce data (evidence: `app/utils/report_service.py`)
- System health checks → Flask application: checks application
- System health checks → Commerce data models: checks inventory
