Project Structure
A guide to the file and folder organization of the VibeFast monorepo starter kit.
The VibeFast project is organized as a modern monorepo using Turborepo and PNPM, with clear separation between applications, packages, and shared utilities. This structure promotes modularity, scalability, and maintainability for large-scale applications.
Root Directory
The root of the monorepo contains configuration files, CI/CD workflows, and the main workspace directories.
apps/: Contains all applications (currently the React Native app, structured for future web apps)packages/: Shared packages including backend logic and reusable UI componentsdocs/: Project documentation and guidesvf-agent/: AI Agent functionality and configurationsturbo.json: Turborepo configuration for build orchestrationpnpm-workspace.yaml: PNPM workspace configurationpackage.json: Root package.json with workspace scripts and dependencies
Applications
The apps directory contains the main application(s) in the monorepo.
apps/native/: The React Native/Expo mobile applicationsrc/: All frontend source codeassets/: Static assets like fonts, images, and Lottie animationsapp.config.ts: Expo configurationpackage.json: Native app dependencies and scripts
Packages
The packages directory contains shared packages that can be used across applications.
packages/backend/(@vibefast/backend): Convex backend as a separate packageconvex/: All backend code including schema, functions, and auth configurationindex.ts: Backend package exports and client setup
packages/ui/: Shared UI components librarycomponents/: Reusable UI components across applicationsindex.ts: UI package exports
Frontend Structure
The native app source code is organized using a feature-sliced architecture with enhanced modularity.
app/: Routing & Screens. File-based routing with Expo Router, containing all screens and navigation layoutscomponents/: Reusable UI. Core UI components organized by category (ui, advanced-ui, demo, etc.)features/: Business Logic. Feature modules with complete functionality (except for essential ones, they removed and added using our CLI):authentication/: Auth flows and UIchatbot/: AI chatbot with advanced capabilitiesvoice-bot/: Voice interaction systemwake-word/: Hotword detectionaudio-recorder/: Audio capture and processingimage-analyzer/,image-generator/: AI-powered image featurespayments/: Payment processing and subscriptionscharts/: Data visualization componentsquick-actions/: Contextual shortcut systemquiz/: Interactive quiz functionalitytracker-app/: Simple calorie tracker with a clean UI (extra, nice-to-have feature)
core/: Core Services. Application-wide services (auth, analytics, cache, payments, storage)lib/: Shared Utilities. Hooks, i18n, state management, and shared helpersproviders/: React Providers. Context providers for Convex, theme, analytics, etc.api-client/: API Layer. Type-safe API clients for backend services
Backend Structure
The backend package contains all Convex-related backend functionality.
schema.ts: Database schema definitions and relationshipsauth.ts&auth.config.ts: Authentication configuration using@convex-dev/authhttp.ts&router.ts: HTTP endpoints and routing configurationagents.ts: AI agent configurations and managementtools/: Advanced AI tools (knowledge retrieval, search, user profiles)chatbotAgent.ts: Enhanced chatbot with agent capabilitiesragKnowledge.ts: Retrieval-Augmented Generation knowledge base- Feature modules: Individual backend functions organized by domain (auth, payments, images, etc.)
Development Scripts
The monorepo uses Turborepo for efficient build orchestration. Key scripts include:
{
"dev": "turbo dev", // this runs your app, web and the backend
"dev:native": "turbo -F native dev",
"dev:web": "turbo -F web dev",
"dev:server": "turbo -F @vibefast/backend dev",
"build": "turbo build",
"build:backend": "turbo -F @vibefast/backend build",
"test": "turbo test",
}Environment Management
The monorepo supports multiple environments:
- Local: Development environment with debug features
- Staging: Pre-production testing environment
- Production: Live deployment environment
Environment-specific builds are configured through Expo EAS profiles and environment variables.
Found an issue or bug in the docs?
Help me improve! If you spot any errors, typos, or have suggestions, please let me know.
Reach out on X/Twitter @zafarbuildzz