-
-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
arudaev edited this page Apr 25, 2026
·
3 revisions
Conventions and workflow for contributing to THD Room Finder.
- Fork the repository on GitHub
- Clone your fork:
git clone --recurse-submodules https://github.com/arudaev/THD-Room-Finder.git - Build the project (see Building and Deploying)
- Create a feature branch and start coding
| Prefix | Use case | Example |
|---|---|---|
feature/ |
New features | feature/favorites-screen |
fix/ |
Bug fixes | fix/crash-on-empty-periods |
refactor/ |
Code restructuring | refactor/repository-flow |
- Imperative mood — "Add room list screen", not "Added room list screen"
- Under 72 characters for the subject line
- One logical change per commit — don't mix features with refactors
- Add a blank line and longer body for complex changes
Add room list screen with building filter
Implements the main browse screen. Filtering is client-side to avoid
redundant API calls when switching between buildings.
- Follow the Kotlin coding conventions
- No wildcard imports
- Trailing commas on multi-line parameter lists
- Use
internalvisibility for module-scoped symbols
- Follow the Swift API Design Guidelines
- No force-unwrapping (
!) outside of test code - Prefer
async/awaitover completion handlers
- State hoisting: screens receive state + lambdas, not ViewModels directly
- Use
rememberandderivedStateOfto minimise recomposition
| Kind | Pattern | Example |
|---|---|---|
| Android screen | <Feature>Screen |
HomeScreen |
| Android ViewModel | <Feature>ViewModel |
HomeViewModel |
| Repository interface | <Entity>Repository |
RoomRepository |
| Repository impl | <Entity>RepositoryImpl |
RoomRepositoryImpl |
| Use case | <Action><Entity>UseCase |
GetFreeRoomsUseCase |
| DTO | <Entity>Dto |
PeriodDto |
| DB entity | <Entity>Entity |
RoomEntity |
| Hilt module | <Scope>Module |
NetworkModule |
| iOS View | <Feature>View |
RoomDetailView |
- Respect layer boundaries — UI → Domain ← Data. Domain has no Android or iOS framework imports.
- Don't introduce new dependencies without discussion — the tech stack is intentional and minimal.
-
Error handling — repositories return
Result<T>(Android) orthrows(iOS). Never crash on bad API responses. -
Defensive parsing — DTOs use
ignoreUnknownKeys = trueand nullable fields.
- Write unit tests for ViewModels, use cases, and repositories
- Use fakes over mocks (see
FakeRoomRepositoryin the Android test directory) - Name tests descriptively:
fun `shows error when repository fails`() - Run the full suite before submitting a PR:
./gradlew test lint- Ensure
./gradlew assembleDebug test lintpasses - Keep PRs focused — one logical change per PR
- Write a clear description: what changed and why
- Link any relevant issues
Releases are fully automated. To cut a release:
git tag v1.2.3
git push origin v1.2.3The release workflow builds, signs, and publishes the APK to GitHub Releases, and uploads a beta to TestFlight if Apple credentials are configured. See CI and Delivery for the full pipeline and required secrets.
Start here
Build & Install
Reference
Delivery
Contribute