Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
1. Code Style

* Code follows general Kotlin code style recommendations.
* Use Android Jetpack ViewModel for managing UI-related data and use viewModelScope for coroutines.
* Use LiveData for observing and updating UI state. Use Custom event wrappers `LiveDataEventWithContent` to handle one-time events.
* Use delegates like `FragmentViewBindingDelegate` to simplify view binding in fragments.

2. Architecture Layers:

* Feature Modules: Manages UI components and ViewModels as well as UI-dependant features. Implemented in `:feature` subfolder.
Comment thread
luhmirin-s marked this conversation as resolved.
Comment thread
luhmirin-s marked this conversation as resolved.
* Infra Modules: Contains use cases and core business logic. Implemented in `:infra` subfolder.
Comment thread
luhmirin-s marked this conversation as resolved.
* Modality Modules: Contain business subsets of feature and infra modules related to a specific biometric modality. Implemented in `:face`
and `:fingerprint` subfolder.
* Each layer is isolated. Feature modules depend on other features and infra modules, infra modules only depend on other infra modules.
Comment thread
luhmirin-s marked this conversation as resolved.

3. Dependency Injection:

* Use Dagger Hilt for dependency injection with the `@Inject` constructor as the preferred method of injection.
* Use Singleton scope (`@Singleton`) for critical dependencies.
* ViewModels are injected using Hilt (`@HiltViewModel`).

4. Unit testing rules:

Comment thread
meladRaouf marked this conversation as resolved.
* Use JUnit 4 for unit testing, MockK for mocking, Google Truth for assertions, AndroidX Test for Android-specific testing.
* Test classes use the `*Test` suffix. Test methods use descriptive names with backticks.
* Setup logic is in `@Before` methods. Tests use `@RunWith(AndroidJUnit4::class)` where appropriate. Coroutine tests use `runTest { ... }`.
* Use Given-When-Then structure. Keep tests concise and focused. Use relaxed mocks to reduce boilerplate.
* Use helper methods for mock objects or test data.
* Use lifecycle-aware and coroutine testing where appropriate.
* Isolate Android framework dependencies unless required.
2 changes: 0 additions & 2 deletions infra/orchestrator-data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ dependencies {
implementation(project(":infra:config-store"))
implementation(project(":infra:events"))

implementation(project(":feature:exit-form"))

implementation(libs.jackson.core)
}
Comment thread
luhmirin-s marked this conversation as resolved.