add .mdc file

This commit is contained in:
sanjeed5
2025-02-17 17:50:15 +05:30
parent 2087f9d628
commit 71ac7fc7cc
879 changed files with 7725 additions and 0 deletions
@@ -0,0 +1,33 @@
---
description: Recommends a flexible project structure for Android applications, adapting to existing project organization.
globs: app/**/*
---
- Note: This is a reference structure. Adapt to the project's existing organization
- Project Structure:
app/
src/
main/
java/com/package/
data/
repository/
datasource/
models/
domain/
usecases/
models/
repository/
presentation/
screens/
components/
theme/
viewmodels/
di/
utils/
res/
values/
drawable/
mipmap/
test/
androidTest/
@@ -0,0 +1,12 @@
---
description: Applies general best practices for Android Jetpack Compose development within the main application code.
globs: app/src/main/java/com/package/**/*.kt
---
- Adapt to existing project architecture while maintaining clean code principles.
- Follow Material Design 3 guidelines and components.
- Implement clean architecture with domain, data, and presentation layers.
- Use Kotlin coroutines and Flow for asynchronous operations.
- Implement dependency injection using Hilt.
- Follow unidirectional data flow with ViewModel and UI State.
- Use Compose navigation for screen management.
- Implement proper state hoisting and composition.
@@ -0,0 +1,11 @@
---
description: Outlines performance optimization guidelines for Android Jetpack Compose applications.
globs: app/src/main/java/com/package/**/*.kt
---
- Minimize recomposition using proper keys.
- Use proper lazy loading with LazyColumn and LazyRow.
- Implement efficient image loading.
- Use proper state management to prevent unnecessary updates.
- Follow proper lifecycle awareness.
- Implement proper memory management.
- Use proper background processing.
@@ -0,0 +1,9 @@
---
description: Defines testing guidelines for Android Jetpack Compose components, ViewModels, and UseCases.
globs: app/src/test/java/com/package/**/*.kt
---
- Write unit tests for ViewModels and UseCases.
- Implement UI tests using Compose testing framework.
- Use fake repositories for testing.
- Implement proper test coverage.
- Use proper testing coroutine dispatchers.
@@ -0,0 +1,14 @@
---
description: Enforces specific UI-related guidelines for Jetpack Compose within the presentation layer.
globs: app/src/main/java/com/package/presentation/**/*.kt
---
- Use remember and derivedStateOf appropriately.
- Implement proper recomposition optimization.
- Use proper Compose modifiers ordering.
- Follow composable function naming conventions.
- Implement proper preview annotations.
- Use proper state management with MutableState.
- Implement proper error handling and loading states.
- Use proper theming with MaterialTheme.
- Follow accessibility guidelines.
- Implement proper animation patterns.