A modern, cross-platform Tetris game built with Kotlin Multiplatform and Compose Multiplatform, demonstrating true code sharing across Android, iOS, Desktop, and Web platforms.
- Visual Themes - 9 color schemes: Classic, Modern, Neon, Retro, Pastel, Dark, Monochrome, Cyberpunk, and Nature
- Piece Styles - Choose between Solid, Gradient, and Outlined piece rendering
- Audio Settings - Procedurally generated music and SFX with volume control and multiple themes
- Android - Touch controls with swipe gestures, baseline profiles for performance
- iOS - Native SwiftUI integration with iOS-specific optimizations
- Desktop - Keyboard controls that feel great on Windows, macOS, and Linux
- Web (Compose) - Browser-based gameplay with Kotlin/JS and Compose for Web
- Web (Kotlin/JS + React) - Kotlin/JS with React wrappers for type-safe web development
- Game History - Track all your games with detailed statistics and filtering
- Persistent Settings - Your preferences are saved across sessions
- Offline Support - Play without an internet connection
- SQLite Database - Local storage for game records and settings
- Procedural Audio - Dynamically generated music and SFX (no audio files needed!)
- MVI Architecture - Predictable state management with MVIKotlin
- Dependency Injection - Koin for clean architecture
- Kotlin Multiplatform 2.2.20 - Share code across all platforms
- Compose Multiplatform 1.9.0 - Modern declarative UI
- MVIKotlin - MVI architecture for predictable state management
- Decompose - Navigation and lifecycle management
- Koin - Dependency injection
- SQLDelight - Type-safe SQL database
- Kotlinx Coroutines - Asynchronous programming
- Kotlinx Serialization - JSON serialization
The project follows clean architecture principles with clear separation of concerns:
TetrisLite/
βββ composeApp/ # Compose Multiplatform UI (Android, Desktop, Web)
βββ iosApp/ # Native iOS app entry point with SwiftUI
βββ webApp/ # Kotlin/JS + React wrappers web app
βββ shared/ # Shared business logic and data layer
βββ core/ # Core modules
β βββ domain/ # Business logic, use cases, domain models
β βββ data/ # Repository implementations
β βββ database/ # SQLDelight database
β βββ common/ # Common utilities
β βββ uikit/ # Shared UI components
βββ feature/ # Feature modules
βββ game/ # Game screen and logic
βββ home/ # Home screen
βββ settings/ # Settings management
βββ history/ # Game history
βββ root/ # Navigation root
- JDK 17 or higher
- Android Studio Ladybug or later (for Android development)
- Xcode 15+ (for iOS development, macOS only)
- Node.js (for web development)
./gradlew :composeApp:assembleDebug
./gradlew :composeApp:installDebug./gradlew :composeApp:runOpen iosApp/iosApp.xcodeproj in Xcode and run the project.
./gradlew :composeApp:jsBrowserDevelopment./gradlew :webApp:jsBrowserDevelopmentRunThe project uses Ktlint for code formatting and Detekt for static analysis.
./gradlew ktlintCheck
./gradlew detekt./gradlew testThe project includes GitHub Actions workflows for:
- PR Checks - Code quality, tests, and builds
- Release - Automated builds and deployments
- Code Quality - Static analysis and linting
Contributions are welcome! Please feel free to submit a Pull Request.
Key areas for enhancement:
- UI/UX: Improve the iOS part
This project is open source and available under the MIT License.