How jiangtian616/jhentai works
Main System Components
The system should be divided into these major components:
a. Presentation Layer:
• Pages Module (lib/src/pages/)
• Widgets Module (lib/src/widget/)
• Layout Variants (Mobile, Tablet, Desktop)
b. Business Logic Layer:
• Services Module (lib/src/service/)
• State Management (using GetX)
• Settings Management (lib/src/setting/)
c. Data Layer:
• Database Module (lib/src/database/)
• Network Module (lib/src/network/)
• Local Storage
d. Core Components:
• Models (lib/src/model/)
• Utils (lib/src/utils/)
• Configuration (lib/src/config/)
Component Relationships
a. Data Flow:
UI Layer → Business Logic → Data Layer
• ↑ ↓
• Data Flow ───┘
b. Service Dependencies:
Services ←→ Network Module
• ↓
Database Module
• ↓
Local Storage
Specific Implementation Details
Key architectural elements:
a. Cross-Platform Support:
• Platform-specific implementations (Android, iOS, Windows, MacOS, Linux)
• Shared core logic
b. Feature Modules:
Gallery Management
• ↓
Download System
• ↓
Reading System
• ↓
Search & Filter
Technical Stack Highlights
Technologies:
• Flutter (UI Framework)
• GetX (State Management)
• Dio (Network Operations)
• Drift (Local Database)
• ExtendedImage (Image Handling)
Design Patterns
Following patterns:
• MVC/MVVM Architecture
• Service Locator Pattern (via GetX)
• Repository Pattern (for data handling)
• Factory Pattern (for platform-specific implementations)
Use these visual elements:
• Blue: UI Components
• Green: Business Logic
• Yellow: Data Layer
• Red: External Services
• Gray: Utilities & Helpers
Key Interactions
Flows:
User Input → Page Logic → Service Layer → Repository
• ↓ ↓ ↓
• State Mgmt → Network/DB → Local Storage