How emiliofex20/clinica-del-auto works
Clínica del Auto is a vehicle inspection and delivery application for technicians and administrators. The principal workflow is to sign in, create an inspection with customer and vehicle details, record checklist answers and observations, attach vehicle photos, and then review or edit inspection records; administrators can also delete them. Supabase provides authentication, database, and photo storage. The graph reflects sampled source and tree-supported features; unsampled action and route internals limit some wiring detail.
Main entry points: actions.ts Inspection actions · server.ts Server Supabase client · page.tsx Inspection list · new-inspection-form.tsx Inspection form
Components 19
Access and navigation
- Sign in
app/login/page.tsx - Login actions
app/login/actions.ts
Inspection workflow
- Inspection list
app/inspections/page.tsx - New inspection page
app/inspections/new/page.tsx - Inspection form
app/inspections/new/new-inspection-form.tsx - Inspection actions
app/inspections/actions.ts - Edit inspection
app/inspections/[id]/edit/page.tsx
Administration
- Admin inspections
app/admin/inspections/page.tsx - Delete control
app/admin/inspections/DeleteInspectionButton.tsx
Data and offline
- Server Supabase client
lib/supabase/server.ts - Browser Supabase client
lib/supabase/client.ts - Supabase auth
- Supabase database
- Photo storage
- Application layout
app/layout.tsx - PWA registration
components/PWARegister.tsx - Service worker
public/sw.js - Asset cache
Other components
- Staff user
Connections 29
- Staff user → Sign in: opens
- Sign in → Login actions: submits credentials
- Login actions → Server Supabase client: creates client
- Server Supabase client → Supabase auth: authenticates
- Staff user → Inspection list: opens records
- Inspection list → Server Supabase client: creates client
- Inspection list → Supabase database: reads profiles and inspections
- Inspection list → New inspection page: opens creation
- New inspection page → Inspection form: renders form
- Staff user → Inspection form: enters inspection
- Inspection form → Browser Supabase client: creates client
- Inspection form → Photo storage: uploads photos
- Inspection form → Inspection actions: submits form
- Inspection actions → Server Supabase client: creates client
- Inspection actions → Supabase auth: checks user
- Inspection actions → Supabase database: checks permissions and writes records
- Inspection list → Edit inspection: opens edit
- Edit inspection → Server Supabase client: creates client
- Edit inspection → Supabase database: reads inspection and checklist
- Edit inspection → Inspection actions: binds update action
- Staff user → Admin inspections: opens admin records
- Admin inspections → Server Supabase client: creates client
- Admin inspections → Supabase database: checks role and reads inspections
- Admin inspections → Delete control: renders delete control
- Delete control → Inspection actions: submits deletion
- Inspection actions → Supabase database: checks admin and deletes inspection
- Application layout → PWA registration: renders
- PWA registration → Service worker: registers
- Service worker → Asset cache: caches assets