# erehbani/coffee-system-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/erehbani/coffee-system-frontend
- Repository: https://github.com/erehbani/coffee-system-frontend

## Overview

Coffee System is an Angular loyalty frontend for customers, cafés, and administrators. Customers browse cafés and products, check out, and manage rewards and purchase history; café users manage their business and validate coupons; administrators manage platform data. The route table explicitly wires these feature areas, while the README identifies a separate Coffee System backend. Some feature internals were not excerpted, so the graph shows documented routing and marks backend connections as unverified rather than inferring specific API calls.

Main entry points: [`src/app/app.routes.ts`](https://github.com/erehbani/coffee-system-frontend/blob/main/src/app/app.routes.ts) (Application routing), [`src/features/checkout`](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/checkout) (Cart and checkout), [`src/features/cafe-profile`](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-profile) (Café profile), [`src/features/coupon-validation`](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/coupon-validation) (Coupon validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application and access"]
  node_app_router["Application routing<br/>[app.routes.ts]"]
  node_auth["Authentication"]
end

subgraph group_customer["Customer experience"]
  node_discovery["Café and product discovery"]
  node_catalog["Product catalog"]
  node_checkout["Cart and checkout"]
  node_profile_rewards["Profile and rewards"]
  node_purchases["Purchase history"]
end

subgraph group_cafe["Café operations"]
  node_cafe_onboarding["Café onboarding"]
  node_cafe_dashboard["Café dashboard"]
  node_cafe_orders["Café orders"]
  node_cafe_profile["Café profile"]
  node_cafe_offerings["Café benefits and products"]
  node_cafe_reviews["Café reviews"]
  node_coupon_validation["Coupon validation"]
end

subgraph group_admin["Administration"]
  node_admin_management["Admin management"]
  node_admin_benefits["Benefit and tier management"]
  node_admin_clients["Client management"]
  node_admin_cafes["Café administration"]
end

node_customers(("Customers"))
node_cafe_users(("Café users"))
node_admins(("Administrators"))
node_backend{{"Coffee System backend"}}

node_customers -->|"use"| node_app_router
node_cafe_users -->|"use"| node_app_router
node_admins -->|"use"| node_app_router
node_app_router -->|"guards access"| node_auth
node_app_router -->|"routes to"| node_discovery
node_app_router -->|"routes to"| node_catalog
node_app_router -->|"routes to"| node_checkout
node_app_router -->|"routes to"| node_profile_rewards
node_app_router -->|"routes to"| node_purchases
node_app_router -->|"routes to"| node_cafe_onboarding
node_app_router -->|"routes to"| node_cafe_dashboard
node_app_router -->|"routes to"| node_cafe_orders
node_app_router -->|"routes to"| node_cafe_profile
node_app_router -->|"routes to"| node_cafe_offerings
node_app_router -->|"routes to"| node_cafe_reviews
node_app_router -->|"routes to"| node_coupon_validation
node_app_router -->|"routes to"| node_admin_management
node_app_router -->|"routes to"| node_admin_benefits
node_app_router -->|"routes to"| node_admin_clients
node_app_router -->|"routes to"| node_admin_cafes
node_checkout -.->|"uses API"| node_backend
node_cafe_profile -.->|"uses API"| node_backend
node_coupon_validation -.->|"uses API"| node_backend
node_admin_management -.->|"uses API"| node_backend

click node_app_router "https://github.com/erehbani/coffee-system-frontend/blob/main/src/app/app.routes.ts"
click node_auth "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/auth"
click node_discovery "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/home"
click node_catalog "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/catalog"
click node_checkout "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/checkout"
click node_profile_rewards "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/profile"
click node_purchases "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/purchase-history"
click node_cafe_onboarding "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-onboarding"
click node_cafe_dashboard "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-dashboard"
click node_cafe_orders "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-orders"
click node_cafe_profile "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-profile"
click node_cafe_offerings "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-benefits"
click node_cafe_reviews "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-reviews"
click node_coupon_validation "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/coupon-validation"
click node_admin_management "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/admin-users"
click node_admin_benefits "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/admin-global-benefits"
click node_admin_clients "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/admin-clients"
click node_admin_cafes "https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/admin-cafes"

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_router,node_auth,node_cafe_users toneBlue
class node_discovery,node_catalog,node_checkout,node_profile_rewards,node_purchases toneAmber
class node_cafe_onboarding,node_cafe_dashboard,node_cafe_orders,node_cafe_profile,node_cafe_offerings,node_cafe_reviews,node_coupon_validation toneMint
class node_admin_management,node_admin_benefits,node_admin_clients,node_admin_cafes toneRose
class node_customers,node_admins,node_backend toneIndigo
```

## Components

### Application and access

- [Application routing](https://github.com/erehbani/coffee-system-frontend/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Authentication](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/auth): `src/features/auth`

### Customer experience

- [Café and product discovery](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/home): `src/features/home`
- [Product catalog](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/catalog): `src/features/catalog`
- [Cart and checkout](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/checkout): `src/features/checkout`
- [Profile and rewards](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/profile): `src/features/profile`
- [Purchase history](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/purchase-history): `src/features/purchase-history`

### Café operations

- [Café onboarding](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-onboarding): `src/features/cafe-onboarding`
- [Café dashboard](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-dashboard): `src/features/cafe-dashboard`
- [Café orders](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-orders): `src/features/cafe-orders`
- [Café profile](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-profile): `src/features/cafe-profile`
- [Café benefits and products](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-benefits): `src/features/cafe-benefits`
- [Café reviews](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/cafe-reviews): `src/features/cafe-reviews`
- [Coupon validation](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/coupon-validation): `src/features/coupon-validation`

### Administration

- [Admin management](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/admin-users): `src/features/admin-users`
- [Benefit and tier management](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/admin-global-benefits): `src/features/admin-global-benefits`
- [Client management](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/admin-clients): `src/features/admin-clients`
- [Café administration](https://github.com/erehbani/coffee-system-frontend/tree/main/src/features/admin-cafes): `src/features/admin-cafes`

### Other components

- **Customers**
- **Café users**
- **Administrators**
- **Coffee System backend**

## Connections

- Customers → Application routing: use (evidence: `src/app/app.routes.ts`)
- Café users → Application routing: use (evidence: `src/app/app.routes.ts`)
- Administrators → Application routing: use (evidence: `src/app/app.routes.ts`)
- Application routing → Authentication: guards access (evidence: `src/app/app.routes.ts`)
- Application routing → Café and product discovery: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Product catalog: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Cart and checkout: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Profile and rewards: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Purchase history: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Café onboarding: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Café dashboard: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Café orders: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Café profile: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Café benefits and products: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Café reviews: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Coupon validation: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Admin management: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Benefit and tier management: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Client management: routes to (evidence: `src/app/app.routes.ts`)
- Application routing → Café administration: routes to (evidence: `src/app/app.routes.ts`)
- Cart and checkout → Coffee System backend: uses API
- Café profile → Coffee System backend: uses API
- Coupon validation → Coffee System backend: uses API
- Admin management → Coffee System backend: uses API
