Getting ComuniTEA running locally takes only a handful of steps. The app is a standard Expo managed-workflow project — once you have Node.js, a Supabase project, and an emulator or physical device ready, you will have a fully functional dev build including the communication board, exercises, audio playback, and authentication. The only external service you need to start is Supabase; ElevenLabs TTS is optional because all pictogram audio ships as bundled MP3 files.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.
On macOS, running
npx expo start --ios will open the iOS Simulator automatically if Xcode Command Line Tools are installed.This installs all JavaScript and native dependencies declared in
package.json, including Expo SDK 57, React Native 0.86, Expo Router, Zustand, the Supabase JS client, and all audio/camera modules.- Project URL — looks like
https://<your-project-ref>.supabase.co - anon / public key — the long JWT string under “Project API keys”
# .env.local
EXPO_PUBLIC_SUPABASE_URL=https://<your-project-ref>.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=<your-anon-key>
These two variables are read directly by
lib/supabase.ts, which initialises the Supabase client and stores the auth session in expo-secure-store:// lib/supabase.ts
import 'react-native-url-polyfill/auto';
import * as SecureStore from 'expo-secure-store';
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = process.env.EXPO_PUBLIC_SUPABASE_URL;
const supabaseAnonKey = process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY;
if (!supabaseUrl || !supabaseAnonKey) {
throw new Error(
'[ComuniTEA] Faltan variables de entorno requeridas.\n' +
'Asegúrate de que tu archivo .env tenga:\n' +
' EXPO_PUBLIC_SUPABASE_URL=https://<tu-proyecto>.supabase.co\n' +
' EXPO_PUBLIC_SUPABASE_ANON_KEY=<tu-anon-key>'
);
}
const SecureStoreAdapter = {
getItem: (key: string) => SecureStore.getItemAsync(key),
setItem: (key: string, value: string) => SecureStore.setItemAsync(key, value),
removeItem: (key: string) => SecureStore.deleteItemAsync(key),
};
export const supabase = createClient(supabaseUrl!, supabaseAnonKey!, {
auth: {
storage: SecureStoreAdapter,
autoRefreshToken: true,
persistSession: true,
detectSessionInUrl: false,
},
});
Never commit
.env.local to version control. It is already listed in .gitignore. The variables prefixed with EXPO_PUBLIC_ are inlined at build time and visible in the JS bundle — use only the public anon key here, never the service_role key.The database schema is split into an initial schema file and a series of numbered migration files. Apply them in order against your Supabase project using the Supabase CLI:
# Install the Supabase CLI (if not already installed)
npm install -g supabase
# Link to your remote project (paste your project ref when prompted)
supabase link --project-ref <your-project-ref>
# Push all migrations to the remote database
supabase db push
The migrations in
supabase/migrations/ are applied in timestamp order. Key schema objects they create include:phase1_tasks_usage_level.sqlusage_stats table, task loggingphase4_custom_pictograms_category_key.sqlphase7_ai_expand_stat.sqlphase8_sentence_log.sqlparental_settings.sqlphase1_child_profiles.sqlphase5_game_sublevel.sqlphase8_ai_engine.sqlchild_progress.sqlIf you prefer to apply migrations manually via the Supabase Studio SQL editor, open each file in
supabase/migrations/ in ascending filename order and run the SQL directly.This runs
EXPO_NO_TELEMETRY=1 expo start. Scan the QR code with Expo Go, or press a for Android emulator / i for iOS Simulator.If you encounter stale Metro bundler cache issues (common after audio asset changes), clear the cache:
You should land on the login screen. Create an account — Supabase email auth is enabled with
enable_confirmations = false in the local config, so no email confirmation is required in development.For on-demand neural voice synthesis beyond the bundled MP3 files, deploy the
elevenlabs-tts Supabase Edge Function and set the API key as a secret:# Deploy the edge function
supabase functions deploy elevenlabs-tts
# Set the ElevenLabs API key as a Supabase secret
supabase secrets set ELEVENLABS_API_KEY=<your-elevenlabs-api-key>
The function lives at
supabase/functions/elevenlabs-tts/index.ts and is called by the app when the user requests TTS synthesis for a custom utterance.ElevenLabs TTS is entirely optional for development and offline use. All pictogram audio — across all vocabulary categories (comida, emociones, jugar, social, colores, ropa, and many more) — is pre-generated and bundled in
assets/audio/femenina/ and assets/audio/masculina/. The app plays these MP3 files locally without any network call, so the full communication board works without internet connectivity.Next Steps
Once the dev server is running, complete the first-run flow: choose a voice profile (femenina or masculina), complete the onboarding wizard, and walk through the interactive tutorial. Then explore the communication board and try building a sentence with the pictogram strip.
- Read the Architecture overview to understand how features, stores, and navigation fit together.
- Check the Tablero feature docs for a deep-dive into the communication board.
- See the Exercises & Reports docs to understand how the game mode and caregiver reports work.