How rcy/annie works
Main Components
a. Core Bot Engine
• To IRC handling component (bot/irc.go)
• Event system (events/events.go)
b. Handler System
• Handlers into categories:
• Utility (weather, time, seen)
• Entertainment (mlb, worldcup, epigram)
• Reminder System (remindme)
• Link Management (linkpool, anonlink)
• AI Integration (internal/ai)
c. Database Layer
• PostgreSQL database connection (db/db.go)
• Models and queries (db/model)
• Data flow for notes, reminders, and other persistent data
d. Web Interface
• Web server component (web/server.go)
• Template rendering system
• Authentication flow
e. External Services Integration
• Weather API integration
• MLB data integration
• Image generation service (image/runpod.go)
• AI completion service (internal/ai/complete.go)
Relationship Flows
• Command flow from IRC to handlers
• Data flow between handlers and database
• External API calls
• Web interface interactions
• Event propagation paths
Technical Details
a. Infrastructure Layer:
• Docker container boundary (Dockerfile)
• Deployment flow (.github/workflows)
• Configuration management (.env files)
b. Data Stores:
• PostgreSQL database
• Cache systems (handlers/day/cache.go)
• File-based storage (epigrams, weather testdata)
Specific Implementation Notes
Create subsections for:
• Command processing pipeline
• Event handling system
• Database schema overview
• Authentication flow
• External API integration points