Welcome to the TRAINAA DEVELOPER DOCS
Overview
TRAINAA is a multi-component application with the following main parts:
- Mobile App - React Native (Expo) application
- Backend - Python FastAPI server with AI agent system
-
Database - Supabase (PostgreSQL)
-
Landing Page - SvelteKit web frontend
Quickstart
Prerequisites
Supabase
- Create a Supabase project and database at supabase.com or a local supabase instance with the Supabase CLI.
## Option 1 if using local supabase instance
cd src/supabase
supabase start
supabase gen signing-key --algorithm ES256
supabase migration up
## Option 2 if using Supabase cloud
cd src/supabase
supabase link --project-ref your-project-ref
supabase migration up
Backend Server
Create a .env file in the src/backend directory based on the provided .env.example and fill in the required environment variables.
Run from root directory:
./dev.sh install # Install backend dependencies
./dev.sh serve # Start development server
App
Create a .env file in the src/app directory based on the provided .env.example and fill in the required environment variables.
bun install # Install app dependencies
bun start # Start Expo development server
# For mobile emulators
bun run android # Start Android emulator
bun run ios # Start iOS simulator
Contributing
We welcome contributions from the community! If you're interested in contributing to TRAINAA, please check out our Contributing Guide for guidelines on how to get involved.
Docs
to start the docs run:
# create venv and activate it
cd docs
python -m venv .venv
source .venv/bin/activate
# install requierements from /docs/requirements.txt
pip install -r requirements.txt
cd ..
# then run from the root directory
mkdocs serve