# bouabidi/automotive-market-dashboard architecture

> Architecture diagram of the GitHub repository bouabidi/automotive-market-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bouabidi/automotive-market-dashboard
- Repository: https://github.com/bouabidi/automotive-market-dashboard

## Overview

Automotive Market Dashboard is an Angular/NestJS application for managing automotive catalog and pricing data and analyzing markets. Users enter through authenticated, permission-guarded feature routes; the frontend uses REST for reads and commands, while backend controllers delegate domain work to services backed by Prisma and PostgreSQL. Price import, analytics, dashboard, export, and real-time price notifications are distinct capabilities. The shown routes and controller excerpts support some links; other unsampled subsystem links are omitted or marked unverified.

Main entry points: [`apps/frontend/src/app/app.routes.ts`](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/app.routes.ts) (App routes), [`apps/backend/src/prisma/prisma.service.ts`](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/prisma/prisma.service.ts) (Prisma access), [`apps/backend/src/prices/prices.service.ts`](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/prices/prices.service.ts) (Price management), [`apps/frontend/src/app/core/auth/auth.service.ts`](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/core/auth/auth.service.ts) (Login and auth)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Angular frontend"]
  node_app_routes["App routes<br/>[app.routes.ts]"]
  node_auth_ui["Login and auth<br/>[auth.service.ts]"]
  node_product_ui["Product screens<br/>[product-list.ts]"]
  node_vehicle_ui["Vehicle screens<br/>[vehicle-list.ts]"]
  node_market_ui["Market screens<br/>[market-list.ts]"]
  node_supplier_ui["Supplier screens<br/>[supplier-list.ts]"]
  node_price_ui["Price screens<br/>[price-list.ts]"]
  node_import_ui["Import screen"]
  node_dashboard_ui["Dashboard screen<br/>[dashboard.ts]"]
  node_analytics_ui["Analytics screen<br/>[analytics-page.ts]"]
end

subgraph group_backend["NestJS backend"]
  node_auth_api["Authentication<br/>[auth.service.ts]"]
  node_products_api["Product management"]
  node_vehicles_api["Vehicle management"]
  node_markets_api["Market management"]
  node_suppliers_api["Supplier management"]
  node_prices_api["Price management<br/>[prices.service.ts]"]
  node_import_api["Price import"]
end

subgraph group_data["Persistence and events"]
  node_prisma["Prisma access<br/>[prisma.service.ts]"]
  node_postgres[("PostgreSQL")]
  node_realtime["Price notifications"]
end

subgraph group_insights["Analysis and data operations"]
  node_dashboard_api["Dashboard data"]
  node_analytics_api["Market analytics"]
  node_export_api["Data export<br/>[export.service.ts]"]
end

node_user(("User"))

node_user -->|"opens"| node_app_routes
node_app_routes -->|"loads login"| node_auth_ui
node_app_routes -->|"routes to"| node_product_ui
node_app_routes -->|"loads routes"| node_vehicle_ui
node_app_routes -->|"loads routes"| node_market_ui
node_app_routes -->|"loads routes"| node_supplier_ui
node_app_routes -->|"loads routes"| node_price_ui
node_app_routes -->|"loads routes"| node_import_ui
node_app_routes -->|"loads routes"| node_dashboard_ui
node_app_routes -->|"loads routes"| node_analytics_ui
node_auth_ui -.->|"authenticates via REST"| node_auth_api
node_product_ui -.->|"uses REST"| node_products_api
node_vehicle_ui -.->|"uses REST"| node_vehicles_api
node_market_ui -.->|"uses REST"| node_markets_api
node_supplier_ui -.->|"uses REST"| node_suppliers_api
node_price_ui -.->|"uses REST"| node_prices_api
node_import_ui -.->|"uses REST"| node_import_api
node_dashboard_ui -.->|"uses REST"| node_dashboard_api
node_analytics_ui -.->|"uses REST"| node_analytics_api
node_markets_api -->|"queries prices"| node_prices_api
node_products_api -.->|"delegates to service"| node_prisma
node_vehicles_api -.->|"delegates to service"| node_prisma
node_suppliers_api -.->|"delegates to service"| node_prisma
node_prices_api -->|"reads and writes"| node_prisma
node_import_api -.->|"imports prices"| node_prices_api
node_dashboard_api -->|"queries data"| node_prisma
node_analytics_api -.->|"queries data"| node_prisma
node_export_api -.->|"reads data"| node_prisma
node_auth_api -->|"reads and writes"| node_prisma
node_prisma -->|"accesses"| node_postgres
node_prices_api -->|"publishes updates"| node_realtime

click node_app_routes "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/app.routes.ts"
click node_auth_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/core/auth/auth.service.ts"
click node_product_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/products/pages/product-list/product-list.ts"
click node_vehicle_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/vehicles/pages/vehicle-list/vehicle-list.ts"
click node_market_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/markets/pages/market-list/market-list.ts"
click node_supplier_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/suppliers/pages/supplier-list/supplier-list.ts"
click node_price_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/prices/pages/price-list/price-list.ts"
click node_import_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/price-import/pages/price-import-page/price-import-page.ts"
click node_dashboard_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/dashboard/pages/dashboard/dashboard.ts"
click node_analytics_ui "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/analytics/pages/analytics-page/analytics-page.ts"
click node_auth_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/auth/auth.service.ts"
click node_products_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/products/products.controller.ts"
click node_vehicles_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/vehicles/vehicles.controller.ts"
click node_markets_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/markets/markets.controller.ts"
click node_suppliers_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/suppliers/suppliers.controller.ts"
click node_prices_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/prices/prices.service.ts"
click node_import_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/price-import/price-import.controller.ts"
click node_dashboard_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/dashboard/dashboard.service.ts"
click node_analytics_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/analytics/analytics.service.ts"
click node_export_api "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/export/export.service.ts"
click node_prisma "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/prisma/prisma.service.ts"
click node_realtime "https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/realtime/realtime.gateway.ts"

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_routes,node_auth_ui,node_product_ui,node_vehicle_ui,node_market_ui,node_supplier_ui,node_price_ui,node_import_ui,node_dashboard_ui,node_analytics_ui,node_user toneBlue
class node_auth_api,node_products_api,node_vehicles_api,node_markets_api,node_suppliers_api,node_prices_api,node_import_api toneAmber
class node_prisma,node_postgres,node_realtime toneMint
class node_dashboard_api,node_analytics_api,node_export_api toneRose
```

## Components

### Angular frontend

- [App routes](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/app.routes.ts): `apps/frontend/src/app/app.routes.ts`
- [Login and auth](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/core/auth/auth.service.ts): `apps/frontend/src/app/core/auth/auth.service.ts`
- [Product screens](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/products/pages/product-list/product-list.ts): `apps/frontend/src/app/features/products/pages/product-list/product-list.ts`
- [Vehicle screens](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/vehicles/pages/vehicle-list/vehicle-list.ts): `apps/frontend/src/app/features/vehicles/pages/vehicle-list/vehicle-list.ts`
- [Market screens](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/markets/pages/market-list/market-list.ts): `apps/frontend/src/app/features/markets/pages/market-list/market-list.ts`
- [Supplier screens](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/suppliers/pages/supplier-list/supplier-list.ts): `apps/frontend/src/app/features/suppliers/pages/supplier-list/supplier-list.ts`
- [Price screens](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/prices/pages/price-list/price-list.ts): `apps/frontend/src/app/features/prices/pages/price-list/price-list.ts`
- [Import screen](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/price-import/pages/price-import-page/price-import-page.ts): `apps/frontend/src/app/features/price-import/pages/price-import-page/price-import-page.ts`
- [Dashboard screen](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/dashboard/pages/dashboard/dashboard.ts): `apps/frontend/src/app/features/dashboard/pages/dashboard/dashboard.ts`
- [Analytics screen](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/frontend/src/app/features/analytics/pages/analytics-page/analytics-page.ts): `apps/frontend/src/app/features/analytics/pages/analytics-page/analytics-page.ts`

### NestJS backend

- [Authentication](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/auth/auth.service.ts): `apps/backend/src/auth/auth.service.ts`
- [Product management](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/products/products.controller.ts): `apps/backend/src/products/products.controller.ts`
- [Vehicle management](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/vehicles/vehicles.controller.ts): `apps/backend/src/vehicles/vehicles.controller.ts`
- [Market management](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/markets/markets.controller.ts): `apps/backend/src/markets/markets.controller.ts`
- [Supplier management](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/suppliers/suppliers.controller.ts): `apps/backend/src/suppliers/suppliers.controller.ts`
- [Price management](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/prices/prices.service.ts): `apps/backend/src/prices/prices.service.ts`
- [Price import](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/price-import/price-import.controller.ts): `apps/backend/src/price-import/price-import.controller.ts`

### Persistence and events

- [Prisma access](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/prisma/prisma.service.ts): `apps/backend/src/prisma/prisma.service.ts`
- **PostgreSQL**
- [Price notifications](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/realtime/realtime.gateway.ts): `apps/backend/src/realtime/realtime.gateway.ts`

### Analysis and data operations

- [Dashboard data](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/dashboard/dashboard.service.ts): `apps/backend/src/dashboard/dashboard.service.ts`
- [Market analytics](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/analytics/analytics.service.ts): `apps/backend/src/analytics/analytics.service.ts`
- [Data export](https://github.com/bouabidi/automotive-market-dashboard/blob/main/apps/backend/src/export/export.service.ts): `apps/backend/src/export/export.service.ts`

### Other components

- **User**

## Connections

- User → App routes: opens (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Login and auth: loads login (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Product screens: routes to (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Vehicle screens: loads routes (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Market screens: loads routes (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Supplier screens: loads routes (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Price screens: loads routes (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Import screen: loads routes (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Dashboard screen: loads routes (evidence: `apps/frontend/src/app/app.routes.ts`)
- App routes → Analytics screen: loads routes (evidence: `apps/frontend/src/app/app.routes.ts`)
- Login and auth → Authentication: authenticates via REST (evidence: `README.md`)
- Product screens → Product management: uses REST (evidence: `README.md`)
- Vehicle screens → Vehicle management: uses REST (evidence: `README.md`)
- Market screens → Market management: uses REST (evidence: `README.md`)
- Supplier screens → Supplier management: uses REST (evidence: `README.md`)
- Price screens → Price management: uses REST (evidence: `README.md`)
- Import screen → Price import: uses REST (evidence: `README.md`)
- Dashboard screen → Dashboard data: uses REST (evidence: `README.md`)
- Analytics screen → Market analytics: uses REST (evidence: `README.md`)
- Market management → Price management: queries prices (evidence: `apps/backend/src/markets/markets.controller.ts`)
- Product management → Prisma access: delegates to service
- Vehicle management → Prisma access: delegates to service
- Supplier management → Prisma access: delegates to service
- Price management → Prisma access: reads and writes (evidence: `apps/backend/src/prices/prices.service.ts`)
- Price import → Price management: imports prices
- Dashboard data → Prisma access: queries data (evidence: `apps/backend/src/dashboard/dashboard.service.ts`)
- Market analytics → Prisma access: queries data
- Data export → Prisma access: reads data (evidence: `apps/backend/src/export/export.service.ts`)
- Authentication → Prisma access: reads and writes (evidence: `apps/backend/src/auth/auth.service.ts`)
- Prisma access → PostgreSQL: accesses (evidence: `README.md`)
- Price management → Price notifications: publishes updates (evidence: `apps/backend/src/prices/prices.service.ts`)
