Backend Services
Updated Mar 30, 2026Features
Manage your Web App backend.
Overview
Web App projects include a Python FastAPI backend. The AI agent creates API endpoints, handles database operations, and manages server-side logic.
Backend Tab
The Backend tab in the workspace shows:
- Process status — Running (green dot) or stopped
- Start/Stop/Restart — Control the backend process
- Live logs — Real-time streaming of backend output
- Port — The backend runs on port 8080 internally
API Proxy
The frontend proxy configuration routes /api/ requests to the backend automatically. No manual CORS setup needed.
What the AI Creates
When you describe backend features, the AI generates:
- FastAPI route handlers with proper HTTP methods
- Pydantic models for request/response validation
- Database models and migration files (when PostgreSQL is enabled)
- Error handling and logging
- Environment variable usage for configuration
Environment Variables
Backend environment variables are managed in the Environment tab:
- Set different values for Dev and Prod
- DATABASE_URL is automatically injected when PostgreSQL is enabled
- Custom variables are available via os.getenv() in Python code
Publishing the Backend
When you publish a Web App, the backend is deployed as a managed service. It's available at yourname.xaio.app/api/ with automatic scaling.

