Contributing
Omnigram welcomes contributions! The project has two main components: a Go backend server and a Flutter client app.
Repository Structure
omnigram/├── server/ # Go backend (Gin + GORM)├── app/ # Flutter client (forked from Anx Reader, MIT)├── site/ # Website and docs (Astro + Starlight)├── docs/ # Design documents and API specs└── Makefile # Root-level build orchestrationDevelopment Setup
Server (Go)
Requirements: Go 1.23+
cd servermake # Build server binarymake docker # Build Docker imageThe server uses Gin for HTTP routing, GORM for database access, and BadgerDB for key-value storage. Entry point is at server/cmd/omni-server/.
App (Flutter)
Requirements: Flutter 3.41+, Dart 3.11+
cd appflutter pub get # Install dependenciesflutter gen-l10n # Generate localizationsdart run build_runner build --delete-conflicting-outputs # Code generationflutter analyze lib/ # Static analysisflutter build apk --split-per-abi # Build Android APKOr use the root Makefile shortcuts:
make app-deps # flutter pub getmake app-codegen # l10n + build_runnermake app-analyze # flutter analyzemake app-build-apk # Build APKThe app uses Riverpod v2 for state management with code generation. Models use freezed and json_serializable.
Website
Requirements: Node.js 18+
cd sitenpm installnpm run dev # Local dev servernpm run build # Production buildCode Conventions
- Language: Code in English; comments and docs may use Chinese
- Code generation: Run codegen after modifying providers, models, or localization files
- Formatting: Use standard formatters (
gofmtfor Go,dart formatfor Dart) - Linting: Run
flutter analyze lib/before submitting app changes
Pull Request Process
- Fork the repository and create a feature branch
- Make your changes with clear, descriptive commits
- Ensure the project builds and passes analysis:
- Server:
cd server && make - App:
make app-analyze
- Server:
- Open a pull request against
main - Describe what your PR does and why
Versioning
Git tags (v*.*.*) trigger CI release pipelines:
- Server: Docker images are built for
arm64andamd64 - App: Android APK is built and signed automatically
License
- Server: MIT
- App: MIT (forked from Anx Reader)