# hellen-mas/altokke_movil architecture

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

- Interactive diagram: https://gitdiagram.com/hellen-mas/altokke_movil
- Repository: https://github.com/hellen-mas/altokke_movil

## Overview

ALTOKKE MÓVIL is a two-sided mototaxi booking app. A passenger registers or signs in, chooses a route, requests a ride, follows its status, then reviews the trip; a driver registers for approval, handles ride requests, and completes active trips. The graph groups those workflows with account/security, shared backend services, and supporting capabilities documented in the README. Sampled source confirms selected service and state connections; other capability links rely on README documentation, so unsampled implementation details are not inferred.

Main entry points: [`src/shared/api/supabase.ts`](https://github.com/hellen-mas/altokke_movil/blob/main/src/shared/api/supabase.ts) (Supabase client), [`src/features/autenticacion`](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/autenticacion) (Sign-in and account), [`src/features/conductores/services/conductorService.ts`](https://github.com/hellen-mas/altokke_movil/blob/main/src/features/conductores/services/conductorService.ts) (Driver service), [`src/features/viajes/services/viajeService.ts`](https://github.com/hellen-mas/altokke_movil/blob/main/src/features/viajes/services/viajeService.ts) (Trip service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and onboarding"]
  node_auth_routes["Auth routes"]
  node_auth_flow["Sign-in and account"]
  node_passenger_signup["Passenger registration"]
  node_driver_signup["Driver registration"]
end

subgraph group_passenger["Passenger journeys"]
  node_passenger_routes["Passenger routes"]
  node_trip_flow["Trip booking and tracking"]
  node_trip_context["Trip state context<br/>[ViajeContext.tsx]"]
  node_trip_service["Trip service<br/>[viajeService.ts]"]
  node_saved_places["Saved places"]
  node_maps["Maps"]
end

subgraph group_driver["Driver operations"]
  node_driver_routes["Driver routes"]
  node_driver_ops["Driver registration and operations"]
  node_driver_service["Driver service"]
end

subgraph group_platform["Shared platform"]
  node_shared_supabase["Supabase client<br/>[supabase.ts]"]
  node_supabase_backend[("Supabase Auth, PostgreSQL, Storage")]
  node_edge_functions["Edge Functions"]
end

subgraph group_support["Supporting features"]
  node_notifications["Trip notifications"]
  node_finances["Earnings and payments"]
  node_help["Help and reports"]
  node_account_features["Profiles and account settings"]
end

node_passenger_actor(("Passenger"))
node_driver_actor(("Driver"))

node_passenger_actor -->|"registers or signs in"| node_auth_routes
node_auth_routes -.->|"renders auth screens"| node_auth_flow
node_auth_flow -->|"authenticates"| node_shared_supabase
node_auth_flow -->|"checks DNI"| node_edge_functions
node_auth_flow -->|"checks driver status"| node_driver_service
node_passenger_actor -->|"registers profile"| node_passenger_signup
node_driver_actor -->|"submits application"| node_driver_signup
node_driver_signup -.->|"stores application data"| node_driver_service
node_passenger_actor -->|"uses passenger app"| node_passenger_routes
node_passenger_routes -.->|"opens trip screens"| node_trip_flow
node_trip_flow -->|"uses trip state"| node_trip_context
node_trip_context -->|"loads trip data"| node_trip_service
node_trip_flow -->|"creates and rates rides"| node_trip_service
node_trip_flow -->|"shows routes"| node_maps
node_saved_places -->|"sets destination"| node_trip_context
node_saved_places -->|"persists saved places"| node_shared_supabase
node_driver_actor -->|"uses driver app"| node_driver_routes
node_driver_routes -.->|"opens driver features"| node_driver_ops
node_driver_ops -->|"manages driver data"| node_driver_service
node_driver_ops -.->|"handles ride requests"| node_trip_service
node_trip_service -->|"reads and writes rides"| node_shared_supabase
node_driver_service -->|"reads and writes driver data"| node_shared_supabase
node_shared_supabase -->|"connects to backend"| node_supabase_backend
node_auth_flow -->|"uploads avatars"| node_shared_supabase
node_driver_service -->|"uploads documents"| node_shared_supabase
node_notifications -->|"loads trip history"| node_trip_service
node_notifications -->|"subscribes to ride changes"| node_shared_supabase
node_driver_ops -->|"views earnings"| node_finances
node_passenger_routes -->|"manages profile"| node_account_features
node_passenger_routes -->|"opens help and reports"| node_help
node_driver_routes -->|"opens help and reports"| node_help

click node_auth_routes "https://github.com/hellen-mas/altokke_movil/tree/main/src/app/(auth)"
click node_auth_flow "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/autenticacion"
click node_passenger_signup "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/pasajeros/screens/registro"
click node_driver_signup "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/conductores/screens/registro"
click node_passenger_routes "https://github.com/hellen-mas/altokke_movil/tree/main/src/app/(pasajero)"
click node_trip_flow "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/viajes/screens/pasajero"
click node_trip_context "https://github.com/hellen-mas/altokke_movil/blob/main/src/features/viajes/context/ViajeContext.tsx"
click node_trip_service "https://github.com/hellen-mas/altokke_movil/blob/main/src/features/viajes/services/viajeService.ts"
click node_saved_places "https://github.com/hellen-mas/altokke_movil/blob/main/src/features/pasajeros/hooks/useDireccionesGuardadas.ts"
click node_driver_routes "https://github.com/hellen-mas/altokke_movil/tree/main/src/app/(conductor)"
click node_driver_ops "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/conductores"
click node_driver_service "https://github.com/hellen-mas/altokke_movil/blob/main/src/features/conductores/services/conductorService.ts"
click node_shared_supabase "https://github.com/hellen-mas/altokke_movil/blob/main/src/shared/api/supabase.ts"
click node_edge_functions "https://github.com/hellen-mas/altokke_movil/tree/main/supabase/functions"
click node_notifications "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/notificaciones"
click node_finances "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/finanzas"
click node_help "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/soporte"
click node_account_features "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/pasajeros/screens/cuenta"
click node_maps "https://github.com/hellen-mas/altokke_movil/tree/main/src/features/viajes/components"

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_auth_routes,node_auth_flow,node_passenger_signup,node_driver_signup toneBlue
class node_passenger_routes,node_trip_flow,node_trip_context,node_trip_service,node_saved_places,node_maps toneAmber
class node_driver_routes,node_driver_ops,node_driver_service toneMint
class node_shared_supabase,node_supabase_backend,node_edge_functions toneRose
class node_notifications,node_finances,node_help,node_account_features,node_passenger_actor,node_driver_actor toneIndigo
```

## Components

### Identity and onboarding

- [Auth routes](https://github.com/hellen-mas/altokke_movil/tree/main/src/app/(auth)): `src/app/(auth)`
- [Sign-in and account](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/autenticacion): `src/features/autenticacion`
- [Passenger registration](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/pasajeros/screens/registro): `src/features/pasajeros/screens/registro`
- [Driver registration](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/conductores/screens/registro): `src/features/conductores/screens/registro`

### Passenger journeys

- [Passenger routes](https://github.com/hellen-mas/altokke_movil/tree/main/src/app/(pasajero)): `src/app/(pasajero)`
- [Trip booking and tracking](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/viajes/screens/pasajero): `src/features/viajes/screens/pasajero`
- [Trip state context](https://github.com/hellen-mas/altokke_movil/blob/main/src/features/viajes/context/ViajeContext.tsx): `src/features/viajes/context/ViajeContext.tsx`
- [Trip service](https://github.com/hellen-mas/altokke_movil/blob/main/src/features/viajes/services/viajeService.ts): `src/features/viajes/services/viajeService.ts`
- [Saved places](https://github.com/hellen-mas/altokke_movil/blob/main/src/features/pasajeros/hooks/useDireccionesGuardadas.ts): `src/features/pasajeros/hooks/useDireccionesGuardadas.ts`
- [Maps](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/viajes/components): `src/features/viajes/components`

### Driver operations

- [Driver routes](https://github.com/hellen-mas/altokke_movil/tree/main/src/app/(conductor)): `src/app/(conductor)`
- [Driver registration and operations](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/conductores): `src/features/conductores`
- [Driver service](https://github.com/hellen-mas/altokke_movil/blob/main/src/features/conductores/services/conductorService.ts): `src/features/conductores/services/conductorService.ts`

### Shared platform

- [Supabase client](https://github.com/hellen-mas/altokke_movil/blob/main/src/shared/api/supabase.ts): `src/shared/api/supabase.ts`
- **Supabase Auth, PostgreSQL, Storage**
- [Edge Functions](https://github.com/hellen-mas/altokke_movil/tree/main/supabase/functions): `supabase/functions`

### Supporting features

- [Trip notifications](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/notificaciones): `src/features/notificaciones`
- [Earnings and payments](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/finanzas): `src/features/finanzas`
- [Help and reports](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/soporte): `src/features/soporte`
- [Profiles and account settings](https://github.com/hellen-mas/altokke_movil/tree/main/src/features/pasajeros/screens/cuenta): `src/features/pasajeros/screens/cuenta`

### Other components

- **Passenger**
- **Driver**

## Connections

- Passenger → Auth routes: registers or signs in (evidence: `README.md`)
- Auth routes → Sign-in and account: renders auth screens
- Sign-in and account → Supabase client: authenticates (evidence: `src/features/autenticacion/services/authService.ts`)
- Sign-in and account → Edge Functions: checks DNI (evidence: `src/features/autenticacion/hooks/useConsultaDniQuery.ts`)
- Sign-in and account → Driver service: checks driver status (evidence: `src/features/autenticacion/hooks/useLoginSession.ts`)
- Passenger → Passenger registration: registers profile (evidence: `README.md`)
- Driver → Driver registration: submits application (evidence: `README.md`)
- Driver registration → Driver service: stores application data
- Passenger → Passenger routes: uses passenger app (evidence: `README.md`)
- Passenger routes → Trip booking and tracking: opens trip screens
- Trip booking and tracking → Trip state context: uses trip state
- Trip state context → Trip service: loads trip data (evidence: `src/features/viajes/context/ViajeContext.tsx`)
- Trip booking and tracking → Trip service: creates and rates rides (evidence: `README.md`)
- Trip booking and tracking → Maps: shows routes (evidence: `README.md`)
- Saved places → Trip state context: sets destination (evidence: `src/features/pasajeros/hooks/useDireccionesGuardadas.ts`)
- Saved places → Supabase client: persists saved places
- Driver → Driver routes: uses driver app (evidence: `README.md`)
- Driver routes → Driver registration and operations: opens driver features (evidence: `src/app/(conductor)/_layout.tsx`)
- Driver registration and operations → Driver service: manages driver data (evidence: `src/features/conductores/services/conductorService.ts`)
- Driver registration and operations → Trip service: handles ride requests
- Trip service → Supabase client: reads and writes rides (evidence: `src/features/viajes/services/viajeService.ts`)
- Driver service → Supabase client: reads and writes driver data (evidence: `src/features/conductores/services/conductorService.ts`)
- Supabase client → Supabase Auth, PostgreSQL, Storage: connects to backend (evidence: `src/shared/api/supabase.ts`)
- Sign-in and account → Supabase client: uploads avatars (evidence: `src/features/autenticacion/services/authService.ts`)
- Driver service → Supabase client: uploads documents (evidence: `src/features/conductores/services/conductorService.ts`)
- Trip notifications → Trip service: loads trip history (evidence: `src/features/notificaciones/hooks/useNotificaciones.ts`)
- Trip notifications → Supabase client: subscribes to ride changes (evidence: `src/features/notificaciones/services/notificacionesService.ts`)
- Driver registration and operations → Earnings and payments: views earnings (evidence: `README.md`)
- Passenger routes → Profiles and account settings: manages profile (evidence: `README.md`)
- Passenger routes → Help and reports: opens help and reports (evidence: `README.md`)
- Driver routes → Help and reports: opens help and reports (evidence: `README.md`)
