๐Ÿ”

Fastband Hub Dev Guide

Enter your password to access the development configuration

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

Quick Links

Edit Quick Links

AI Provider Configuration

Pending

Configure API keys for the AI providers the Hub will use for chat completions.

๐ŸŸฃ Claude (Anthropic)

Primary provider for code understanding

Pending

๐ŸŸข OpenAI (GPT-4)

Alternative provider

Pending

๐Ÿ”ต Google Gemini

Multi-modal support

Pending

๐ŸŸ  Ollama (Local)

Self-hosted LLMs

Pending

Claude (Anthropic)

OpenAI

Google Gemini

Ollama (Local)

External Services

Pending

Configure 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:

  1. AI Provider: Gemini (free tier) or Ollama (local)
  2. Embeddings: Gemini embeddings (free) or Ollama nomic-embed
  3. Auth: Supabase free tier (50K monthly users)
  4. Hosting: Local Docker or Railway free tier
  5. 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
Terraform Commands:
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

Incomplete

Store 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 Email 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)
  1. Go to supabase.com and sign up
  2. Click "New Project" โ†’ choose organization
  3. Enter project name: fastband-hub
  4. Set a strong database password (save it!)
  5. Choose region closest to your users
  6. Wait for project to provision (~2 min)
  7. Go to Settings โ†’ API:
    • Copy "Project URL" โ†’ SUPABASE_URL
    • Copy "anon public" key โ†’ SUPABASE_KEY
    • Copy "JWT Secret" โ†’ SUPABASE_JWT_SECRET
  8. Go to Authentication โ†’ Providers โ†’ enable Email
  9. Optional: Enable Google/GitHub OAuth
  • Supabase setup complete
๐Ÿ’ณ Stripe Setup (Payments)
  1. Go to stripe.com and create account
  2. Complete business verification (can skip for test mode)
  3. Go to Developers โ†’ API Keys:
    • Copy "Publishable key" โ†’ STRIPE_PUBLISHABLE_KEY
    • Copy "Secret key" โ†’ STRIPE_SECRET_KEY
  4. Create Products:
    • Products โ†’ Add Product โ†’ "Fastband Hub Pro"
    • Add pricing: $29/month (or your price)
    • Copy the Price ID โ†’ STRIPE_PRO_PRICE_ID
  5. 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
  1. Go to console.anthropic.com
  2. Sign up / Log in
  3. Add payment method (Settings โ†’ Billing)
  4. Go to API Keys โ†’ Create Key
  5. Name it: fastband-hub-production
  6. Copy the key โ†’ ANTHROPIC_API_KEY
  7. Set usage limits if desired
  • Anthropic setup complete
๐Ÿง  OpenAI Setup
  1. Go to platform.openai.com
  2. Sign up / Log in
  3. Add payment method (Settings โ†’ Billing)
  4. Go to API Keys โ†’ Create new secret key
  5. Name it: fastband-hub
  6. Copy the key โ†’ OPENAI_API_KEY
  7. Set usage limits (Settings โ†’ Limits)
  • OpenAI setup complete
โœจ Google Gemini Setup (Free Tier)
  1. Go to aistudio.google.com
  2. Sign in with Google account
  3. Click "Get API Key" in sidebar
  4. Create API key in new project
  5. Copy the key โ†’ GOOGLE_API_KEY
  6. Free tier: 15 requests/minute, 1M tokens/day
  • Google Gemini setup complete
โ˜๏ธ AWS Setup (Production Cloud)
  1. Go to aws.amazon.com โ†’ Create Account
  2. Complete verification (credit card required)
  3. Set up billing alerts:
    • Billing โ†’ Budgets โ†’ Create budget
    • Set monthly budget (e.g., $500)
  4. 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
  5. Create S3 bucket for Terraform state:
    • S3 โ†’ Create bucket: fastband-terraform-state
    • Enable versioning
  6. Create DynamoDB table for state locking:
    • DynamoDB โ†’ Create table: fastband-terraform-locks
    • Partition key: LockID (String)
  7. 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

โœ… HubSession, SessionConfig models
โœ… ChatMessage, Conversation models
โœ… MemoryEntry, MemoryContext models
โœ… SubscriptionTier, TierLimits models

Phase 2: Session & Chat Management

Core conversation handling

SessionManager implementation
ChatManager with tool execution
ToolExecutor with timeouts
MessagePipeline orchestration

Phase 3: RAG Memory System

Long-term memory with semantic search

Embedding generation
Vector store integration
Semantic retrieval
Context injection into prompts

Phase 4: REST API

HTTP endpoints for the Hub

Auth endpoints (login, register, logout)
Chat endpoints (send, stream, history)
Conversation management endpoints
SSE streaming endpoint

Phase 5: Web UI (React)

Frontend chat interface

Vite + React + Tailwind setup
Chat UI components
SSE streaming integration
Auth pages (login, register)
Conversation history sidebar

Phase 6: Platform Analysis

Codebase understanding & recommendations

PlatformAnalyzer implementation
Project type detection
MCP workflow recommendations

Phase 7: Deployment

Docker and production setup

Dockerfile
Docker Compose config
Environment configuration
Health check endpoints

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.