Skip to main content

Prerequisites

Before you begin, make sure you have the following:
  • Node.js 18+ and npm
  • A Supabase project (the shared team project or your own)
  • A PostgreSQL database — the Supabase project’s database works fine

Set up the project

1

Clone and install

Clone the repository and install dependencies for both the backend and frontend.
git clone https://github.com/codebox-calpoly/AuraFarm.git
cd AuraFarm
cd backend && npm install && cd ..
2

Configure the backend

Copy the example environment file and fill in your Supabase credentials.
cp backend/.env.example backend/.env
Open backend/.env and set the following four variables:
VariableWhere to find it
DATABASE_URLSupabase → Project Settings → Database → Connection string (URI)
SUPABASE_URLSupabase → Project Settings → API → Project URL
SUPABASE_SERVICE_KEYSupabase → Project Settings → API → service_role secret key
SUPABASE_ANON_KEYSupabase → Project Settings → API → anon public key
3

Run database migrations

Apply the Prisma migrations to your database.
cd backend && npx prisma migrate deploy && cd ..
4

Start the backend

Run the backend development server.
cd backend && npm run dev
The API will be available at http://localhost:3000.
5

Start the frontend

Launch the Expo development server.
cd frontend && npx expo start
On a physical device, the app automatically connects to your machine’s local IP — no manual configuration needed, as long as your phone and laptop are on the same WiFi network.
6

Open the app

Once the Expo server is running, you have three options:
  • Physical device — scan the QR code with Expo Go
  • iOS Simulator — press i in the terminal
  • Android Emulator — press a in the terminal
The app opens to the onboarding flow. Tap Continue through the three screens, then tap Start to reach the sign-up screen. Sign up with a @calpoly.edu email address to create your account and start submitting challenges.

Frontend environment (optional)

The frontend auto-detects the backend URL from Expo’s Metro bundler — no .env file is required for local development. If you need to point the frontend at a remote or production API, copy the frontend example file and set EXPO_PUBLIC_API_URL:
cp .env.example .env   # inside the frontend/ folder
# frontend/.env
EXPO_PUBLIC_API_URL=https://your-api.example.com

Build docs developers (and LLMs) love