How idvorkin/vapi-call-viewer works
Key Components to Include:
Core Application Components
• Data Models component (from models.py)
• Cache System component (from cache.py)
External Dependencies
• Textual Framework (for TUI)
• SQLite Database (for caching)
• Python Standard Library components
• [User] ←→ [TUI Interface Layer] ←→ [Application Core] ←→ [Cache Layer] ←→ [SQLite DB]
Component Details
a. TUI Interface Layer (calls.py):
• Subcomponents:
• Key Bindings Handler
• View Controllers
• Formatters (phone numbers, UTC conversion)
b. Application Core:
• Include:
• Data Models (models.py)
• Business Logic
• Call Cost Tracking
c. Cache Layer (cache.py):
• Cache Management
• Data Persistence
• Query Interface
• User Input → TUI Interface
• TUI Interface ↔ Application Core
• Application Core ↔ Cache Layer
• Cache Layer ↔ SQLite Database
Additional Elements
• Version requirements (Python 3.12+)
Special Considerations:
Local-first architecture
• Temporary file location for the SQLite DB
• Cache invalidation flow
Type System
• Pydantic model integration
• Strict typing boundaries
Testing Coverage
• Test coverage indicators
• Test file relationships (test_cache.py, test_calls.py)
Level of Detail:
• TUI Component Structure
• Cache Implementation
• Data Model Relationships
• Clear component boundaries
• Nested components
• Text annotations
Recommended Tools:
• PlantUML
Remember to:
• Version numbers for major dependencies
• Development workflow
• Test coverage boundaries
• Async operations if present
• Error handling flows
• How user interactions flow through the system
• Where data is stored and cached
• How the type system ensures data integrity
• The testing boundaries and coverage
• The overall architecture patterns used