# bwnjawn/sistema-gestion-ltr architecture

> Architecture diagram of the GitHub repository bwnjawn/sistema-gestion-ltr, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bwnjawn/sistema-gestion-ltr
- Repository: https://github.com/bwnjawn/sistema-gestion-ltr

## Overview

Los Troncos de Repil is a reservation web app for restaurant service, cabins, and camping, with a separate owner administration area. Customers choose a service, move through its four-step reservation flow, and review a request; admins sign in to manage the catalog and reservations calendar. Pinia provides shared reservation and authentication state. The README describes offline-first use and Supabase synchronization, but sampled store code does not show a sync queue or cloud writes, so those capabilities and links are marked as documented but unverified.

Main entry points: [`src/router/index.ts`](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/router/index.ts) (Route dispatch), [`src/stores/reservationStore.ts`](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/stores/reservationStore.ts) (Reservation state), [`src/stores/authStore.ts`](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/stores/authStore.ts) (Admin auth state), [`src/views/client/cabana`](https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client/cabana) (Cabin booking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer booking"]
  node_public_views["Home and contact"]
  node_cabin_flow["Cabin booking"]
  node_camping_flow["Camping booking"]
  node_restaurant_flow["Restaurant booking"]
end

subgraph group_admin["Owner administration"]
  node_admin_layout["Admin shell<br/>[AdminLayout.vue]"]
  node_admin_auth["Login and registration<br/>[LoginView.vue]"]
  node_admin_dashboard["Admin dashboard"]
  node_admin_calendar["Reservations calendar"]
  node_catalog_editor["Catalog editor"]
end

subgraph group_state["Shared application state"]
  node_reservation_state["Reservation state"]
  node_auth_state["Admin auth state<br/>[authStore.ts]"]
end

subgraph group_services["External services"]
  node_local_storage[("Browser storage")]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_cloud_backend[("Supabase backend")]
end

node_customers(("Customers"))
node_owners(("Owners"))
node_router["Route dispatch<br/>[index.ts]"]

node_customers -->|"open app"| node_router
node_router -->|"dispatches routes"| node_public_views
node_router -->|"dispatches routes"| node_cabin_flow
node_router -->|"dispatches routes"| node_camping_flow
node_router -->|"dispatches routes"| node_restaurant_flow
node_cabin_flow -->|"updates state"| node_reservation_state
node_camping_flow -->|"updates state"| node_reservation_state
node_restaurant_flow -->|"updates state"| node_reservation_state
node_owners -->|"open admin"| node_router
node_router -->|"dispatches routes"| node_admin_layout
node_router -->|"dispatches routes"| node_admin_auth
node_router -->|"dispatches routes"| node_admin_dashboard
node_router -->|"dispatches routes"| node_admin_calendar
node_router -->|"dispatches routes"| node_catalog_editor
node_router -->|"checks session"| node_auth_state
node_admin_auth -->|"authenticates"| node_auth_state
node_auth_state -->|"reads and writes"| node_local_storage
node_admin_calendar -.->|"uses reservation data"| node_reservation_state
node_catalog_editor -.->|"saves catalog"| node_cloud_backend
node_reservation_state -.->|"syncs reservations"| node_cloud_backend
node_supabase_client -.->|"connects to"| node_cloud_backend

click node_router "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/router/index.ts"
click node_public_views "https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client"
click node_cabin_flow "https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client/cabana"
click node_camping_flow "https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client/camping"
click node_restaurant_flow "https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client/restaurante"
click node_reservation_state "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/stores/reservationStore.ts"
click node_auth_state "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/stores/authStore.ts"
click node_admin_layout "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/layouts/AdminLayout.vue"
click node_admin_auth "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/views/admin/LoginView.vue"
click node_admin_dashboard "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/views/admin/AdminDashboardView.vue"
click node_admin_calendar "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/views/admin/AdminCalendarView.vue"
click node_catalog_editor "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/views/admin/AdminCatalogEditView.vue"
click node_supabase_client "https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/lib/supabase.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_public_views,node_cabin_flow,node_camping_flow,node_restaurant_flow toneBlue
class node_admin_layout,node_admin_auth,node_admin_dashboard,node_admin_calendar,node_catalog_editor toneAmber
class node_reservation_state,node_auth_state,node_router toneMint
class node_local_storage,node_supabase_client,node_cloud_backend toneRose
class node_customers,node_owners toneIndigo
```

## Components

### Customer booking

- [Home and contact](https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client): `src/views/client`
- [Cabin booking](https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client/cabana): `src/views/client/cabana`
- [Camping booking](https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client/camping): `src/views/client/camping`
- [Restaurant booking](https://github.com/bwnjawn/sistema-gestion-ltr/tree/main/src/views/client/restaurante): `src/views/client/restaurante`

### Owner administration

- [Admin shell](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/layouts/AdminLayout.vue): `src/layouts/AdminLayout.vue`
- [Login and registration](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/views/admin/LoginView.vue): `src/views/admin/LoginView.vue`
- [Admin dashboard](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/views/admin/AdminDashboardView.vue): `src/views/admin/AdminDashboardView.vue`
- [Reservations calendar](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/views/admin/AdminCalendarView.vue): `src/views/admin/AdminCalendarView.vue`
- [Catalog editor](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/views/admin/AdminCatalogEditView.vue): `src/views/admin/AdminCatalogEditView.vue`

### Shared application state

- [Reservation state](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/stores/reservationStore.ts): `src/stores/reservationStore.ts`
- [Admin auth state](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/stores/authStore.ts): `src/stores/authStore.ts`

### External services

- **Browser storage**
- [Supabase client](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase backend**

### Other components

- **Customers**
- **Owners**
- [Route dispatch](https://github.com/bwnjawn/sistema-gestion-ltr/blob/main/src/router/index.ts): `src/router/index.ts`

## Connections

- Customers → Route dispatch: open app
- Route dispatch → Home and contact: dispatches routes (evidence: `src/router/index.ts`)
- Route dispatch → Cabin booking: dispatches routes (evidence: `src/router/index.ts`)
- Route dispatch → Camping booking: dispatches routes (evidence: `src/router/index.ts`)
- Route dispatch → Restaurant booking: dispatches routes (evidence: `src/router/index.ts`)
- Cabin booking → Reservation state: updates state (evidence: `src/views/client/cabana/CabanaStep2View.vue`)
- Camping booking → Reservation state: updates state (evidence: `src/views/client/camping/CampingStep4View.vue`)
- Restaurant booking → Reservation state: updates state (evidence: `src/views/client/restaurante/RestaurantStep2View.vue`)
- Owners → Route dispatch: open admin
- Route dispatch → Admin shell: dispatches routes (evidence: `src/router/index.ts`)
- Route dispatch → Login and registration: dispatches routes (evidence: `src/router/index.ts`)
- Route dispatch → Admin dashboard: dispatches routes (evidence: `src/router/index.ts`)
- Route dispatch → Reservations calendar: dispatches routes (evidence: `src/router/index.ts`)
- Route dispatch → Catalog editor: dispatches routes (evidence: `src/router/index.ts`)
- Route dispatch → Admin auth state: checks session (evidence: `src/router/index.ts`)
- Login and registration → Admin auth state: authenticates (evidence: `src/views/admin/LoginView.vue`)
- Admin auth state → Browser storage: reads and writes (evidence: `src/stores/authStore.ts`)
- Reservations calendar → Reservation state: uses reservation data
- Catalog editor → Supabase backend: saves catalog
- Reservation state → Supabase backend: syncs reservations
- Supabase client → Supabase backend: connects to
