Getting started
Thank you for your interest in contributing to ReUCM! This guide will help you understand the development workflow and contribution process. Before contributing, make sure you have completed the development environment setup.Code style
ReUCM follows standard Dart and Flutter conventions:- Use
flutter_lintspackage rules (configured inanalysis_options.yaml) - Follow Dart style guide naming conventions
- Use meaningful variable and function names
- Write clear commit messages that explain the “why” behind changes
Analysis options
The project uses strict linting rules across all workspace packages. Run the analyzer before submitting:Development workflow
Make your changes
Implement your feature or bug fix. Remember to:
- Run code generation after modifying models or stores
- Test your changes on target platforms
- Follow the existing code style and patterns
Project architecture
Modular structure
ReUCM uses a modular architecture to support multiple book resources. The core interfaces and models are inre_ucm_core, while each resource (like Author.Today) is implemented as a separate module.
Core package (re_ucm_core)
Contains:
Portalinterface - Main interface for resource modules- Shared models and data structures
- Common UI components
- Logging utilities
Portal modules
Each supported resource is implemented as a portal module (e.g.,re_ucm_author_today). Portal modules are independent packages that implement the Portal interface.
State management
The project uses MobX for state management:- Store classes are defined with
@storeannotation - Observable state with
@observable - Actions with
@action - Computed values with
@computed
Adding a new portal module
To add support for a new book resource:Create the portal package
Create a new package in the workspace:Add it to the workspace in the root
pubspec.yaml:Implement the Portal interface
Create a class that implements the
Portal interface from re_ucm_core/lib/models/portal/portal.dart.The Portal interface defines:- Resource identification (name, logo, URL patterns)
- Authentication handling
- Book metadata retrieval
- Book content downloading
- Format conversion
Register the portal
Register your portal module in
re_ucm_app/lib/core/di.dart.This makes the portal available to the main application.Refer to
re_ucm_author_today as a reference implementation when creating a new portal module.Dependencies
Key dependencies
- mobx / flutter_mobx - State management
- go_router - Navigation
- sembast - Local database
- dio - HTTP client
- flutter_inappwebview - In-app browser for authentication
- xml - XML parsing for fb2 format
Adding dependencies
When adding new dependencies:- Add to the appropriate package’s
pubspec.yaml - Use
resolution: workspacefor workspace packages - Run
fvm flutter pub getfrom the root
Dependency overrides
The rootpubspec.yaml includes a dependency override for flutter_inappwebview:
Building for production
Android
Build split APKs for different CPU architectures:Windows
Build Windows executable:Code generation details
Build configuration
The project uses custom build configuration inbuild.yaml:
- Generated files are placed in
.gendirectories - Custom changelog builder generates code from
CHANGELOG.md - MobX and JSON serialization code generation
Running build_runner
One-time generation:Questions or issues?
If you have questions or encounter issues:- Check existing issues on GitHub
- Review the
re_ucm_coredocumentation for API details - Look at
re_ucm_author_todayas a reference implementation - Open a new issue with detailed information about your problem