# uca-argentina/pid-2026-josemariacanale architecture

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

- Interactive diagram: https://gitdiagram.com/uca-argentina/pid-2026-josemariacanale
- Repository: https://github.com/uca-argentina/pid-2026-josemariacanale

## Overview

Agendic is a web platform for service businesses: businesses publish services and schedules, while clients find availability, book appointments, and manage them. The graph follows the documented booking and service-management entry points through selected backend use cases, and includes availability, business operations, calendar, analytics, and loyalty capabilities visible in the source tree. The sampled excerpts and source index support only some call relationships; unverified subsystem links are dashed rather than inferred as direct calls.

Main entry points: [`agendic-back/src/infrastructure/bookings/bookings.controller.ts`](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/bookings/bookings.controller.ts) (Booking endpoints), [`agendic-back/src/infrastructure/services/services.controller.ts`](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/services/services.controller.ts) (Service endpoints), [`agendic-front/app/(app)/services/_components/ServicesList.tsx`](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-front/app/(app)/services/_components/ServicesList.tsx) (Service management), [`agendic-front/app/_components/client-booking/ClientBookingDetail.tsx`](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-front/app/_components/client-booking/ClientBookingDetail.tsx) (Booking management UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_service_ui["Service management<br/>[ServicesList.tsx]"]
  node_client_booking_ui["Booking management UI"]
end

subgraph group_booking["Booking and availability"]
  node_booking_api["Booking endpoints"]
  node_booking_usecases["Booking workflows"]
  node_availability["Availability management"]
  node_slots["Slot discovery"]
end

subgraph group_business["Business operations"]
  node_service_api["Service endpoints"]
  node_service_usecases["Service workflows"]
  node_business_setup["Business setup"]
  node_staff_ops["Employee and invitation operations"]
end

subgraph group_platform["Platform services"]
  node_calendar["Calendar integration"]
  node_analytics["Analytics and exports"]
  node_loyalty["Streaks and badges"]
  node_auth["Authentication guard<br/>[clerk.guard.ts]"]
  node_user_resolution["Current-user resolution"]
  node_files["Durable file storage<br/>[s3-file-storage.ts]"]
end

node_client(("Client"))
node_business_user(("Business user"))
node_object_store[("S3-compatible storage")]
node_postgres[("Postgres database")]

node_business_user -.->|"manages services"| node_service_ui
node_client -.->|"manages bookings"| node_client_booking_ui
node_service_ui -.->|"requests services"| node_service_api
node_client_booking_ui -.->|"manages bookings"| node_booking_api
node_booking_api -->|"dispatches"| node_booking_usecases
node_service_api -->|"dispatches"| node_service_usecases
node_service_api -->|"lists slots"| node_slots
node_business_user -.->|"sets schedule"| node_availability
node_business_user -.->|"publishes business"| node_business_setup
node_business_user -.->|"manages staff"| node_staff_ops
node_auth -->|"resolves user"| node_user_resolution
node_business_setup -.->|"uploads images"| node_files
node_files -->|"stores files"| node_object_store
node_booking_api -.->|"persists bookings"| node_postgres
node_calendar -.->|"stores connections"| node_postgres
node_analytics -.->|"queries data"| node_postgres
node_business_user -.->|"connects calendars"| node_calendar
node_business_user -.->|"views analytics"| node_analytics
node_business_user -.->|"manages rewards"| node_loyalty
node_postgres -.->|"runs on"| node_postgres

click node_service_ui "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-front/app/(app)/services/_components/ServicesList.tsx"
click node_client_booking_ui "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-front/app/_components/client-booking/ClientBookingDetail.tsx"
click node_booking_api "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/bookings/bookings.controller.ts"
click node_booking_usecases "https://github.com/uca-argentina/pid-2026-josemariacanale/tree/main/agendic-back/src/application/bookings"
click node_service_api "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/services/services.controller.ts"
click node_service_usecases "https://github.com/uca-argentina/pid-2026-josemariacanale/tree/main/agendic-back/src/application/services"
click node_availability "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/availabilities/availabilities.controller.ts"
click node_slots "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/application/slots/list-slots.use-case.ts"
click node_business_setup "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/businesses/businesses.controller.ts"
click node_staff_ops "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/employees/employees.controller.ts"
click node_calendar "https://github.com/uca-argentina/pid-2026-josemariacanale/tree/main/agendic-back/src/application/calendar"
click node_analytics "https://github.com/uca-argentina/pid-2026-josemariacanale/tree/main/agendic-back/src/application/analytics"
click node_loyalty "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/streaks/streaks.controller.ts"
click node_auth "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/users/clerk.guard.ts"
click node_user_resolution "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/application/users/resolve-current-user.use-case.ts"
click node_files "https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/s3-file-storage.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_service_ui,node_client_booking_ui,node_client,node_business_user toneBlue
class node_booking_api,node_booking_usecases,node_availability,node_slots,node_object_store,node_postgres toneAmber
class node_service_api,node_service_usecases,node_business_setup,node_staff_ops toneMint
class node_calendar,node_analytics,node_loyalty,node_auth,node_user_resolution,node_files toneRose
```

## Components

### Web experience

- [Service management](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-front/app/(app)/services/_components/ServicesList.tsx): `agendic-front/app/(app)/services/_components/ServicesList.tsx`
- [Booking management UI](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-front/app/_components/client-booking/ClientBookingDetail.tsx): `agendic-front/app/_components/client-booking/ClientBookingDetail.tsx`

### Booking and availability

- [Booking endpoints](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/bookings/bookings.controller.ts): `agendic-back/src/infrastructure/bookings/bookings.controller.ts`
- [Booking workflows](https://github.com/uca-argentina/pid-2026-josemariacanale/tree/main/agendic-back/src/application/bookings): `agendic-back/src/application/bookings`
- [Availability management](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/availabilities/availabilities.controller.ts): `agendic-back/src/infrastructure/availabilities/availabilities.controller.ts`
- [Slot discovery](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/application/slots/list-slots.use-case.ts): `agendic-back/src/application/slots/list-slots.use-case.ts`

### Business operations

- [Service endpoints](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/services/services.controller.ts): `agendic-back/src/infrastructure/services/services.controller.ts`
- [Service workflows](https://github.com/uca-argentina/pid-2026-josemariacanale/tree/main/agendic-back/src/application/services): `agendic-back/src/application/services`
- [Business setup](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/businesses/businesses.controller.ts): `agendic-back/src/infrastructure/businesses/businesses.controller.ts`
- [Employee and invitation operations](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/employees/employees.controller.ts): `agendic-back/src/infrastructure/employees/employees.controller.ts`

### Platform services

- [Calendar integration](https://github.com/uca-argentina/pid-2026-josemariacanale/tree/main/agendic-back/src/application/calendar): `agendic-back/src/application/calendar`
- [Analytics and exports](https://github.com/uca-argentina/pid-2026-josemariacanale/tree/main/agendic-back/src/application/analytics): `agendic-back/src/application/analytics`
- [Streaks and badges](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/streaks/streaks.controller.ts): `agendic-back/src/infrastructure/streaks/streaks.controller.ts`
- [Authentication guard](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/users/clerk.guard.ts): `agendic-back/src/infrastructure/users/clerk.guard.ts`
- [Current-user resolution](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/application/users/resolve-current-user.use-case.ts): `agendic-back/src/application/users/resolve-current-user.use-case.ts`
- [Durable file storage](https://github.com/uca-argentina/pid-2026-josemariacanale/blob/main/agendic-back/src/infrastructure/s3-file-storage.ts): `agendic-back/src/infrastructure/s3-file-storage.ts`

### Other components

- **Client**
- **Business user**
- **S3-compatible storage**
- **Postgres database**

## Connections

- Business user → Service management: manages services
- Client → Booking management UI: manages bookings
- Service management → Service endpoints: requests services
- Booking management UI → Booking endpoints: manages bookings
- Booking endpoints → Booking workflows: dispatches (evidence: `agendic-back/src/infrastructure/bookings/bookings.controller.ts`)
- Service endpoints → Service workflows: dispatches (evidence: `agendic-back/src/infrastructure/services/services.controller.ts`)
- Service endpoints → Slot discovery: lists slots (evidence: `agendic-back/src/infrastructure/services/services.controller.ts`)
- Business user → Availability management: sets schedule
- Business user → Business setup: publishes business
- Business user → Employee and invitation operations: manages staff
- Authentication guard → Current-user resolution: resolves user (evidence: `agendic-back/src/infrastructure/users/clerk.guard.ts`)
- Business setup → Durable file storage: uploads images (evidence: `agendic-back/src/infrastructure/businesses/businesses.controller.ts`)
- Durable file storage → S3-compatible storage: stores files (evidence: `agendic-back/src/infrastructure/s3-file-storage.ts`)
- Booking endpoints → Postgres database: persists bookings
- Calendar integration → Postgres database: stores connections
- Analytics and exports → Postgres database: queries data
- Business user → Calendar integration: connects calendars
- Business user → Analytics and exports: views analytics
- Business user → Streaks and badges: manages rewards
- Postgres database → Postgres database: runs on
