Contributing¶
Contributions to the Cryptographer project are welcome! This guide outlines how to contribute.
Getting Started¶
-
Fork the Repository: Fork C3EQUALZz/cryptographer.
-
Clone Your Fork:
-
Set Up Development Environment:
- Open project in Android Studio
- Sync Gradle files
- Install git hooks:
./gradlew installGitHooks
Making Changes¶
Create a Branch¶
Follow Coding Standards¶
- Use Spotless for formatting (
./gradlew spotlessApply) - Run Detekt for static analysis (
./gradlew detekt) - Write tests for new functionality (
./gradlew test) - Follow Clean Architecture principles
Commit Messages¶
Use conventional commits:
- Example:
feat: add new encryption algorithm - Types:
feat: New featurefix: Bug fixdocs: Documentation changeschore: Maintenance tasksstyle: Code style changesrefactor: Code refactoringtest: Test additions/changesbuild: Build system changes
Run Pre-Commit Checks¶
If git hooks are installed, they run automatically. To run manually:
Code Quality¶
Before submitting:
-
Format Code:
-
Run Static Analysis:
-
Run Tests:
-
Run All Checks:
Architecture Guidelines¶
Follow Clean Architecture¶
- Domain Layer: Pure business logic, no Android dependencies
- Application Layer: Use cases and orchestration (CQRS)
- Infrastructure Layer: Adapters for external systems
- Presentation Layer: UI components and ViewModels
Use CQRS Pattern¶
- Commands: For write operations
- Queries: For read operations
- Views: DTOs for presentation
Dependency Injection¶
- Use Hilt for dependency injection
- Annotate ViewModels with
@HiltViewModel - Provide services as singletons when appropriate
Submitting Changes¶
Push Changes¶
Create a Merge Request¶
- Target the
mainordevelopbranch - Describe the changes clearly
- Reference any related issues
- Ensure all CI checks pass
CI Checks¶
The merge request will trigger GitLab CI to run:
- Code formatting check (Spotless)
- Static analysis (Detekt)
- Unit tests
- Build verification
Ensure all checks pass before requesting review.
Code Review¶
- Respond to feedback promptly
- Make necessary changes and push updates to the same branch
- Keep commits focused and atomic
- Squash commits if requested
Reporting Issues¶
Report bugs or suggest features via:
- GitLab Issues: Create an issue
- Include:
- Clear description
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Environment details (Android version, device, etc.)
Feature Requests¶
When proposing new features:
- Check if the feature aligns with project goals
- Describe the use case
- Consider architecture impact
- Propose implementation approach
Questions?¶
- Author: Danil Kovalev (GitHub)
- Check Documentation for more information
Thank you for contributing! 🎉