Skip to main content

Getting Started

Run the Thoughts Mobile app locally: install deps, configure environment, then start the dev server.

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Expo CLI (optional; npx expo is enough)
  • Supabase accountsupabase.com
  • iOS Simulator (macOS) or Android Emulator for testing

1. Install dependencies

From the project root:

npm install

2. Environment variables

Copy the example env and fill in your Supabase credentials:

cp .env.example .env

Edit .env with:

VariableDescription
EXPO_PUBLIC_SUPABASE_URLYour Supabase project URL
EXPO_PUBLIC_SUPABASE_ANON_KEYSupabase anon/public key
EXPO_PUBLIC_GOOGLE_EXPO_CLIENT_ID(Optional) Google OAuth for Expo Go
EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID(Optional) Google OAuth for iOS
EXPO_PUBLIC_GOOGLE_ANDROID_CLIENT_ID(Optional) Google OAuth for Android
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID(Optional) Google OAuth for web

3. Supabase setup

  1. Create a project at supabase.com.
  2. In Project Settings → API, copy Project URL and anon key into .env.
  3. In SQL Editor, run the schema from supabase-schema.sql (creates tables, RLS, indexes).
  4. In Authentication, enable Email provider (and optionally Google/Apple).

4. Run the app

npm start

Then:

  • Press i for iOS Simulator, a for Android Emulator.
  • Or scan the QR code with Expo Go on a device.

5. Type-check (optional)

npx tsc --noEmit

Troubleshooting

  • Fonts: Place Nunito fonts in assets/fonts/; use npx expo start --clear if they don’t load.
  • Supabase: Confirm .env names match exactly and the project is not paused.
  • Navigation: Restart with npx expo start --clear if navigation state acts up.