Skip to content
/ kmp-project-template Public template

The Kotlin Multiplatform Multi-module Template generator simplifies cross-platform development by enabling shared business logic and UI components across Android, iOS, Desktop, and Web, while retaining native platform functionality.

License

Notifications You must be signed in to change notification settings

openMF/kmp-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Project Logo

KMP Multi-Module Project Generator

πŸš€ The Ultimate Kotlin Multiplatform Project Generator with Production-Ready Setup

Kotlin Kotlin Multiplatform Compose Multiplatform

badge-android badge-ios badge-desktop badge-js

PRs Welcome GitHub license Pr Checks Slack

Note

This branch is designed for partial customized projects. Running the customizer.sh script doesn't rename any application module, instead it'll change all core and feature module namespaces, packages, and other related configurations accordingly.

For full customization, please use the full-customizable branch instead.

🌟 Key Features

  • Cross-Platform Support: Android, iOS, Desktop, and Web applications from a single codebase
  • Multi-Module Architecture: Clean, organized, and scalable project structure
  • Advanced Source Set Hierarchy: Sophisticated code sharing structure with logical platform groupings
  • Pre-configured CI/CD: GitHub Actions workflows for building, testing, and deployment
  • Code Quality Tools: Static analysis and formatting tools pre-configured
  • Sync Capabilities: Tools to stay in sync with upstream template changes
  • Secrets Management: Secure handling of keystores and sensitive information

πŸš€ Getting Started

Prerequisites

  • Bash 4.0+
  • Unix-like environment (macOS, Linux) or Git Bash on Windows
  • Android Studio/IntelliJ IDEA
  • Xcode (for iOS development)
  • Node.js (for web development)

Quick Start

  1. Clone the Repository
git clone https://github.com/openMF/kmp-project-template.git
cd kmp-project-template
  1. Run the Customizer
./customizer.sh org.example.myapp MyKMPProject
  1. Build and Run
./gradlew build

🍎 iOS Deployment

This template includes production-ready iOS deployment infrastructure with support for Firebase App Distribution, TestFlight, and App Store releases.

Prerequisites

  • macOS with Xcode installed
  • Apple Developer Account ($99/year)
  • Match Repository for code signing certificates
  • App Store Connect API Key

Quick Setup

Run the comprehensive iOS setup wizard:

bash scripts/setup_ios_complete.sh

The wizard will guide you through:

  • βœ… Team ID configuration
  • βœ… App Store Connect API key setup
  • βœ… Fastlane Match repository configuration
  • βœ… Certificate synchronization
  • βœ… TestFlight & App Store review contact information

Deployment Scripts

Three deployment targets are available:

Target Purpose Script
Firebase Internal testing, QA bash scripts/deploy_firebase.sh
TestFlight Beta testing bash scripts/deploy_testflight.sh
App Store Production release bash scripts/deploy_appstore.sh

Example:

# Deploy to Firebase for internal testing
bash scripts/deploy_firebase.sh

# Deploy to TestFlight for beta testing
bash scripts/deploy_testflight.sh

# Deploy to App Store for production
bash scripts/deploy_appstore.sh

Configuration Architecture

The project uses a shared vs app-specific configuration pattern:

  • Shared Config (IOS_SHARED): Team ID, API keys, Match repo - same for all apps
  • App-Specific Config (IOS): Bundle ID, Firebase app ID - changes per app

When you run customizer.sh, it updates only app-specific values while preserving shared infrastructure.

Optional: Push Notifications

If your app uses Firebase Cloud Messaging:

bash scripts/setup_apn_key.sh

GitHub Actions CI/CD

The project uses a centralized configuration system for iOS deployment workflows.

Configuration Files:

  • fastlane-config/project_config.rb - Application-specific configuration
  • secrets/shared_keys.env - Team-wide credentials and secrets

Configuration Loading:

  • Local deployments read from secrets/shared_keys.env
  • CI/CD workflows extract configuration from project_config.rb and GitHub Secrets

Setup:

  1. Configure GitHub Secrets as documented in the iOS Configuration Guide
  2. Update project_config.rb with application-specific values
  3. Execute workflows

Configuration is read from fastlane-config/project_config.rb for both local and CI deployments.

See iOS Configuration Guide for detailed setup instructions.

Documentation

πŸ“ Project Structure

The project follows a modular architecture:

  • Platform Modules: cmp-android, cmp-ios, cmp-desktop, cmp-web, etc.
  • Core Modules: Common, reusable components shared across all features
  • Feature Modules: Self-contained feature implementations
  • Build Logic: Custom Gradle plugins and build configuration

πŸ“š Documentation

Our project includes comprehensive documentation to help you get started and understand the architecture:

Documentation is continuously improving. Check back for updates or contribute to enhancing our docs!

🀝 Contributing

We welcome contributions to improve the project template! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a pull request

Please follow our Contributing Guidelines for detailed information.

πŸ“« Support

πŸ“„ License

This project is licensed under the Mozilla Public License 2.0

About

The Kotlin Multiplatform Multi-module Template generator simplifies cross-platform development by enabling shared business logic and UI components across Android, iOS, Desktop, and Web, while retaining native platform functionality.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 9