A structured Kotlin + Mobile Development learning codebase you can grow into a production-grade Android + Kotlin Multiplatform (KMP) portfolio.
This repo is built like a learning notebook + project playground:
- You practice Kotlin fundamentals in small, focused files.
- You keep exercises + solutions in the repo.
- You track progress using checklists.
- You gradually evolve from Kotlin basics → Android → Jetpack Compose → Testing → KMP → CI/CD → Publishing.
🚀 New here? Start with docs/START_HERE.md for a complete getting-started guide!
- Master Kotlin language features deeply (not “just enough”).
- Build modern Android apps with Jetpack Compose, strong architecture, and testing.
- Build cross-platform apps with Kotlin Multiplatform (Android + iOS) using shared business/data layers.
- Build production-ready apps: CI/CD, quality gates, releases, monitoring mindset.
This repo is intended to evolve in phases:
You write Kotlin in small runnable files and practice language mastery.
You build Android projects (Compose-first), using best practices.
You reuse business logic across Android + iOS.
- Android Studio (recommended) or IntelliJ IDEA
- JDK 17+ (Android Studio bundles a JDK)
- Git
- macOS + Xcode (required for running iOS apps when doing KMP)
- Open the repo in IntelliJ IDEA / Android Studio.
- Run the
main()function in the Kotlin file(s).
- Open the project in Android Studio.
- Select
apprun configuration. - Run on emulator/device.
kotlin-learning/
├── README.md
├── build.gradle.kts
├── settings.gradle.kts
├── docs/
│ ├── BestPractices/
│ │ └── kotlin-best-practices.md # ⭐ Best practices guide
│ └── notes/
│ ├── progress.md
│ ├── notes-kotlin.md
│ ├── notes-android.md
│ ├── notes-compose.md
│ ├── notes-testing.md
│ └── notes-kmp.md
├── src/
│ ├── main/
│ │ ├── kotlin/
│ │ │ ├── lessons/ # Kotlin fundamentals (Phase A)
│ │ │ │ └── kotlin-lessons/
│ │ │ │ ├── Lesson01_Variables.kt
│ │ │ │ ├── Lesson02_Types.kt
│ │ │ │ ├── Lesson03_Operators.kt
│ │ │ │ ├── Lesson04_Functions.kt
│ │ │ │ ├── Lesson05_ControlFlow.kt
│ │ │ │ ├── Lesson06_NullSafety.kt
│ │ │ │ ├── Lesson07_Arrays.kt
│ │ │ │ └── ... (more lessons as you progress)
│ │ │ └── exercises/
│ │ │ ├── Exercise01_Palindrome.kt
│ │ │ ├── Exercise02_Anagrams.kt
│ │ │ ├── Exercise03_BasicAuthModel.kt
│ │ │ └── solutions/
│ │ └── resources/
│ └── test/
│ └── kotlin/
├── android-apps/ # 📁 Planned (Phase B - not created yet)
│ ├── compose-starter/
│ ├── offline-first-notes/
│ └── ...
├── kmp-apps/ # 📁 Planned (Phase C - not created yet)
│ ├── shared-core/ # shared module (commonMain)
│ ├── androidApp/
│ └── iosApp/
└── tools/ # 📁 Planned (not created yet)
├── scripts/
└── ci/
Note: This structure evolves as you progress. Currently focused on Kotlin fundamentals in
src/main/kotlin/. Android and KMP modules will be added in later phases.
📖 See docs/BestPractices/kotlin-best-practices.md for the Kotlin best practices guide.
- Lessons:
Lesson##_TopicName.kt - Exercises:
Exercise##_Name.kt - If you keep solutions: store them under
solutions/(don't mix with exercises).
- Prefer clarity > cleverness.
- Avoid
!!except in controlled experiments (and label them). - Use
sealed classfor state/result modeling. - Use pure functions for logic whenever possible.
- Follow Kotlin best practices: prefer
valovervar, use null safety properly, prefer immutable collections.
Each lesson should include:
- A short comment header describing what you’re learning.
- 2–5 examples max (small, focused).
- A mini exercise at the end.
Exercises are where mastery happens. For each exercise:
- Write the problem statement at the top.
- Implement solution(s).
- Add edge cases.
- Add tests (later stages).
Use the progress checklist below (copy to docs/notes/progress.md).
✅ Mark items as you complete them.
Add links to the file(s) where you practiced each concept.
- Variables:
valvsvar - Types: Int/Long/Double/Float/Boolean/Char/String
- Strings: templates, common ops, formatting
- Operators: arithmetic, comparison, logical
- Control flow: if/else, when, loops, ranges
- Functions: params, returns, default args, named args
- Scope functions: let/apply/run/also/with
- Collections: List/Set/Map (mutable vs immutable)
- Collections ops: map/filter/reduce/groupBy
- Null safety:
?,?:, safe calls, smart casts - Exceptions: try/catch, custom errors
- Classes + constructors
- Data classes (copy, destructuring)
- Interfaces + composition
- Sealed classes for state/result modeling
- Generics (basic)
- Extension functions + properties
- Object + companion object
- Visibility modifiers + packages
- suspend functions + structured concurrency
- Dispatchers + threading model
- Cancellation + timeouts
- Exception handling in coroutines
- Flow basics (cold stream)
- Operators: map/filter/debounce/distinctUntilChanged
- StateFlow vs SharedFlow
- Testing coroutines + Flow
- Android project structure + Gradle basics
- Activities/Fragments (know lifecycle basics)
- Permissions, intents, deep links
- Networking: Retrofit/OkHttp basics
- Persistence: Room + DataStore
- Background work: WorkManager
- Dependency Injection: Hilt basics
- Composables + recomposition understanding
- State hoisting patterns
- Side effects: LaunchedEffect / DisposableEffect
- Navigation Compose
- Theming (Material 3)
- Lists + performance (LazyColumn)
- UI testing basics (Compose tests)
- MVVM + clean boundaries
- Repository pattern + use cases
- Unit tests (domain + data)
- ViewModel tests
- Integration tests (db/network fakes)
- Static analysis: ktlint/detekt
- Profiling + performance basics
- KMP project structure: commonMain/androidMain/iosMain
- Shared models + business logic
- Shared networking (Ktor client or shared layer)
- Shared persistence approach (e.g. SQLDelight or strategy)
- Swift interop basics (consuming shared framework)
- Shared state management design (UI stays native)
- CI pipeline for Android (build + test)
- Signing configs (debug/release)
- Release builds (R8/Proguard basics)
- Versioning strategy
- Crash reporting + analytics integration approach
- Play Store publishing checklist
These aren’t “toy apps” — each forces real-world skill.
- Offline-first Notes app (Room + sync strategy)
- Search app (Flow debounce + pagination + caching)
- Auth app (token handling + secure storage)
- Shared core module (domain + data) used by:
- Android app (Compose)
- iOS app (SwiftUI)
- KMP “API + Cache + State” demo (clean boundaries)
Use Conventional Commits:
feat:new functionalityfix:bug fixrefactor:restructure without behavior changedocs:documentation onlytest:add/modify testschore:tooling/build tasks
Examples:
docs: add staged Kotlin learning roadmap and progress trackerfeat: add Lesson03 operators and Exercise01 palindrome checkerrefactor: split learning notebook into lesson files
Copy into docs/notes/progress.md or docs/notes/notes-kotlin.md:
- Focus:
- Lessons touched:
- Exercises completed:
- Bugs/lessons learned:
- Next topics:
If you keep a single “notebook” file, use this pattern:
- Only run ONE lesson in
main(). - Keep each topic in its own function.
- Keep extra examples commented and labeled.
- Create
docs/notes/progress.mdand paste the Progress Tracker. - Create the
kotlin-fundamentalsmodule and split lessons into files. - Add exercises + (later) add tests.
- Add your first Android Compose app module when Kotlin fundamentals are stable.
- Add KMP only after you’re confident in coroutines/Flow and Compose basics.
- This README is designed for long-term tracking.
- Keep it clean: add links to lesson files as you create them.
- The goal is not to “finish Kotlin,” but to build production-level instincts.
MIT (or your preferred license)