How mfigurski80/ntpeek works
Main Components Identification
• Query Module (/query)
• Filter Module (/filter)
• Render Module (/render)
• Priority Module (/priority)
• Types Module (/types)
CLI Interface Layer
• Main entry point (main.go)
• Arguments parsing
• Environment configuration
Query Module
• Notion API Client
• Query Builder
• Sort Implementation
Filter Module
• Condition Parser
• Filter Syntax Handler
• Validation Logic
Render Module
• Output Formatters
• Type-specific Renderers
• Global Modifiers
Priority Module
• Priority Management
• Tag Processing
External Systems
• Notion API
• User's Terminal
• Environment Variables
• User Terminal → CLI Interface → Query Module → Notion API
• Notion API → Query Module → Filter Module → Render Module → User Terminal
• How modules depend on the Types module
• Configuration flow from environment variables
• Blue: Core processing modules (Query, Filter, Render)
• Green: External interfaces (CLI, Notion API)
• Yellow: Configuration components (Environment variables)
• Gray: Utility modules (Types)
Specific Elements
A. Process Flows:
Input Flow
• Environment Variables (NOTION_SECRET, NOTION_DEFAULT_DB) → CLI Interface
• User Commands → CLI Interface → Query Builder
Processing Flow
• Query Builder → Notion API Client
• Response → Filter Processing → Priority Assignment → Rendering
B. Component Details (Add as annotations):
Query Module
• Sort implementation
• Query building
• API client handling
Filter Module
• Condition syntax parsing
• Multiple filter combination (AND/OR)
• Type-specific filters
Render Module
• Field type renderers
• Global modifiers
• Priority-based formatting
Notes
Annotations for:
• Supported field types
• Available modifiers
• Filter syntax examples
• Priority configuration options