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 expois enough) - Supabase account — supabase.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:
| Variable | Description |
|---|---|
EXPO_PUBLIC_SUPABASE_URL | Your Supabase project URL |
EXPO_PUBLIC_SUPABASE_ANON_KEY | Supabase 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
- Create a project at supabase.com.
- In Project Settings → API, copy Project URL and anon key into
.env. - In SQL Editor, run the schema from
supabase-schema.sql(creates tables, RLS, indexes). - 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/; usenpx expo start --clearif they don’t load. - Supabase: Confirm
.envnames match exactly and the project is not paused. - Navigation: Restart with
npx expo start --clearif navigation state acts up.