You are building a Kotlin Android time tracking app. The Goal is to communicate with a external Server via REST api.
- Use MVVM
- Use Retrofit for API calls
- Use Coroutines for async operations
- Always create or modify real files in the project directory
- Never use absolute paths
- Prefer incremental changes
- After each feature, ensure app builds
- After implementing a feature and successful build commit ALL changes with git add . and git commit
- Use Retrofit interfaces
- Centralize API client in one file
The OpenAPI specification is located at:
/docs/openapi.json
All Responses are wrapped in a {"payload": T} response with T being the Object from API docs
When implementing API calls:
- Always read this file first
- Do not guess endpoints or payloads
- Extract request/response schemas from the spec
- Generate strongly typed models from it
- Plan before coding
- Implement feature in small steps
- Verify structure consistency
After every code change:
-
Run the project build command:
- For Android:
./gradlew build
- For Android:
-
If there are compilation errors:
- Read full error output carefully
- Identify root cause (not symptoms)
- Apply minimal fix only
- Do not refactor unrelated code
-
Repeat build until successful
-
Never assume code is correct without running build