This document provides essential guidelines and context for AI agents interacting with the MarkDay Diary App project.
- Type: Compose Multiplatform Diary Application.
- Goal: Develop and maintain a cross-platform diary app for Android, Desktop (JVM), and Web (JS/Wasm). (iOS development is suspended)
- Primary Language: Kotlin.
- UI Framework: Jetpack Compose Multiplatform.
- Build System: Gradle.
composeApp/: Core Kotlin Multiplatform module.composeApp/src/commonMain/kotlin/: Shared logic, UI, models, and interfaces. Focus here for core feature development.composeApp/src/androidMain/: Android-specific implementations.composeApp/src/iosMain/: iOS-specific implementations.composeApp/src/jvmMain/: Desktop-specific implementations.composeApp/src/wasmJsMain/: WebAssembly-specific implementations (Web target).composeApp/src/nonWebMain/: Shared logic for non-web platforms (Android, iOS, Desktop).composeApp/src/commonMain/composeResources/: Shared assets (drawables, strings).
iosApp/: Xcode project for iOS native app. Interacts withcomposeAppas a framework. (Suspended)
When modifying or generating code, adhere to the following:
- Language: Kotlin.
- Conventions: Follow official Kotlin Coding Conventions.
- Indentation: 4 spaces.
- Line Length: Max 120 characters (soft limit).
- Naming:
PascalCasefor classes/objects,camelCasefor functions/properties,SCREAMING_SNAKE_CASEfor constants.
- Documentation:
- KDoc: All public classes, functions, and properties must have KDoc comments.
- Expressiveness: KDoc should clearly explain purpose, parameters, and return values.
- Automated Checks:
- Run
ktlintCheckto verify formatting. - Run
detektfor static analysis and code smells. - Action: Automatically fix
ktlintissues if possible (./gradlew ktlintFormat). Reportdetektfindings.
- Run
- Framework: Jetpack Compose Multiplatform.
- Design System: Material Design 3.
- Prioritize
androidx.compose.material3components. - Ensure consistency in color, typography, and shape.
- Design for adaptability across various screen sizes and platforms.
- Prioritize
- Build Tool: Gradle.
- Common Commands:
- Android:
./gradlew installDebug(Run on connected device/emulator) - Desktop:
./gradlew run(Run desktop application) - Desktop (Jar):
./gradlew composeApp:jvmJar(Build a jar file) - Web (Wasm):
./gradlew wasmJsBrowserRun(Run in browser) - iOS: (Suspended) Open
iosApp/iosApp.xcodeprojin Xcode and run. - Tests:
./gradlew check(Run all checks) or./gradlew allTests(Run all tests)
- Android: