How petercat-ai/petercat works
Main Components Identification
a) Frontend Layer:
• Client (Next.js web application)
• Assistant (React component library)
• Extension (Browser extension)
b) Backend Layer:
• Server (FastAPI application)
• Agent System
• RAG (Retrieval-Augmented Generation) System
c) External Services:
• AWS Services (Lambda, S3, SQS, CloudFront)
• Supabase (Database)
• Auth0 (Authentication)
• LLM Services (OpenAI, Gemini)
• GitHub API
┌─ Client Zone ─────────────┐ ┌─ External Services ─┐
• Web Client │ │ - Auth0 │
• Assistant Component │ │ - GitHub │
• Browser Extension │ │ - LLM Providers │
• ┘ └──────────────────────┘
• ↕ ↕
┌─ Server Zone ──────────────────────────────────────┐
• ┌─ API Layer ─────────┐ ┌─ Agent System ────────┐ │
• FastAPI │ │ - Bot Builder │ │
• Auth Middleware │ │ - QA Chat │ │
• Rate Limiting │ │ - Knowledge Base │ │
• ┘ └────────────────────┘ │
• ┌─ Infrastructure ────────────────────────────────┐│
• AWS Lambda/S3/SQS ││
• Supabase Database ││
• ┘ │
• ┘
Connection Types
Different types of connections with distinct line styles:
• Double lines: Authentication flow
Key Features to Highlight
• Bot Creation Workflow
• Knowledge Base Construction
• Multi-platform Integration
• Authentication Flow
• Task Queue System
• RAG Pipeline
Additional Elements
Supporting elements:
• Version information
• Security boundaries
• Scaling components
• Data flow direction indicators
Implementation Details
• How the bot creation process flows from user input through the agent system
• Knowledge base construction pipeline (load -> split -> embed -> store)
• Integration points with GitHub (Apps, API)
• Authentication flow with Auth0
• Task distribution through AWS SQS
• Storage management with S3 and Supabase
Documentation
Annotations for:
• Environment configurations
• Service dependencies
• Scaling considerations
• Security measures
• Integration points