# azharnawaz1964/ecostore architecture

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

- Interactive diagram: https://gitdiagram.com/azharnawaz1964/ecostore
- Repository: https://github.com/azharnawaz1964/ecostore

## Overview

EcoStore is a Flask storefront with product browsing, admin login and catalog management, and Stripe checkout. Its main workflow is a customer browsing products and proceeding to payment; administrators can authenticate and add, edit, or delete products and images. Firestore holds product records, while Cloud Storage holds uploaded photos. The README also describes deployment to Cloud Run through GitHub Actions. The application source was excerpted; the template and deployment workflow are represented only where the README or application excerpt supports their role.

Main entry points: [`app.py`](https://github.com/azharnawaz1964/ecostore/blob/main/app.py) (Storefront Routes), [`.github/workflows/deploy.yml`](https://github.com/azharnawaz1964/ecostore/blob/main/.github/workflows/deploy.yml) (GitHub Actions), [`templates/index.html`](https://github.com/azharnawaz1964/ecostore/blob/main/templates/index.html) (Storefront Template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_storefront_routes["Storefront Routes<br/>[app.py]"]
  node_storefront_template["Storefront Template<br/>[index.html]"]
  node_checkout["Checkout<br/>[app.py]"]
end

subgraph group_admin["Administration"]
  node_admin_auth["Admin Authentication<br/>[app.py]"]
  node_catalog_admin["Catalog Management<br/>[app.py]"]
end

subgraph group_services["Data and Payments"]
  node_firestore[("Product Records")]
  node_cloud_storage[("Product Images")]
  node_stripe["Stripe Payments"]
end

subgraph group_deployment["Deployment"]
  node_github_actions["GitHub Actions<br/>[deploy.yml]"]
  node_cloud_run["Cloud Run"]
end

node_customer(("Customer"))
node_admin_user(("Administrator"))

node_customer -->|"browses"| node_storefront_routes
node_storefront_routes -->|"reads products"| node_firestore
node_storefront_routes -->|"renders"| node_storefront_template
node_admin_user -->|"logs in"| node_admin_auth
node_admin_user -->|"manages products"| node_catalog_admin
node_catalog_admin -->|"checks and updates"| node_firestore
node_catalog_admin -->|"uploads and deletes images"| node_cloud_storage
node_customer -->|"submits order"| node_checkout
node_checkout -->|"creates session"| node_stripe
node_github_actions -->|"deploys to"| node_cloud_run
node_cloud_run -->|"runs"| node_storefront_routes

click node_storefront_routes "https://github.com/azharnawaz1964/ecostore/blob/main/app.py"
click node_storefront_template "https://github.com/azharnawaz1964/ecostore/blob/main/templates/index.html"
click node_checkout "https://github.com/azharnawaz1964/ecostore/blob/main/app.py"
click node_admin_auth "https://github.com/azharnawaz1964/ecostore/blob/main/app.py"
click node_catalog_admin "https://github.com/azharnawaz1964/ecostore/blob/main/app.py"
click node_github_actions "https://github.com/azharnawaz1964/ecostore/blob/main/.github/workflows/deploy.yml"

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_storefront_routes,node_storefront_template,node_checkout toneBlue
class node_admin_auth,node_catalog_admin toneAmber
class node_firestore,node_cloud_storage,node_stripe toneMint
class node_github_actions,node_cloud_run toneRose
class node_customer,node_admin_user toneIndigo
```

## Components

### Storefront

- [Storefront Routes](https://github.com/azharnawaz1964/ecostore/blob/main/app.py): `app.py`
- [Storefront Template](https://github.com/azharnawaz1964/ecostore/blob/main/templates/index.html): `templates/index.html`
- [Checkout](https://github.com/azharnawaz1964/ecostore/blob/main/app.py): `app.py`

### Administration

- [Admin Authentication](https://github.com/azharnawaz1964/ecostore/blob/main/app.py): `app.py`
- [Catalog Management](https://github.com/azharnawaz1964/ecostore/blob/main/app.py): `app.py`

### Data and Payments

- **Product Records**
- **Product Images**
- **Stripe Payments**

### Deployment

- [GitHub Actions](https://github.com/azharnawaz1964/ecostore/blob/main/.github/workflows/deploy.yml): `.github/workflows/deploy.yml`
- **Cloud Run**

### Other components

- **Customer**
- **Administrator**

## Connections

- Customer → Storefront Routes: browses (evidence: `app.py`)
- Storefront Routes → Product Records: reads products (evidence: `app.py`)
- Storefront Routes → Storefront Template: renders (evidence: `app.py`)
- Administrator → Admin Authentication: logs in (evidence: `app.py`)
- Administrator → Catalog Management: manages products (evidence: `app.py`)
- Catalog Management → Product Records: checks and updates (evidence: `app.py`)
- Catalog Management → Product Images: uploads and deletes images (evidence: `app.py`)
- Customer → Checkout: submits order (evidence: `app.py`)
- Checkout → Stripe Payments: creates session (evidence: `app.py`)
- GitHub Actions → Cloud Run: deploys to (evidence: `README.md`)
- Cloud Run → Storefront Routes: runs (evidence: `README.md`)
