This guide walks contributors and developers through everything needed to run ComuniTEA locally — from installing prerequisites and configuring environment variables, to launching the Expo dev server on a physical device or emulator. ComuniTEA is an Expo SDK 57 / React Native 0.86 app with a Supabase backend, so the setup covers both the mobile client and the cloud services that power its AI features.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ElthonJohan/comunitea/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before cloning the repository, make sure the following are available on your machine.Node.js 18+
ComuniTEA’s toolchain (Expo CLI, Jest, generation scripts) requires Node 18 or later. npm ships with Node, so no separate install is needed.
Expo Go
Install Expo Go on a physical iOS or Android device to scan the QR code from the dev server, or use the Android emulator (Pixel 5) described below.
Android Emulator (optional)
If you prefer an emulator, create an AVD named Pixel_5 in Android Studio. The
npm run emulator script launches it by name.Supabase Account
A free-tier Supabase project is enough. You’ll need the project URL and anon key for the
.env.local file.Environment Setup
Install dependencies
Install all JavaScript dependencies declared in The project uses Expo SDK 57, React Native 0.86, React 19, Zustand 5, and React Native Reanimated 4 among others. All are resolved from
package.json:node_modules — no separate npx expo install step is required after a clean npm install.Create the environment file
Create a The
.env.local file in the project root with your Supabase credentials:EXPO_PUBLIC_ prefix is required for Expo to expose these values to the React Native bundle at build time. Both variables are validated at startup — the app throws a [ComuniTEA] error if either is missing.Configure AI feature secrets (optional)
ComuniTEA’s Supabase Edge Functions use OpenAI and ElevenLabs for AI-powered features. These are not client-side environment variables — they must be set as Supabase project secrets so the Edge Functions runtime can access them:For local audio generation with the
generate:pictogram-audio script, ELEVENLABS_API_KEY can also be placed in a .env file at the project root (not .env.local). The script reads it automatically.Available npm Scripts
All day-to-day tasks are covered by the scripts defined inpackage.json:
npm run dev
Starts the Expo development server with telemetry disabled. Scan the QR code with Expo Go or press
a to open on Android.npm run android
Starts the dev server and immediately targets the connected Android device or running emulator.
npm run emulator
Launches the Pixel_5 Android Virtual Device. Run this before
npm run android if no emulator is already running.npm run build:web
Exports the app for the web platform using
expo export --platform web. Output lands in the dist/ directory.npm run lint
Runs ESLint via
expo lint, using the flat config in eslint.config.js (based on eslint-config-expo). The dist/ directory is ignored.npm run typecheck
Runs
tsc --noEmit to validate TypeScript types across the entire project without emitting any files.npm test
Runs the full Jest test suite. The
--passWithNoTests flag means the command exits cleanly even if no tests are found yet.npm run generate:pictogram-audio
Calls the ElevenLabs generation script to produce MP3 files for all pictograms defined in
constants/AudioAssets.ts.TypeScript Path Aliases
Thetsconfig.json extends Expo’s base config and defines four path aliases for clean absolute imports:
package.json includes a moduleNameMapper entry for @/ imports, plus entries for native module mocks:
Supabase Local Development
ComuniTEA’s database schema is managed through Supabase migrations. To apply all pending migrations against your project (or a local Supabase instance):.env.local to point at the local URLs printed by supabase start.
Supabase Edge Functions in
supabase/functions/ are excluded from the TypeScript project ("exclude": ["supabase/functions"] in tsconfig.json) because they run in the Deno runtime, not Node.js. They have their own type environment and do not participate in npm run typecheck.Adding New Pictogram Audio
When vocabulary is expanded, the corresponding MP3 files must be generated before the app can play them. ComuniTEA ships a dedicated Node.js script:constants/AudioAssets.ts, resolves the natural-language phrase for each pictogram ID using scripts/lib/build-pictogram-phrases.mjs, then calls the ElevenLabs Text-to-Speech API. Generated MP3 files are written to:
| Profile | Voice | ElevenLabs Voice ID |
|---|---|---|
femenina | Samanta | qBvury71WUJfVeT1STkG |
masculina | Luis | WEXRePkZGpmcFLvCOaB1 |
eleven_multilingual_v2 and can be overridden with the ELEVENLABS_MODEL environment variable.
After adding new audio files, clear the Metro bundler cache so the new assets are picked up:Metro caches asset resolution aggressively. The
-c flag clears the cache and forces a full re-bundle, ensuring newly added MP3s are included in the dev build.