How codexu/note-gen works
Main System Components
The system architecture should be divided into these major components:
a) Frontend Layer (Next.js Application)
• Core Features Module (/src/app/core)
• UI Components (/src/components)
• State Management (/src/stores)
• Configuration (/src/config)
• Database Interface (/src/db)
• Utility Services (/src/lib)
b) Backend Layer (Tauri)
• Native Features (src-tauri/src)
• Screenshot Module (src-tauri/src/screenshot.rs)
• System Integration
c) External Services
• AI Models Integration
• GitHub Integration (sync & image hosting)
• OCR Services
Component Relationships
[Frontend Layer]
• ↑↓
[Tauri Bridge]
• ↑↓
[Backend Layer] ←→ [System Resources]
• ↑
• ↓
[External Services]
Detailed Component Breakdown
Core Features should be represented as separate modules:
• Record Management
• Article Management
• Image Processing
• Search Functionality
• Settings Management
• Chat/AI Integration
Data Flow
Following key data flows:
• User Input → Frontend → Backend → Storage
• Image Capture → OCR → AI Processing → Note Generation
• Content Sync → GitHub Repository
• AI Interactions → Model APIs → UI
Key Architectural Patterns to Highlight
• Event-driven architecture (src/config/emitters.ts)
• Store-based state management (src/stores)
• Module-based feature organization
• Service-based external integrations (src/lib)
Important Technical Details
Technical aspects:
• Next.js 15 frontend framework
• Tauri 2 native runtime
• Local storage system
• AI model integration points
• GitHub sync mechanism
• Image processing pipeline
This architecture should emphasize the application's three main pillars as mentioned in the README: