# ozcaredo89/allatyou-taller architecture

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

- Interactive diagram: https://gitdiagram.com/ozcaredo89/allatyou-taller
- Repository: https://github.com/ozcaredo89/allatyou-taller

## Overview

This is a multi-tenant workshop management platform: staff use a browser app to manage customers, vehicles, service orders, technicians, expenses, and reporting; a public kiosk and AI quotation chat provide customer-facing entry points. The backend exposes Express routes and persists business data through Supabase, with AI-provider routing and file storage integrations. The README is empty, and several frontend and backend modules were not sampled, so links between unsampled features are kept at the documented route/API boundary rather than inferred as detailed workflows.

Main entry points: [`frontend/src/services/api.ts`](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/services/api.ts) (API client), [`frontend/src/App.tsx`](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/App.tsx) (Workshop web app), [`backend/src/index.ts`](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/index.ts) (HTTP API), [`backend/src/config/supabase.ts`](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/config/supabase.ts) (Supabase data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workshop["Workshop operations"]
  node_workpages["Service workflows"]
  node_workroutes["Workshop routes<br/>[ingresos.routes.ts]"]
  node_orders["Service orders"]
  node_catalog["Price catalog<br/>[catalog.service.ts]"]
end

subgraph group_finance["Finance and reporting"]
  node_financepages["Finance screens"]
  node_financeroutes["Expense routes<br/>[gastos.routes.ts]"]
  node_expenses["Expense management"]
end

subgraph group_engagement["Customer engagement"]
  node_crm["CRM screen<br/>[CRM.tsx]"]
  node_kioskui["Kiosk screen<br/>[Kiosco.tsx]"]
  node_chatui["AI chat UI<br/>[AIChatDrawer.tsx]"]
  node_publicchatui["Public AI chat"]
  node_airegister["AI routes<br/>[ai.routes.ts]"]
  node_aicontroller["AI workflows<br/>[ai.controller.ts]"]
  node_airouter["Provider routing"]
  node_aiproviders["AI providers"]
end

subgraph group_platform["Platform services"]
  node_webapp["Workshop web app<br/>[App.tsx]"]
  node_authui["Session context<br/>[AuthContext.tsx]"]
  node_apiclient["API client<br/>[api.ts]"]
  node_server["HTTP API<br/>[index.ts]"]
  node_authroutes["Auth routes<br/>[auth.routes.ts]"]
  node_authcontroller["Authentication<br/>[auth.controller.ts]"]
  node_supabase[("Supabase data<br/>[supabase.ts]")]
  node_objectstore[("Object storage")]
  node_s3service["File storage service<br/>[s3Service.ts]"]
  node_email["Email service<br/>[emailService.ts]"]
end

node_staff(("Workshop staff"))
node_customers(("Customers"))
node_aiadmin(("AI providers"))

node_staff -->|"uses"| node_webapp
node_customers -->|"use"| node_kioskui
node_customers -->|"request quotes"| node_publicchatui
node_webapp -->|"loads session"| node_authui
node_webapp -->|"routes to"| node_workpages
node_webapp -->|"routes to"| node_financepages
node_webapp -->|"routes to"| node_crm
node_webapp -->|"routes to"| node_kioskui
node_workpages -->|"requests data"| node_apiclient
node_financepages -->|"requests data"| node_apiclient
node_crm -->|"requests data"| node_apiclient
node_kioskui -->|"requests data"| node_apiclient
node_chatui -->|"sends chat"| node_apiclient
node_publicchatui -->|"sends chat"| node_apiclient
node_apiclient -->|"HTTP requests"| node_server
node_server -->|"dispatches"| node_authroutes
node_server -->|"dispatches"| node_workroutes
node_server -->|"dispatches"| node_financeroutes
node_server -->|"dispatches"| node_airegister
node_authroutes -->|"dispatches"| node_authcontroller
node_authcontroller -->|"reads and writes"| node_supabase
node_authcontroller -->|"sends messages"| node_email
node_workroutes -->|"dispatches"| node_orders
node_orders -->|"reads and writes"| node_supabase
node_orders -->|"syncs delivered prices"| node_catalog
node_catalog -->|"reads and writes"| node_supabase
node_financeroutes -->|"dispatches"| node_expenses
node_expenses -->|"reads and writes"| node_supabase
node_airegister -->|"dispatches"| node_aicontroller
node_aicontroller -->|"reads and writes"| node_supabase
node_aicontroller -->|"loads workshop catalog"| node_catalog
node_aicontroller -->|"routes chat"| node_airouter
node_airouter -->|"tries providers"| node_aiproviders
node_aiproviders -.->|"calls model APIs"| node_aiadmin
node_airouter -->|"records usage"| node_supabase
node_airouter -->|"sends budget alerts"| node_email
node_server -->|"upload route uses"| node_s3service
node_s3service -.->|"stores files"| node_objectstore

click node_webapp "https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/App.tsx"
click node_authui "https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/context/AuthContext.tsx"
click node_workpages "https://github.com/ozcaredo89/allatyou-taller/tree/main/frontend/src/pages"
click node_financepages "https://github.com/ozcaredo89/allatyou-taller/tree/main/frontend/src/pages"
click node_crm "https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/pages/CRM.tsx"
click node_kioskui "https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/pages/Kiosco.tsx"
click node_chatui "https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/components/AIChatDrawer.tsx"
click node_publicchatui "https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/components/PublicAIChatbot.tsx"
click node_apiclient "https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/services/api.ts"
click node_server "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/index.ts"
click node_authroutes "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/routes/auth.routes.ts"
click node_authcontroller "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/controllers/auth.controller.ts"
click node_workroutes "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/routes/ingresos.routes.ts"
click node_orders "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/controllers/ingresos.controller.ts"
click node_catalog "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/catalog.service.ts"
click node_financeroutes "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/routes/gastos.routes.ts"
click node_expenses "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/controllers/gastos.controller.ts"
click node_airegister "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/routes/ai.routes.ts"
click node_aicontroller "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/controllers/ai.controller.ts"
click node_airouter "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/aiRouter.service.ts"
click node_aiproviders "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/aiProvider.adapter.ts"
click node_supabase "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/config/supabase.ts"
click node_s3service "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/s3Service.ts"
click node_email "https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/emailService.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_workpages,node_workroutes,node_orders,node_catalog toneBlue
class node_financepages,node_financeroutes,node_expenses toneAmber
class node_crm,node_kioskui,node_chatui,node_publicchatui,node_airegister,node_aicontroller,node_airouter,node_aiproviders toneMint
class node_webapp,node_authui,node_apiclient,node_server,node_authroutes,node_authcontroller,node_supabase,node_objectstore,node_s3service,node_email toneRose
class node_staff,node_customers,node_aiadmin toneIndigo
```

## Components

### Workshop operations

- [Service workflows](https://github.com/ozcaredo89/allatyou-taller/tree/main/frontend/src/pages): `frontend/src/pages`
- [Workshop routes](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/routes/ingresos.routes.ts): `backend/src/routes/ingresos.routes.ts`
- [Service orders](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/controllers/ingresos.controller.ts): `backend/src/controllers/ingresos.controller.ts`
- [Price catalog](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/catalog.service.ts): `backend/src/services/catalog.service.ts`

### Finance and reporting

- [Finance screens](https://github.com/ozcaredo89/allatyou-taller/tree/main/frontend/src/pages): `frontend/src/pages`
- [Expense routes](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/routes/gastos.routes.ts): `backend/src/routes/gastos.routes.ts`
- [Expense management](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/controllers/gastos.controller.ts): `backend/src/controllers/gastos.controller.ts`

### Customer engagement

- [CRM screen](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/pages/CRM.tsx): `frontend/src/pages/CRM.tsx`
- [Kiosk screen](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/pages/Kiosco.tsx): `frontend/src/pages/Kiosco.tsx`
- [AI chat UI](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/components/AIChatDrawer.tsx): `frontend/src/components/AIChatDrawer.tsx`
- [Public AI chat](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/components/PublicAIChatbot.tsx): `frontend/src/components/PublicAIChatbot.tsx`
- [AI routes](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/routes/ai.routes.ts): `backend/src/routes/ai.routes.ts`
- [AI workflows](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/controllers/ai.controller.ts): `backend/src/controllers/ai.controller.ts`
- [Provider routing](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/aiRouter.service.ts): `backend/src/services/aiRouter.service.ts`
- [AI providers](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/aiProvider.adapter.ts): `backend/src/services/aiProvider.adapter.ts`

### Platform services

- [Workshop web app](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session context](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [API client](https://github.com/ozcaredo89/allatyou-taller/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [HTTP API](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/index.ts): `backend/src/index.ts`
- [Auth routes](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/routes/auth.routes.ts): `backend/src/routes/auth.routes.ts`
- [Authentication](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/controllers/auth.controller.ts): `backend/src/controllers/auth.controller.ts`
- [Supabase data](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/config/supabase.ts): `backend/src/config/supabase.ts`
- **Object storage**
- [File storage service](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/s3Service.ts): `backend/src/services/s3Service.ts`
- [Email service](https://github.com/ozcaredo89/allatyou-taller/blob/main/backend/src/services/emailService.ts): `backend/src/services/emailService.ts`

### Other components

- **Workshop staff**
- **Customers**
- **AI providers**

## Connections

- Workshop staff → Workshop web app: uses
- Customers → Kiosk screen: use
- Customers → Public AI chat: request quotes
- Workshop web app → Session context: loads session
- Workshop web app → Service workflows: routes to
- Workshop web app → Finance screens: routes to
- Workshop web app → CRM screen: routes to
- Workshop web app → Kiosk screen: routes to
- Service workflows → API client: requests data
- Finance screens → API client: requests data
- CRM screen → API client: requests data
- Kiosk screen → API client: requests data
- AI chat UI → API client: sends chat
- Public AI chat → API client: sends chat
- API client → HTTP API: HTTP requests
- HTTP API → Auth routes: dispatches
- HTTP API → Workshop routes: dispatches
- HTTP API → Expense routes: dispatches
- HTTP API → AI routes: dispatches
- Auth routes → Authentication: dispatches
- Authentication → Supabase data: reads and writes
- Authentication → Email service: sends messages
- Workshop routes → Service orders: dispatches
- Service orders → Supabase data: reads and writes
- Service orders → Price catalog: syncs delivered prices
- Price catalog → Supabase data: reads and writes
- Expense routes → Expense management: dispatches
- Expense management → Supabase data: reads and writes
- AI routes → AI workflows: dispatches
- AI workflows → Supabase data: reads and writes
- AI workflows → Price catalog: loads workshop catalog
- AI workflows → Provider routing: routes chat
- Provider routing → AI providers: tries providers
- AI providers → AI providers: calls model APIs
- Provider routing → Supabase data: records usage
- Provider routing → Email service: sends budget alerts
- HTTP API → File storage service: upload route uses
- File storage service → Object storage: stores files
