How binary-ho/bandicute-server works
Main Components
a. External Services Layer:
• Tistory Blog API (for blog post collection)
• GitHub API (for PR creation)
• OpenAI GPT API (for summarization)
• Supabase (PostgreSQL database)
b. Core Application Components:
• API Server (Echo Framework)
• Job Scheduler
• Service Layer
• Storage Layer
Component Organization
┌─ External Services ─────────────────────┐
• Tistory API │ GitHub API │ OpenAI API │
• ┘
• ↕️
┌─ Application Layer ────────────────────┐
• ┌─ API Layer (Echo) ─┐ │
• Routes │ │
• Handlers │ │
• ┘ │
• ┌─ Service Layer ──────┐ │
• Channel Service │ │
• Parser Service │ │
• Summarizer Service │ │
• Writer Service │ │
• ┘ │
• ┌─ Job Scheduler ──────┐ │
• Write All Jobs │ │
• ┘ │
• ┘
• ↕️
┌─ Storage Layer ──────────────────────┐
• ┌─ Repository Layer ─┐ │
• Member │ │
• Post │ │
• Study │ │
• Pull Request │ │
• Summary │ │
• ┘ │
• ┘
• ↕️
┌─ Database ────────────────────────────┐
• Supabase │
• ┘
Key Interactions to Highlight
a. Blog Post Collection Flow:
• Job Scheduler → Tistory API
• Parser Service → Storage Layer
• Storage Layer → Supabase
b. Summarization Flow:
• Service Layer → OpenAI GPT API
• Summarizer Service → Storage Layer
c. GitHub Integration Flow:
• Writer Service → GitHub API
• Pull Request Service → Storage Layer
Additional Elements
┌─ Template System ─────────────┐
• Pull Request Templates │
• Summary Prompt Templates │
• ┘
Important Notes
• Clear separation between internal and external services
• Job scheduler's role in automation
• Repository pattern in the storage layer
• Error handling and retry flows
• Configuration management flow