Thank you for your interest in contributing to Cardinal Maps! We would love your help. Here are some tips and guidelines for how to get started. If your quesiton isn't answered here please feel free to open an issue.
First things first, the Cardinal project adheres to the Rust Code of Conduct. You are expected to uphold these values while participating. Please report unacceptable behavior to the lead maintainer.
- Use the GitHub issue tracker to report bugs or suggest features
- Before creating a new issue, try to search existing issues to avoid duplicates
- Include as much relevant information as possible in your report:
- Steps to reproduce the issue
- Expected vs actual behavior
- Screenshots if applicable
- Device and OS information for Android issues
- Fork the repository and create your branch from
main - Do your best to add some tests (at press time this is mostly aspirational)
- Ensure your test suite passes
- Make sure your code follows the existing style for whichever component(s) you're modifying
- Update documentation as needed
- Submit your pull request with a clear description of your changes
The Android app is built with Kotlin and follows modern Android development practices.
- Use meaningful variable and function names
- Keep functions small and focused when you can
- Prefer immutable data structures where possible
- Follow MVVM (Model-View-ViewModel) architecture pattern
- Use dependency injection with Hilt
- Separate UI logic from business logic
- Follow Material 3 guidelines for components, typography, and color schemes
- Maintain consistency in UI patterns throughout the app
- Prioritize accessibility and usability for all users
- Aim for a clean, minimalist aesthetic
- Use Android Compose for all UI components
- Use Material 3 components and themes where possible
- Try to implement adaptive layouts that work across different screen sizes (currently aspirational)
- Follow the existing color scheme and typography defined in the theme
cd cardinal-android
./gradlew assembleDebugThe offline geocoder is written in Rust and changes to it should follow Rust best practices.
- Use
rustfmtfor code formatting - Use
clippyfor linting - Write idiomatic Rust code whenever possible
- We use UniFFI to expose rust code to Kotlin (and in the future, Swift) which imposes some limits
- Respect user privacy in all code changes
- Avoid mistakes that could leak user data to online services without knowledge or consent (consent entails knowledge)
If you need help with your contribution, feel free to:
- Ask questions in the PR comments
- Open an issue for discussion about larger changes
- Contact the maintainers directly
Unlike quite a few projects, we do accept contributions created with generative AI tooling with some very important caveats:
- You must fully review all AI-generated code before submission (this should be obvious, and yet...)
- Contributors are themselves responsible for the quality and correctness of all code, including AI-generated code they submit
- Core business logic should not be "vibe-coded"—you may use AI for boilerplate, code review or idea generation, but not for making intricate changes to core functionality that you don't fully understand
Please see our full Generative AI Policy for more details. Do not abuse this policy.