Multi-Repo Projects
AppsAI projects can contain multiple frontends and backends. This enables building complex applications with admin dashboards, worker services, and microservices architectures.
Overview
By default, projects start with one frontend and one backend. You can add additional frontends and backends as your project grows:
Multiple Frontends
Each frontend is a completely independent Next.js App Router codebase. Use cases include: main customer app, admin dashboard, marketing site.
Multiple Backends
All backends in a project share the same MongoDB database. Use cases include: main API server, background worker, webhook handler.
Architecture
project/ ├── frontend-main/ # Primary frontend (customer app) ├── frontend-admin/ # Admin dashboard ├── backend-main/ # Primary API server ├── backend-worker/ # Background job processor └── agents/ # Shared AI agents
Each frontend has its own codebase, dependencies, and deployment.
All backends connect to the same MongoDB, enabling shared data access.
Frontends deploy to Vercel/CloudFront, backends to EC2/CloudFormation independently.
Managing Frontends & Backends
Adding a Frontend
Use the repo selector dropdown in the editor and click "Add Frontend". Choose a template or start from scratch.
Adding a Backend
Use the repo selector dropdown and click "Add Backend". The new backend will connect to your existing MongoDB.
Switching Between Repos
Use the repo selector in the editor to switch between frontends or backends. The editor context updates accordingly.
Setting Primary Repo
Mark one frontend and one backend as "primary". These are used when no specific repo is specified.
MCP Tool Parameters
When using MCP tools with multi-repo projects, you can specify which frontend or backend to target:
frontendIdPass to canvas tools to target a specific frontend. Example: "main", "admin". Pass null to use the primary frontend.
backendIdPass to backend tools to target a specific backend. Example: "main", "worker". Pass null to use the primary backend.
Example: Reading from admin frontend
canvas_READ_RAW_FILE({
projectId: "abc123",
frontendId: "admin",
filePath: "app/page.tsx"
})Repo Management Functions
listProjectReposList all frontends and backends in a project with their IDs and primary status.
addFrontendAdd a new frontend to the project with a unique ID and display name.
addBackendAdd a new backend to the project. It will connect to the shared MongoDB.
removeRepoRemove a frontend or backend. Cannot remove primary repos or the last repo of its type.
setPrimaryRepoChange which frontend or backend is the primary (default) for its type.
Common Use Cases
Customer + Admin Apps
Main customer-facing app with a separate admin dashboard for content management.
API + Worker Services
Main API backend with separate workers for background jobs, webhooks, or scheduled tasks.
Multi-Tenant Setup
Different frontends for different tenant configurations or white-label deployments.
Marketing + Product
Marketing/landing pages separate from the main product application.
Multi-Repo vs App Connections
Use multi-repo for frontends/backends that are part of the same logical application (shared database, same team). Use app connections to link completely separate projects that need cross-app AI communication.