What This Document Covers:
- Quick start guide for setting up and running LaunchAgencyBot Web UI
- Environment variable configuration (AI services, Firebase, LLM observability)
- Installation steps and dependency verification
- Server startup in development and production modes
- Authentication setup recommendations
- Common troubleshooting and issue resolution
Sections in This Document:
- Overview
- Technology Stack
- Environment Setup
- Installation
- Running the Server
- Server Configuration
- Authentication Setup
- Verifying Installation
- Common Issues
- Next Steps
Related Documentation:
- → ../../README.md - Project overview and navigation hub
- → ../features/API_ENDPOINTS.md - Complete API endpoint reference
- → ./API_INTEGRATION_GUIDE.md - Integration patterns and best practices
- → ../features/WEB_UI.md - Web UI architecture and features
Context Tags: #getting-started #setup #installation #web-ui #configuration #quickstart
Quick start guide for setting up and running the LaunchAgencyBot Web UI API server.
Related Documentation:
- API_ENDPOINTS.md - Complete API reference
- API_INTEGRATION_GUIDE.md - Integration patterns and best practices
| Component | Technology | Purpose |
|---|---|---|
| Framework | FastAPI 0.100+ | Async HTTP API server |
| Runtime | asyncio with uvicorn | ASGI server |
| Validation | Pydantic v2 | Request/response schemas |
| Vector DB | ChromaDB | RAG embeddings and search |
| Persistence | Firebase | User data and configurations |
| File Storage | Local Filesystem | Media files and metadata |
| Blockchain | Solana Web3.py | pump.fun integration |
# AI Services (Required)
REPLICATE_API_KEY=your_replicate_token # CLIP embeddings
OPENAI_API_KEY=your_openai_key # LLM services (GPT-4)
# LLM Observability (Optional)
LANGFUSE_SECRET_KEY=your_langfuse_key # LLM call tracking
LANGFUSE_PUBLIC_KEY=your_langfuse_pub # Dashboard access
# Firebase (Optional - required for persistence features)
FIREBASE_CREDENTIALS=path/to/creds.json # Firebase service accountCreate .env in project root:
# .env
REPLICATE_API_KEY=r8_xxxxxxxxxxxxxxxxxxxxx
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxx
LANGFUSE_SECRET_KEY=sk-lf-xxxxxxxxxxxxxxx
LANGFUSE_PUBLIC_KEY=pk-lf-xxxxxxxxxxxxxxx
FIREBASE_CREDENTIALS=./firebase-credentials.json# Using pip
pip install -r requirements.txt
# Using poetry
poetry install# Check Python version (3.10+ required)
python --version
# Verify FastAPI installation
python -c "import fastapi; print(fastapi.__version__)"
# Verify ChromaDB installation
python -c "import chromadb; print(chromadb.__version__)"# Start with auto-reload (recommended for development)
PYTHONPATH=. uvicorn src.web_ui.main:app --port 8000 --host 127.0.0.1 --reload
# The server will be available at:
# http://127.0.0.1:8000
# Interactive API docs at:
# http://127.0.0.1:8000/docs# Start with multiple workers
PYTHONPATH=. uvicorn src.web_ui.main:app \
--port 8000 \
--host 0.0.0.0 \
--workers 4 \
--log-level info
# Recommended production setup:
# - Use reverse proxy (nginx/caddy)
# - Enable HTTPS
# - Set up authentication
# - Configure rate limiting| Environment | URL | Use Case |
|---|---|---|
| Development | http://127.0.0.1:8000 |
Local testing |
| Staging | http://your-staging-ip:8000 |
Pre-production |
| Production | https://api.yourdomain.com |
Live deployment |
Default port: 8000
Change port via command line:
uvicorn src.web_ui.main:app --port 3000Or via environment variable:
PORT=3000 uvicorn src.web_ui.main:appDevelopment Mode: No authentication required
-
JWT-Based Authentication
# Add to src/web_ui/auth.py from fastapi.security import HTTPBearer from jose import jwt security = HTTPBearer()
-
API Key Validation
- Service-to-service authentication
- Rate limiting per key
- Usage tracking
-
OAuth 2.0
- User-facing endpoints
- Social login integration
- Token refresh flows
-
Rate Limiting
# Add rate limiting middleware from slowapi import Limiter from slowapi.util import get_remote_address limiter = Limiter(key_func=get_remote_address)
# Server should respond with 200
curl http://127.0.0.1:8000/api/health# Get generation tags
curl http://127.0.0.1:8000/api/generation/tagsOpen browser to:
- Swagger UI:
http://127.0.0.1:8000/docs - ReDoc:
http://127.0.0.1:8000/redoc
# Find process using port 8000
lsof -i :8000
# Kill process
kill -9 <PID># Check if variables are set
echo $REPLICATE_API_KEY
echo $OPENAI_API_KEY
# Source .env file
export $(cat .env | xargs)# Verify credentials file exists
ls -la ./firebase-credentials.json
# Check file permissions
chmod 600 ./firebase-credentials.json
# Verify JSON format
python -c "import json; json.load(open('firebase-credentials.json'))"# Clear ChromaDB directory
rm -rf ./chroma_db
# Restart server to recreate database-
Explore API Documentation
- Read API_ENDPOINTS.md for complete endpoint reference
- Test endpoints using Swagger UI at
/docs
-
Integration Development
- Follow patterns in API_INTEGRATION_GUIDE.md
- Implement error handling and retry logic
-
Configure Features
- Set up Firebase for persistence
- Configure Solana network (devnet/mainnet)
- Enable trend detection workflows
-
Production Deployment
- Set up reverse proxy (nginx/caddy)
- Enable HTTPS with SSL certificates
- Configure authentication
- Set up monitoring and logging
Last Updated: January 2025 - LaunchAgencyBot Web UI v2.0