# adriananico/cofetarie architecture

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

- Interactive diagram: https://gitdiagram.com/adriananico/cofetarie
- Repository: https://github.com/adriananico/cofetarie

## Overview

NicoSweet is a Django bakery storefront for browsing and filtering pastries, viewing product details, creating accounts, and configuring custom cakes; it also exposes promotions and contact flows. Requests enter through the project URL configuration, route to bakery views, and use forms and Django models for validation and persisted state. Middleware records access requests, while admin supports staff management. The README is empty, so capability and relationship evidence comes from the route table and sampled source; unsampled view behavior is not expanded into assumed workflows.

Main entry points: [`Proiect/Cofetarie/views.py`](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py) (Request views), [`Proiect/Cofetarie/models.py`](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/models.py) (Bakery data), [`Proiect/Cofetarie/urls.py`](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/urls.py) (Bakery routes), [`Proiect/Cofetarie/admin.py`](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/admin.py) (Staff admin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_project_routes["Project routing<br/>[urls.py]"]
  node_bakery_routes["Bakery routes<br/>[urls.py]"]
  node_bakery_views["Request views<br/>[views.py]"]
  node_bakery_templates["Store pages"]
end

subgraph group_catalog["Bakery catalog"]
  node_catalog_views["Product browsing<br/>[views.py]"]
  node_cake_views["Custom cakes<br/>[views.py]"]
  node_catalog_forms["Catalog forms<br/>[forms.py]"]
  node_product_data[("Bakery data<br/>[models.py]")]
end

subgraph group_accounts["Customer accounts"]
  node_account_views["Account flows<br/>[views.py]"]
  node_account_forms["Account forms<br/>[forms.py]"]
  node_account_data[("Customer accounts<br/>[models.py]")]
end

subgraph group_operations["Store operations"]
  node_request_middleware["Request logging<br/>[middleware.py]"]
  node_access_data[("Access records<br/>[models.py]")]
  node_admin_site["Staff admin<br/>[admin.py]"]
end

node_visitor(("Visitor"))
node_email_service["SMTP email"]
node_configured_db[("PostgreSQL")]

node_visitor -->|"requests"| node_project_routes
node_project_routes -->|"includes"| node_bakery_routes
node_bakery_routes -->|"routes to"| node_bakery_views
node_bakery_routes -->|"configures password form"| node_account_forms
node_bakery_views -.->|"renders"| node_bakery_templates
node_bakery_views -.->|"handles catalog"| node_catalog_views
node_bakery_views -.->|"handles accounts"| node_account_views
node_catalog_views -->|"validates filters"| node_catalog_forms
node_catalog_views -->|"queries products"| node_product_data
node_cake_views -.->|"uses cake models"| node_product_data
node_account_views -.->|"uses account forms"| node_account_forms
node_account_views -->|"uses user model"| node_account_data
node_account_views -.->|"sends confirmation"| node_email_service
node_request_middleware -->|"saves access"| node_access_data
node_admin_site -->|"registers models"| node_product_data
node_admin_site -->|"registers models"| node_account_data
node_product_data -.->|"persists records"| node_configured_db
node_account_data -.->|"persists records"| node_configured_db
node_access_data -.->|"persists records"| node_configured_db

click node_project_routes "https://github.com/adriananico/cofetarie/blob/main/Proiect/Proiect/urls.py"
click node_bakery_routes "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/urls.py"
click node_bakery_views "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py"
click node_catalog_views "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py"
click node_cake_views "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py"
click node_catalog_forms "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/forms.py"
click node_product_data "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/models.py"
click node_account_views "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py"
click node_account_forms "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/forms.py"
click node_account_data "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/models.py"
click node_request_middleware "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/middleware.py"
click node_access_data "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/models.py"
click node_admin_site "https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/admin.py"
click node_bakery_templates "https://github.com/adriananico/cofetarie/tree/main/Proiect/Cofetarie/templates/Cofetarie"

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_project_routes,node_bakery_routes,node_bakery_views,node_bakery_templates toneBlue
class node_catalog_views,node_cake_views,node_catalog_forms,node_product_data,node_configured_db toneAmber
class node_account_views,node_account_forms,node_account_data toneMint
class node_request_middleware,node_access_data,node_admin_site toneRose
class node_visitor,node_email_service toneIndigo
```

## Components

### Web application

- [Project routing](https://github.com/adriananico/cofetarie/blob/main/Proiect/Proiect/urls.py): `Proiect/Proiect/urls.py`
- [Bakery routes](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/urls.py): `Proiect/Cofetarie/urls.py`
- [Request views](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py): `Proiect/Cofetarie/views.py`
- [Store pages](https://github.com/adriananico/cofetarie/tree/main/Proiect/Cofetarie/templates/Cofetarie): `Proiect/Cofetarie/templates/Cofetarie`

### Bakery catalog

- [Product browsing](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py): `Proiect/Cofetarie/views.py`
- [Custom cakes](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py): `Proiect/Cofetarie/views.py`
- [Catalog forms](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/forms.py): `Proiect/Cofetarie/forms.py`
- [Bakery data](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/models.py): `Proiect/Cofetarie/models.py`

### Customer accounts

- [Account flows](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/views.py): `Proiect/Cofetarie/views.py`
- [Account forms](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/forms.py): `Proiect/Cofetarie/forms.py`
- [Customer accounts](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/models.py): `Proiect/Cofetarie/models.py`

### Store operations

- [Request logging](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/middleware.py): `Proiect/Cofetarie/middleware.py`
- [Access records](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/models.py): `Proiect/Cofetarie/models.py`
- [Staff admin](https://github.com/adriananico/cofetarie/blob/main/Proiect/Cofetarie/admin.py): `Proiect/Cofetarie/admin.py`

### Other components

- **Visitor**
- **SMTP email**
- **PostgreSQL**

## Connections

- Visitor → Project routing: requests (evidence: `Proiect/Proiect/urls.py`)
- Project routing → Bakery routes: includes (evidence: `Proiect/Proiect/urls.py`)
- Bakery routes → Request views: routes to (evidence: `Proiect/Cofetarie/urls.py`)
- Bakery routes → Account forms: configures password form (evidence: `Proiect/Cofetarie/urls.py`)
- Request views → Store pages: renders
- Request views → Product browsing: handles catalog (evidence: `Proiect/Cofetarie/views.py`)
- Request views → Account flows: handles accounts (evidence: `Proiect/Cofetarie/views.py`)
- Product browsing → Catalog forms: validates filters (evidence: `Proiect/Cofetarie/views.py`)
- Product browsing → Bakery data: queries products (evidence: `Proiect/Cofetarie/views.py`)
- Custom cakes → Bakery data: uses cake models (evidence: `Proiect/Cofetarie/views.py`)
- Account flows → Account forms: uses account forms (evidence: `Proiect/Cofetarie/views.py`)
- Account flows → Customer accounts: uses user model (evidence: `Proiect/Cofetarie/views.py`)
- Account flows → SMTP email: sends confirmation
- Request logging → Access records: saves access (evidence: `Proiect/Cofetarie/middleware.py`)
- Staff admin → Bakery data: registers models (evidence: `Proiect/Cofetarie/admin.py`)
- Staff admin → Customer accounts: registers models (evidence: `Proiect/Cofetarie/admin.py`)
- Bakery data → PostgreSQL: persists records
- Customer accounts → PostgreSQL: persists records
- Access records → PostgreSQL: persists records
