Overview
GAIA is organized as an Nx monorepo with clear separation between applications and shared libraries. This structure enables code sharing, consistent tooling, and efficient builds across all projects.Repository Layout
Applications
Web App (apps/web)
The Next.js web application providing the browser-based interface.
Tech Stack: Next.js 16, React 19, TypeScript, Zustand, TailwindCSS, Biome
Structure:
- Uses App Router with Server Components
- Organized by features, not technical layers
- Zustand for state management
- Biome for linting and formatting
- Standalone output mode for Electron bundling
Desktop App (apps/desktop)
Electron wrapper around the Next.js web app for native desktop experience.
Tech Stack: Electron, electron-vite, TypeScript
Structure:
- Uses Next.js standalone build output
- Native system integration (notifications, tray, etc.)
- Cross-platform: macOS, Windows, Linux
Mobile App (apps/mobile)
React Native mobile application for iOS and Android.
Tech Stack: React Native, Expo, TypeScript, React Navigation
Structure:
API Backend (apps/api)
FastAPI backend with LangGraph agents for AI orchestration.
Tech Stack: FastAPI, LangGraph, Python 3.11+, PostgreSQL, MongoDB, Redis, ChromaDB, RabbitMQ
Structure:
- FastAPI with automatic OpenAPI documentation
- LangGraph for AI agent orchestration
- ARQ for background job processing (Redis-based)
- Multiple database backends for different use cases
- Uses
uvfor fast dependency management
Voice Agent (apps/voice-agent)
Dedicated worker for voice processing and transcription.
Tech Stack: Python, AssemblyAI, FastAPI
Structure:
Bots (apps/bots/*)
Integration bots for various platforms.
Discord (apps/bots/discord):
- Discord.py integration
- Slash commands
- Event handlers
apps/bots/slack):
- Bolt for Python integration
- Slash commands
- Interactive components
apps/bots/telegram):
- python-telegram-bot integration
- Command handlers
- Inline queries
Shared Libraries
Shared Python (libs/shared/py)
Common Python utilities used across all Python applications.
Package Name: gaia-shared
Contents:
Shared TypeScript (libs/shared/ts)
Common TypeScript utilities used across frontend applications.
Contents:
Infrastructure
Docker Compose (infra/docker)
Docker Compose configurations for local development and production.
Files:
docker-compose.yml- Development environmentdocker-compose.prod.yml- Production environment
- PostgreSQL (port 5432)
- MongoDB (port 27017)
- Redis (port 6379)
- ChromaDB (port 8001)
- RabbitMQ (ports 5672, 15672)
backend- Backend services onlyworker- Worker services onlyvoice- Voice agent services
Configuration Files
Nx Configuration (nx.json)
Central Nx configuration defining:
- Target defaults for build, test, lint, etc.
- Caching strategies
- Task dependencies
- Release configuration
- Docker integration
Project Configuration (project.json)
Each app has a project.json defining:
- Project name and root
- Available targets (build, dev, lint, etc.)
- Dependencies on other projects
- Caching configuration
apps/api/project.json):
Package Management
Node.js (package.json, pnpm-workspace.yaml):
- Root package.json with workspace configuration
- pnpm for fast, efficient dependency management
- Shared dependencies at root level
pyproject.toml, uv.lock):
- Workspace configuration in root
pyproject.toml - Each Python app has its own
pyproject.toml - Shared library via workspace dependencies
uvfor ultra-fast package installation
Development Patterns
Feature-Based Organization
Code is organized by features, not technical layers: Good:Import Aliases
Use absolute imports with path aliases: TypeScript (tsconfig.json):
Workspace Dependencies
Projects can depend on each other through Nx: Python:Project Relationships
Visualize project dependencies:- All projects in the workspace
- Dependencies between projects
- Task relationships
The web and desktop apps share the same Next.js codebase. The desktop app uses the standalone build output from the web app.
Next Steps
- Explore available Development Commands
- Read the Development Setup guide
- Learn about Contributing