Full-Stack & Monorepos

Deploy frontend and backend together with one command. Telbase auto-detects services in your project and deploys each to its optimal provider with per-service subdomains.

Auto-Detection

Telbase scans your project for deployable services using two methods. First, it checks for npm, yarn, or pnpm workspace configurations. If no workspaces are found, it scans immediate subdirectories for framework markers (package.json, requirements.txt, go.mod, Dockerfile). Each detected service is analyzed independently for its framework, database needs, and dependencies.

Project structure (no workspace config needed)
my-project/
├── frontend/          # Vite detected → Vercel (project.telbase.ai)
│   ├── package.json
│   └── vite.config.ts
└── api/               # FastAPI detected → GCP (project-api.telbase.ai)
    ├── requirements.txt
    └── main.py

Telbase detects your monorepo structure and lists the services it found. Deploy each service from its directory:

bash
cd frontend && npx telbase deploy    # deploys frontend service
cd api && npx telbase deploy         # deploys API service
Detection order
Telbase first checks for workspaces in package.json (npm/yarn) or pnpm-workspace.yaml (pnpm). If no workspace config is found, it scans subdirectories directly. Standard layouts like frontend/ + api/ work automatically regardless of language — no workspace configuration required.

How Routing Works

Each service gets its own subdomain under your project's domain. URLs are returned in the deploy response.

Environment Variables

Each service has its own environment variables. Use the --service flag to target a specific service.

Per-service environment variables
npx telbase env set DATABASE_URL=postgresql://... --service backend
npx telbase env set SECRET_KEY=... --service backend

After deploying both services, set cross-service environment variables using the URLs from each deploy response:

Cross-service environment variables
npx telbase env set NEXT_PUBLIC_API_URL=https://my-app-api.telbase.ai --service frontend
npx telbase env set CORS_ORIGINS=https://my-app.telbase.ai --service backend

Common Patterns

FrontendBackendNotes
Vite + ReactFastAPISet VITE_API_URL to backend subdomain URL
Next.jsExpressUse NEXT_PUBLIC_API_URL with backend subdomain
SvelteKitGoGo auto-detected from go.mod
Vite + ReactDocker (Java)Backend needs a paid plan for Docker
AstroDjangoDjango detected from manage.py

Any Language, One Project

Each service in your project can use a different language and framework. Telbase detects each independently from its code — no configuration needed to mix languages.

Mixed-language project
my-app/
├── frontend/     → Next.js (TypeScript) → Vercel → project.telbase.ai
├── api/          → FastAPI (Python) → Cloud Run → project-api.telbase.ai
├── worker/       → Go → Cloud Run → project-worker.telbase.ai
└── dashboard/    → Vite (TypeScript) → Vercel → project-dashboard.telbase.ai

Detection is code-based — Telbase reads package.json, requirements.txt, go.mod, and Dockerfile in each directory. Each service gets its own environment variables, its own provider, and its own deploy lifecycle.

Universal deployment via Docker
Any language works via Docker — Java, Ruby, Rust, PHP, C#, Elixir. Telbase detects your Dockerfile and deploys to GCP Cloud Run. See Docker Containers.

Redeployment

Telbase tracks what changed between deploys. By default, only modified services redeploy — saving time and avoiding unnecessary downtime.

Redeployment commands
npx telbase deploy --service api  # deploy a single service by name
cd api && npx telbase deploy       # or deploy from the service directory

Deploy from a service's directory or use the --service flag to target a specific service by name.

Projects Without Workspaces

Workspace configuration is not required. If your project has standard directory names (frontend/, api/, client/, server/), Telbase detects them automatically via subdirectory scanning:

bash
cd api && npx telbase deploy         # deploy the api service
cd frontend && npx telbase deploy    # deploy the frontend

Each subdirectory deploys as a separate service under the same project. Each service gets its own subdomain.

Next Steps