How cpavel/zack works
Main System Components
a) Web Layer:
• Nginx (reverse proxy)
• Django Web Server
• UI Components (Tailwind CSS)
b) Application Core:
• Django Apps:
• Campaigns
• Data
• Leads
• UI
c) Background Processing:
• Celery Worker
• Redis (message broker)
d) External Services:
• OpenAI API
• HackerNews Algolia API
e) Data Store:
• PostgreSQL Database
Component Relationships
a) Client Flow:
• External Client → Nginx → Django Server
• Static Files: Nginx → Static Files Directory
b) Data Flow:
• Django → PostgreSQL (bidirectional)
• Django → Celery → Redis (task queue)
• Celery → External APIs (OpenAI, HN Algolia)
Architectural Patterns to Highlight
a) Service Architecture:
• Clear separation between web server and worker processes
• API-based communication between components
• Asynchronous task processing
b) Data Processing Pipeline:
• Search term processing
• Template selection
• AI evaluation flow
• Lead generation process
Specific Implementation Details
Key elements:
a) Django Apps Structure:
• Campaigns: Campaign management and orchestration
• Data: Search terms, prompt templates, evaluation templates
• Leads: Lead management and processing
• UI: Frontend interface
b) Processing Flow:
Data Storage Layer (Bottom)
Each component should include:
• Component name
• Primary function
• Key configurations
• Critical dependencies