Hub Implementation Progress
0%Quick Status
- Core data models defined
- Session management working
- Chat manager implemented
- Tool execution pipeline
- RAG memory system
- REST API endpoints
- Web UI (React/Vite)
- SSE streaming responses
- Authentication system
- Docker deployment ready
AI Provider Configuration
PendingConfigure API keys for the AI providers the Hub will use for chat completions.
๐ฃ Claude (Anthropic)
Primary provider for code understanding
๐ข OpenAI (GPT-4)
Alternative provider
๐ต Google Gemini
Multi-modal support
๐ Ollama (Local)
Self-hosted LLMs
Claude (Anthropic)
OpenAI
Google Gemini
Ollama (Local)
External Services
PendingConfigure third-party services for embeddings, auth, storage, etc.
๐ Services Required Overview
The Hub requires these external services. Most have free tiers to get started.
| Service | Purpose | Free Tier | Paid Pricing | Required? |
|---|---|---|---|---|
| AI Provider | Chat responses | Pick at least one below | Required | |
| โณ Claude (Anthropic) | Chat AI | โ No | $3-15/M tokens | Option A |
| โณ OpenAI | Chat AI | โ No | $0.50-60/M tokens | Option B |
| โณ Gemini (Google) | Chat AI | โ Yes (15 req/min) | $0.125-5/M tokens | Option C |
| โณ Ollama | Chat AI (local) | โ Free (local) | N/A (your hardware) | Option D |
| Embeddings | RAG memory/search | Pick one below | Required | |
| โณ OpenAI Embeddings | text-embedding-3-small | โ No | $0.02/M tokens | Option A |
| โณ Gemini Embeddings | embedding-001 | โ Yes (1500 req/min) | Free | Option B |
| โณ Ollama Embeddings | nomic-embed-text | โ Free (local) | N/A (your hardware) | Option C |
| Supabase | Auth + Database | โ Yes (50K users/mo) | $25/mo (Pro) | Required |
| Stripe | Payments/Billing | โ Yes (test mode) | 2.9% + 30ยข/txn | If monetizing |
| Hosting | Run the Hub | Options below | Required | |
| โณ Local/Docker | Self-hosted | โ Free | Your hardware | Option A |
| โณ Railway/Render | Simple cloud | โ Limited | ~$5-20/mo | Option B |
| โณ AWS/GCP | Full cloud | โ Free tier | Variable | Option C |
๐ก Minimum Viable Setup (Free/Cheap)
To get started with minimal cost:
- AI Provider: Gemini (free tier) or Ollama (local)
- Embeddings: Gemini embeddings (free) or Ollama nomic-embed
- Auth: Supabase free tier (50K monthly users)
- Hosting: Local Docker or Railway free tier
- Billing: Skip Stripe until you need to monetize
Estimated cost: $0/month to start
โ๏ธ AWS Cloud Infrastructure (Production SaaS)
For offering cloud-based instances to clients, you need AWS infrastructure.
Terraform configs are in hub/infra/terraform/
| AWS Service | Purpose | Est. Monthly Cost | Status |
|---|---|---|---|
| ECS Fargate | Container orchestration (runs the Hub) | $150-200 (3 tasks) | |
| Aurora Serverless v2 | PostgreSQL database (auto-scales) | $50-500 (usage-based) | |
| ElastiCache (Redis) | Session cache, rate limiting | $100-150 | |
| S3 | File storage, assets, backups | $5-50 | |
| ALB | Load balancer + SSL termination | $20-30 | |
| CloudWatch | Monitoring, logs, alerts | $10-30 | |
| Secrets Manager | API keys, credentials | $5 | |
| ECR | Docker container registry | $5-10 | |
| Route 53 | DNS + domain management | $1-5 | |
| VPC | Networking (included) | $0 | |
| Estimated Production Total | $350-800+/month | ||
๐ง AWS Setup Checklist
- Create AWS account + billing alerts
- Set up IAM user with Terraform permissions
- Create S3 bucket for Terraform state
- Create DynamoDB table for state locking
- Store API keys in Secrets Manager
- Register domain in Route 53
- Request SSL certificate in ACM
- Run terraform init + apply
- Deploy first container image
cd hub/infra/terraform
terraform init
terraform plan -var-file=environments/dev.tfvars
terraform apply -var-file=environments/dev.tfvars
๐ AWS Credentials Required
| Variable | Purpose | Where to Get |
|---|---|---|
AWS_ACCESS_KEY_ID |
AWS IAM credentials | IAM Console |
AWS_SECRET_ACCESS_KEY |
AWS IAM secret | IAM โ Users โ Security credentials |
AWS_REGION |
Deployment region | Default: us-west-2 |
Note: API keys (Anthropic, Supabase, Stripe) are stored in AWS Secrets Manager, not environment variables, for production security.
๐ง Environment Variables Required
| Variable | Service | Where to Get |
|---|---|---|
ANTHROPIC_API_KEY |
Claude AI | console.anthropic.com |
OPENAI_API_KEY |
OpenAI / Embeddings | platform.openai.com |
GOOGLE_API_KEY |
Gemini AI / Embeddings | aistudio.google.com |
SUPABASE_URL |
Supabase | Project Settings โ API โ URL |
SUPABASE_KEY |
Supabase | Project Settings โ API โ anon/public key |
SUPABASE_JWT_SECRET |
Supabase | Project Settings โ API โ JWT Secret |
STRIPE_SECRET_KEY |
Stripe | dashboard.stripe.com |
STRIPE_PUBLISHABLE_KEY |
Stripe | Same as above (pk_...) |
STRIPE_WEBHOOK_SECRET |
Stripe | Webhooks โ Add endpoint โ Secret |
๐ง Embeddings Provider
๐๏ธ Vector Database
๐ Authentication
๐ Analytics (Optional)
Credentials & API Keys
IncompleteStore all API keys, service logins, and test accounts. All data is encrypted locally.
๐ API Keys
These are the actual API keys used in your .env file and AWS Secrets Manager.
Claude (Anthropic)
- Account created
- API key verified working
OpenAI
- Account created
- API key verified working
Google (Gemini)
- Account created
- API key verified working
Supabase
- Project created
- Auth tested working
Stripe
- Account created
- Products/prices created
- Webhook configured
AWS
- Account created
- IAM user created
- Credentials verified
๐ Service Dashboard Logins
Login credentials for each service's admin dashboard.
| Service | Dashboard URL | Password | |
|---|---|---|---|
| Anthropic | console.anthropic.com |
|
|
| OpenAI | platform.openai.com |
|
|
| Google Cloud | aistudio.google.com |
|
|
| Supabase | supabase.com/dashboard |
|
|
| Stripe | dashboard.stripe.com |
|
|
| AWS | console.aws.amazon.com |
|
|
| GitHub | github.com |
|
๐ Step-by-Step Service Setup
๐ Supabase Setup (Auth + Database)
- Go to supabase.com and sign up
- Click "New Project" โ choose organization
- Enter project name:
fastband-hub - Set a strong database password (save it!)
- Choose region closest to your users
- Wait for project to provision (~2 min)
- Go to Settings โ API:
- Copy "Project URL" โ
SUPABASE_URL - Copy "anon public" key โ
SUPABASE_KEY - Copy "JWT Secret" โ
SUPABASE_JWT_SECRET
- Copy "Project URL" โ
- Go to Authentication โ Providers โ enable Email
- Optional: Enable Google/GitHub OAuth
- Supabase setup complete
๐ณ Stripe Setup (Payments)
- Go to stripe.com and create account
- Complete business verification (can skip for test mode)
- Go to Developers โ API Keys:
- Copy "Publishable key" โ
STRIPE_PUBLISHABLE_KEY - Copy "Secret key" โ
STRIPE_SECRET_KEY
- Copy "Publishable key" โ
- Create Products:
- Products โ Add Product โ "Fastband Hub Pro"
- Add pricing: $29/month (or your price)
- Copy the Price ID โ
STRIPE_PRO_PRICE_ID
- Set up Webhook:
- Developers โ Webhooks โ Add endpoint
- URL:
https://your-domain.com/api/stripe/webhook - Events: checkout.session.completed, customer.subscription.*
- Copy Signing secret โ
STRIPE_WEBHOOK_SECRET
- Stripe setup complete
๐ค Claude/Anthropic Setup
- Go to console.anthropic.com
- Sign up / Log in
- Add payment method (Settings โ Billing)
- Go to API Keys โ Create Key
- Name it:
fastband-hub-production - Copy the key โ
ANTHROPIC_API_KEY - Set usage limits if desired
- Anthropic setup complete
๐ง OpenAI Setup
- Go to platform.openai.com
- Sign up / Log in
- Add payment method (Settings โ Billing)
- Go to API Keys โ Create new secret key
- Name it:
fastband-hub - Copy the key โ
OPENAI_API_KEY - Set usage limits (Settings โ Limits)
- OpenAI setup complete
โจ Google Gemini Setup (Free Tier)
- Go to aistudio.google.com
- Sign in with Google account
- Click "Get API Key" in sidebar
- Create API key in new project
- Copy the key โ
GOOGLE_API_KEY - Free tier: 15 requests/minute, 1M tokens/day
- Google Gemini setup complete
โ๏ธ AWS Setup (Production Cloud)
- Go to aws.amazon.com โ Create Account
- Complete verification (credit card required)
- Set up billing alerts:
- Billing โ Budgets โ Create budget
- Set monthly budget (e.g., $500)
- Create IAM user for Terraform:
- IAM โ Users โ Create user
- Name:
fastband-terraform - Attach policy:
AdministratorAccess(or custom) - Security credentials โ Create access key
- Copy Access Key ID โ
AWS_ACCESS_KEY_ID - Copy Secret Access Key โ
AWS_SECRET_ACCESS_KEY
- Create S3 bucket for Terraform state:
- S3 โ Create bucket:
fastband-terraform-state - Enable versioning
- S3 โ Create bucket:
- Create DynamoDB table for state locking:
- DynamoDB โ Create table:
fastband-terraform-locks - Partition key:
LockID(String)
- DynamoDB โ Create table:
- Store secrets in Secrets Manager:
- Secrets Manager โ Store new secret
- Create secrets for: Anthropic, Supabase, Stripe keys
- AWS setup complete
๐ค Hub Test Accounts
Test user accounts for the Hub application itself.
Admin Account
Test User (Free Tier)
Test User (Pro Tier)
Database Credentials
Hub Configuration
Server Settings
Rate Limits
Memory Settings
Feature Flags
Database Setup
Database Type
Migration Status
- Users table
- Sessions table
- Conversations table
- Messages table
- Memory entries table
- Vector embeddings table
- Usage/billing table
Schema Reference
| Table | Key Columns | Purpose |
|---|---|---|
users |
id, email, tier, created_at | User accounts and subscription tier |
sessions |
id, user_id, status, expires_at | Active user sessions |
conversations |
id, user_id, title, status | Chat conversation containers |
messages |
id, conversation_id, role, content | Individual chat messages |
memory_entries |
id, user_id, content, embedding_id | RAG memory entries |
embeddings |
id, vector, metadata | Vector embeddings for semantic search |
Implementation Roadmap
Phase 1: Core Models โ
Data structures and base classes
Phase 2: Session & Chat Management
Core conversation handling
Phase 3: RAG Memory System
Long-term memory with semantic search
Phase 4: REST API
HTTP endpoints for the Hub
Phase 5: Web UI (React)
Frontend chat interface
Phase 6: Platform Analysis
Codebase understanding & recommendations
Phase 7: Deployment
Docker and production setup
Development Notes
Key Files Reference
| File | Purpose | Status |
|---|---|---|
hub/__init__.py |
Module exports and docstring | Done |
hub/models.py |
Pydantic/dataclass models | Done |
hub/session.py |
Session management | In Progress |
hub/chat.py |
Chat orchestration | In Progress |
hub/memory.py |
RAG memory system | In Progress |
hub/analyzer.py |
Codebase analysis | Pending |
hub/api/ |
REST API routes | Pending |
hub/web/ |
React frontend | Pending |
hub/auth/ |
Authentication | Pending |
hub/Dockerfile |
Docker configuration | Done |
Quick Commands
| Command | Description |
|---|---|
cd src/fastband/hub/web && npm run dev |
Start frontend dev server |
fastband hub serve --port 5051 |
Start Hub API server |
pytest tests/test_hub*.py -v |
Run Hub tests |
docker-compose -f hub/docker-compose.yml up |
Start Hub in Docker |
โ ๏ธ Danger Zone
Reset all configuration data. This cannot be undone.