# mugetsu-1/newastore architecture

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

- Interactive diagram: https://gitdiagram.com/mugetsu-1/newastore
- Repository: https://github.com/mugetsu-1/newastore

## Overview

NewaStore is a Django digital-games storefront. Shoppers browse or search the catalog, manage a guest or account cart, and check out through eSewa or offline Nay Bank transfer; orders, reviews, wishlists, and account features support that journey. Separate catalog operations import and curate game data and materialize artwork. The graph preserves the README’s major product capabilities, including API, admin, and SEO. Several runtime relationships are documented rather than visible in sampled call sites; edges cite the README or source index accordingly.

Main entry points: [`store/models.py`](https://github.com/mugetsu-1/newastore/blob/main/store/models.py) (Store records), [`store/views.py`](https://github.com/mugetsu-1/newastore/blob/main/store/views.py) (Web workflows), [`store/importers.py`](https://github.com/mugetsu-1/newastore/blob/main/store/importers.py) (Catalog import), [`store/api.py`](https://github.com/mugetsu-1/newastore/blob/main/store/api.py) (JSON API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_views["Web workflows<br/>[views.py]"]
  node_api["JSON API<br/>[api.py]"]
  node_recommendations["Recommendations<br/>[recommendations.py]"]
  node_frontend["Storefront interactions<br/>[main.js]"]
  node_forms["Forms and validation<br/>[forms.py]"]
end

subgraph group_commerce["Commerce"]
  node_cart["Cart manager<br/>[cart.py]"]
  node_payments["Payment integration<br/>[payments.py]"]
  node_domain_data[("Store records<br/>[models.py]")]
end

subgraph group_catalog["Catalog"]
  node_importers["Catalog import<br/>[importers.py]"]
  node_catalog_commands["Catalog curation<br/>[rank_catalog.py]"]
  node_steamspy_import["SteamSpy import<br/>[import_steamspy.py]"]
  node_bootstrap["Catalog bootstrap<br/>[ensure_ready.py]"]
  node_artwork["Artwork processing<br/>[artwork.py]"]
  node_materialize["Image materialization"]
end

subgraph group_platform["Platform"]
  node_admin["Admin dashboard<br/>[admin.py]"]
  node_signals["Order signals<br/>[signals.py]"]
  node_sitemap["SEO sitemap<br/>[sitemaps.py]"]
end

node_shopper(("Shopper"))
node_payment_gateway["eSewa gateway"]
node_bank_transfer["Nay Bank transfer"]
node_external_catalogs["Game data sources"]
node_email["Order email"]

node_shopper -->|"browses and checks out"| node_views
node_shopper -->|"requests catalog data"| node_api
node_views -->|"validates input"| node_forms
node_views -->|"manages cart"| node_cart
node_views -->|"handles payment"| node_payments
node_views -->|"gets recommendations"| node_recommendations
node_views -->|"imports search results"| node_importers
node_views -->|"reads and writes"| node_domain_data
node_api -->|"reads catalog"| node_domain_data
node_api -->|"uses forms"| node_forms
node_cart -->|"reads and writes"| node_domain_data
node_payments -->|"signs and verifies"| node_payment_gateway
node_payments -->|"provides transfer details"| node_bank_transfer
node_recommendations -->|"reads products"| node_domain_data
node_forms -->|"validates against records"| node_domain_data
node_admin -->|"manages records"| node_domain_data
node_signals -->|"tracks order changes"| node_domain_data
node_sitemap -->|"lists products"| node_domain_data
node_steamspy_import -->|"imports catalog"| node_importers
node_importers -->|"fetches game data"| node_external_catalogs
node_importers -->|"upserts products"| node_domain_data
node_catalog_commands -->|"ranks and features"| node_domain_data
node_bootstrap -->|"prepares catalog"| node_domain_data
node_bootstrap -->|"runs image step"| node_materialize
node_materialize -->|"materializes images"| node_artwork
node_artwork -->|"fetches artwork"| node_external_catalogs
node_views -->|"sends order updates"| node_email

click node_views "https://github.com/mugetsu-1/newastore/blob/main/store/views.py"
click node_api "https://github.com/mugetsu-1/newastore/blob/main/store/api.py"
click node_recommendations "https://github.com/mugetsu-1/newastore/blob/main/store/recommendations.py"
click node_frontend "https://github.com/mugetsu-1/newastore/blob/main/store/static/js/main.js"
click node_forms "https://github.com/mugetsu-1/newastore/blob/main/store/forms.py"
click node_cart "https://github.com/mugetsu-1/newastore/blob/main/store/cart.py"
click node_payments "https://github.com/mugetsu-1/newastore/blob/main/store/payments.py"
click node_domain_data "https://github.com/mugetsu-1/newastore/blob/main/store/models.py"
click node_admin "https://github.com/mugetsu-1/newastore/blob/main/store/admin.py"
click node_signals "https://github.com/mugetsu-1/newastore/blob/main/store/signals.py"
click node_sitemap "https://github.com/mugetsu-1/newastore/blob/main/store/sitemaps.py"
click node_importers "https://github.com/mugetsu-1/newastore/blob/main/store/importers.py"
click node_catalog_commands "https://github.com/mugetsu-1/newastore/blob/main/store/management/commands/rank_catalog.py"
click node_steamspy_import "https://github.com/mugetsu-1/newastore/blob/main/store/management/commands/import_steamspy.py"
click node_bootstrap "https://github.com/mugetsu-1/newastore/blob/main/store/management/commands/ensure_ready.py"
click node_artwork "https://github.com/mugetsu-1/newastore/blob/main/store/artwork.py"
click node_materialize "https://github.com/mugetsu-1/newastore/blob/main/store/management/commands/materialize_images.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_views,node_api,node_recommendations,node_frontend,node_forms toneBlue
class node_cart,node_payments,node_domain_data toneAmber
class node_importers,node_catalog_commands,node_steamspy_import,node_bootstrap,node_artwork,node_materialize toneMint
class node_admin,node_signals,node_sitemap toneRose
class node_shopper,node_payment_gateway,node_bank_transfer,node_external_catalogs,node_email toneIndigo
```

## Components

### Storefront

- [Web workflows](https://github.com/mugetsu-1/newastore/blob/main/store/views.py): `store/views.py`
- [JSON API](https://github.com/mugetsu-1/newastore/blob/main/store/api.py): `store/api.py`
- [Recommendations](https://github.com/mugetsu-1/newastore/blob/main/store/recommendations.py): `store/recommendations.py`
- [Storefront interactions](https://github.com/mugetsu-1/newastore/blob/main/store/static/js/main.js): `store/static/js/main.js`
- [Forms and validation](https://github.com/mugetsu-1/newastore/blob/main/store/forms.py): `store/forms.py`

### Commerce

- [Cart manager](https://github.com/mugetsu-1/newastore/blob/main/store/cart.py): `store/cart.py`
- [Payment integration](https://github.com/mugetsu-1/newastore/blob/main/store/payments.py): `store/payments.py`
- [Store records](https://github.com/mugetsu-1/newastore/blob/main/store/models.py): `store/models.py`

### Catalog

- [Catalog import](https://github.com/mugetsu-1/newastore/blob/main/store/importers.py): `store/importers.py`
- [Catalog curation](https://github.com/mugetsu-1/newastore/blob/main/store/management/commands/rank_catalog.py): `store/management/commands/rank_catalog.py`
- [SteamSpy import](https://github.com/mugetsu-1/newastore/blob/main/store/management/commands/import_steamspy.py): `store/management/commands/import_steamspy.py`
- [Catalog bootstrap](https://github.com/mugetsu-1/newastore/blob/main/store/management/commands/ensure_ready.py): `store/management/commands/ensure_ready.py`
- [Artwork processing](https://github.com/mugetsu-1/newastore/blob/main/store/artwork.py): `store/artwork.py`
- [Image materialization](https://github.com/mugetsu-1/newastore/blob/main/store/management/commands/materialize_images.py): `store/management/commands/materialize_images.py`

### Platform

- [Admin dashboard](https://github.com/mugetsu-1/newastore/blob/main/store/admin.py): `store/admin.py`
- [Order signals](https://github.com/mugetsu-1/newastore/blob/main/store/signals.py): `store/signals.py`
- [SEO sitemap](https://github.com/mugetsu-1/newastore/blob/main/store/sitemaps.py): `store/sitemaps.py`

### Other components

- **Shopper**
- **eSewa gateway**
- **Nay Bank transfer**
- **Game data sources**
- **Order email**

## Connections

- Shopper → Web workflows: browses and checks out (evidence: `README.md`)
- Shopper → JSON API: requests catalog data (evidence: `README.md`)
- Web workflows → Forms and validation: validates input (evidence: `store/views.py`)
- Web workflows → Cart manager: manages cart (evidence: `store/views.py`)
- Web workflows → Payment integration: handles payment (evidence: `store/views.py`)
- Web workflows → Recommendations: gets recommendations (evidence: `store/views.py`)
- Web workflows → Catalog import: imports search results (evidence: `store/views.py`)
- Web workflows → Store records: reads and writes (evidence: `store/views.py`)
- JSON API → Store records: reads catalog (evidence: `store/api.py`)
- JSON API → Forms and validation: uses forms (evidence: `store/api.py`)
- Cart manager → Store records: reads and writes (evidence: `store/cart.py`)
- Payment integration → eSewa gateway: signs and verifies (evidence: `store/payments.py`)
- Payment integration → Nay Bank transfer: provides transfer details (evidence: `README.md`)
- Recommendations → Store records: reads products (evidence: `store/recommendations.py`)
- Forms and validation → Store records: validates against records (evidence: `store/forms.py`)
- Admin dashboard → Store records: manages records (evidence: `store/admin.py`)
- Order signals → Store records: tracks order changes (evidence: `store/signals.py`)
- SEO sitemap → Store records: lists products (evidence: `store/sitemaps.py`)
- SteamSpy import → Catalog import: imports catalog (evidence: `store/management/commands/import_steamspy.py`)
- Catalog import → Game data sources: fetches game data (evidence: `README.md`)
- Catalog import → Store records: upserts products (evidence: `store/importers.py`)
- Catalog curation → Store records: ranks and features (evidence: `store/management/commands/rank_catalog.py`)
- Catalog bootstrap → Store records: prepares catalog (evidence: `store/management/commands/ensure_ready.py`)
- Catalog bootstrap → Image materialization: runs image step (evidence: `README.md`)
- Image materialization → Artwork processing: materializes images (evidence: `store/management/commands/materialize_images.py`)
- Artwork processing → Game data sources: fetches artwork (evidence: `README.md`)
- Web workflows → Order email: sends order updates (evidence: `README.md`)
