This repository is a single-module Android app in app/. Kotlin source lives under app/src/main/java/com/example/lcsc_android_erp, organized by layer and feature:
feature/: Compose screens and view models forhome,inbound,inventory,search, andsettingscore/: app container, Room database, DataStore, network, and shared UI helpersdata/: repository implementations, backup/export, image persistence, and remote data sourcesdomain/: repository interfaces and app modelsui/: app shell and theme
Resources are in app/src/main/res. Room schemas are exported to app/schemas. Design and planning notes live in docs/. Crash logs are stored in log/.
Use the Gradle wrapper from the repo root:
./gradlew :app:compileDebugKotlin— fast compile check for Kotlin/Compose changes./gradlew :app:assembleDebug— build a debug APK./gradlew :app:testDebugUnitTest— run local unit tests./gradlew :app:connectedDebugAndroidTest— run instrumentation/UI tests on a device or emulator
For local Android Studio work, open the root project and run the app configuration.
- Follow Kotlin defaults: 4-space indentation, no tabs, concise functions, and expression-style code when readable
- Keep feature UI in
feature/<name>/, business/data code indata/ordomain/ - Name screens and dialogs with
...Screen,...Dialog,...Route - Name view models
...ViewModel, UI state models...UiState, and shared Compose cards...Card - Reuse existing shared components such as
MaterialInboundDialogandcore/ui/MaterialListCardbefore adding new UI variants
Current test roots:
app/src/test/for local JVM testsapp/src/androidTest/for instrumentation tests
Prefer adding unit tests for parsers, sort rules, BOM matching, and repository logic. Name tests after the behavior being verified, for example matches resistor BOM rows by value.
Git history is not available in this workspace, so use a simple imperative style:
inventory: fix location detail image loadingsearch: refresh BOM match after direct inbound
PRs should include:
- a short summary of user-visible changes
- affected screens or flows
- screenshots for Compose UI changes
- verification notes, such as
./gradlew :app:compileDebugKotlin
This app uses Jetpack Compose + Room + DataStore + Retrofit/Jsoup. Preserve the existing flow: UI -> ViewModel -> Repository -> Room/network. Keep persisted schema changes compatible and update app/schemas when Room entities change.