CruciDrive is a hyperlocal mobility platform built for the parish of Crucita, Manabí, Ecuador. It replaces random street patrolling (“vuelteo”) with proximity-based ride dispatch, reducing fuel waste and improving citizen safety through a dual-role mobile app backed by a Node.js/Express API and PostgreSQL with PostGIS.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DavidCevallos15/Crucidrive---APP/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get the backend and frontend running locally in under 10 minutes.
Architecture
Understand the monorepo structure, tech stack, and data flow.
Backend API
Explore REST endpoints for auth, rides, and chat with full parameter docs.
WebSockets
Real-time GPS tracking and in-ride chat via Socket.io events.
Frontend Hooks
TypeScript hooks for auth, socket, tariff calculation, and location.
Design System
Glassmorphic design tokens — colors, typography, spacing, and effects.
How CruciDrive works
Authenticate via SMS OTP
Users sign in with their phone number. Supabase Auth sends a one-time code — no passwords required. After verifying, users register a profile as either a passenger or a driver.
Connect to real-time infrastructure
The mobile app opens a Socket.io WebSocket connection authenticated with the Supabase JWT. Drivers join sector rooms and begin broadcasting their GPS coordinates every 5 seconds.
Request and dispatch rides
A passenger selects an origin and destination sector, sees a pre-calculated fixed tariff, and submits a ride request. Nearby drivers receive the request and can accept it via the REST API.
Key features
GPS Tracking
Sector-based Socket.io rooms broadcast driver locations to passengers in real time with PostGIS storage.
Fixed Tariffs
10 pre-defined routes between 5 sectors of Crucita with flat pricing, distance, and time estimates.
Panic Button
Passengers can trigger an SOS alert with a hold gesture, sharing their live route with administrators.
Role-Based Access
Every REST endpoint and WebSocket event validates the caller’s role — passenger, driver, or admin.
Row Level Security
Supabase RLS policies ensure users can only read and write data they own or are participants in.
Glassmorphic UI
60fps Reanimated animations, backdrop blur via expo-blur, and a full Glassmorphism design token system.