MiraiLink is an Android dating/social app built with Kotlin and Jetpack Compose. It features real-time chat via Socket.IO, user matching, profile management, and more, following a Clean Architecture pattern.
Architecture: Clean Architecture (Data/Domain/UI layers)
Package: com.feryaeljustice.mirailink
As an AI assistant, your primary role is to understand the project's structure and assist in development tasks. Your actions should be guided by the user's requests and conform to the project's established patterns.
- Understand the architecture: The project follows Clean Architecture. Before making changes, identify whether your task belongs to the
data,domain, oruilayer. - Consult existing files: To understand the implementation details of a specific component or screen, analyze the relevant files.
- Search for patterns: Look for examples of how similar features are implemented across the codebase.
- Targeted modifications: When asked to modify a file, apply the changes precisely as requested. Always confirm the file path and the exact changes required.
- Follow code style: Adhere to the existing Kotlin and Jetpack Compose conventions. Use Koin for dependency injection and follow the Atomic Design pattern for UI components.
- Create new features: When adding a new feature, follow the steps outlined in the "Common Tasks" section. Create files in the appropriate directories and follow the established data flow.
- Build and test: After making changes, run builds and tests to validate them. Start with local unit tests before moving to full builds.
- Analyze results: If a build or test fails, carefully analyze the output to identify the cause. Inspect the problematic code and apply corrections.
- Iterate: Continue this cycle of building, testing, and fixing until all validations pass.
- Run unit tests:
testDebugUnitTest - Run instrumented tests:
connectedDebugAndroidTest - Run lint checks:
lintDebug - Build a debug version:
assembleDebug
- UI (
screens): Triggers actions in the ViewModel (uses Navigation 3). - ViewModel: Calls a
usecasefrom thedomainlayer. - UseCase: Orchestrates one or more
repositorycalls. - Repository (
datalayer): Fetches data from adatasource(remote or local). - Data Flow Back: Data is mapped and flows back to the UI to be displayed.
- Store sensitive data in the encrypted DataStore.
- Use the
AuthInterceptorfor network requests. - Validate user input in both ViewModels and UseCases.
- Domain: Create models in
domain/model/and define repository interfaces indomain/repository/. - UseCase: Create a use case in
domain/usecase/. - Data: Implement the repository in
data/repository/and add API services indata/remote/if needed. - UI: Build UI components in
ui/components/and the screen with its ViewModel inui/screens/. - Navigation: Wire up the new screen in
ui/navigation/.