All CruciDrive frontend configuration is injected through environment variables prefixed withDocumentation 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.
EXPO_PUBLIC_ so Expo can bundle them into the JavaScript bundle at build time. No credentials are hard-coded in the source; src/constants/config.ts reads each variable at startup and exposes typed config objects consumed throughout the app.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
EXPO_PUBLIC_API_BASE_URL | Yes | http://localhost:3000 | Base URL of the Express backend REST API |
EXPO_PUBLIC_SUPABASE_URL | Yes | — | Your Supabase project URL (e.g. https://xyz.supabase.co) |
EXPO_PUBLIC_SUPABASE_ANON_KEY | Yes | — | Supabase anonymous API key — public and safe for client-side use |
EXPO_PUBLIC_SOCKET_URL | Yes | http://localhost:3000 | Socket.io server URL (typically the same as the API base URL) |
The
EXPO_PUBLIC_ prefix is required. Any environment variable that omits this prefix is not accessible inside the Expo JavaScript bundle — it will be undefined at runtime, even if it is present in your .env file..env example file
API endpoints config
TheAPI_CONFIG.endpoints object in config.ts centralizes every REST path used by the app. This avoids scattering raw strings across components:
| Key | Path | Notes |
|---|---|---|
auth.register | POST /api/auth/registro | Creates or updates a user profile |
rides.request | POST /api/viajes/solicitar | Passenger requests a ride |
rides.accept | POST /api/viajes/aceptar | Driver accepts a ride |
rides.updateStatus(id) | PATCH /api/viajes/:id/estado | Updates ride status by ID |
chat.messages(threadId) | GET /api/chats/:threadId/mensajes | Fetches chat message history |
Socket.io config
TheSOCKET_CONFIG object controls connection and reconnection behaviour for the Socket.io client:
useSocket which passes these values directly to the io() constructor. After 5 failed reconnection attempts the socket stops retrying and emits a connect_error event.
Location config
LOCATION_CONFIG drives all GPS-related behaviour — update cadence for drivers, the minimum movement threshold, and the default map region centred on Crucita:
useLocation for how these values are consumed at runtime.
App metadata
TheAPP_CONFIG object stores static application-level constants:
driverDataLimitBytes is exposed in the driver profile screen as a data-usage indicator, reminding drivers in low-connectivity areas of Crucita how much data the app has consumed in the current shift.