This guide walks you through getting both the backend server and the Expo mobile app running on your local machine. By the end, you will have a live Express + Socket.io API connected to Supabase, and an Expo dev client ready to run on a simulator or physical device — all from a single monorepo clone.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.
CruciDrive uses the Supabase free tier for its database, authentication, and Row Level Security policies, which means the initial infrastructure cost is $0. You only need a free Supabase account to follow this guide.
Prerequisites
Before you begin, make sure you have the following installed and available:- Node.js LTS (v20 or higher) — nodejs.org
- Git — git-scm.com
- Expo CLI — install globally with
npm install -g expo-clior usenpx expofor every command - A Supabase project — create a free one at supabase.com. You will need your project URL and anon key from Project Settings → API.
Setup Steps
Clone the repository
Clone the CruciDrive monorepo from GitHub and navigate into the project root:The repository contains two top-level directories:
/backend (Node.js/Express server) and /frontend (React Native Expo app). Each has its own package.json and must be configured and started independently.Configure backend environment variables
Navigate into the backend directory and create a Open
.env file. The backend requires three environment variables to boot — your Supabase project URL, the anonymous public key, and the port for the HTTP/WebSocket server:.env and set the following values:Install dependencies and start the backend
From inside the When the server boots successfully, you should see the following startup banner in your terminal:The server starts an HTTP server on the configured
backend/ directory, install dependencies and launch the development server using nodemon (which auto-restarts on file changes):PORT, registers three REST route groups (/api/auth, /api/viajes, /api/chats), and initializes the Socket.io handler for real-time GPS and chat events — all in a single process.Configure frontend environment variables
Open a new terminal, navigate to the Create a
frontend/ directory, and create a .env file for the Expo app. The frontend uses Expo’s EXPO_PUBLIC_ prefix convention so variables are safely embedded in the client bundle at build time:.env file with the following contents:Install dependencies and start the Expo app
From inside the Then choose your target platform:Scanning the QR code with the Expo Go app on your physical device will load the app immediately. For Android emulator or iOS simulator, make sure the respective tools (Android Studio / Xcode) are installed and a virtual device is running.
frontend/ directory, install dependencies and start the Expo development server:Verify the backend connection
With the backend running, confirm the server is healthy and connected to Supabase by hitting the root endpoint. This endpoint internally calls A successful response looks like:If you receive a
supabase.auth.getSession() to verify the Supabase connection is live:500 error instead, double-check that SUPABASE_URL and SUPABASE_ANON_KEY in your backend .env are correct and that your Supabase project is active.What’s Running
After completing all steps, you have:| Process | URL | Description |
|---|---|---|
| Express REST API | http://localhost:3000/api | Auth, rides, and chat endpoints |
| Socket.io server | ws://localhost:3000 | Live GPS tracking and in-ride chat |
| Expo dev server | exp://localhost:8081 | React Native app with hot reload |