SafeLink is a cross-platform personal safety application built with Kotlin Multiplatform (KMP) and Compose Multiplatform. It allows users to manage emergency contacts and send SOS alerts with their location.
The project follows a Clean Architecture approach with a single Shared Module:
composeApp: The UI layer (Jetpack Compose).commonMain: Shared UI code (Screens, Components, Navigation).androidMain: Android entry point (MainActivity).desktopMain: Desktop entry point (Main.kt).iosMain: iOS bridge (MainViewController).
shared: The core business logic and data.domain: Models, Repository Interfaces, Use Cases.data: Repository Implementations, SQLDelight Databases (Contact.sq).di: Dependency Injection (Koin).
iosApp: The native iOS project (SwiftUI) that consumes the shared framework.
- JDK 17+
- Android Studio (for Android/Desktop development)
- Xcode (for iOS development, macOS only)
- Open the project in Android Studio.
- Select the
composeAppconfiguration. - Run on an emulator or device.
- Open the terminal.
- Run:
./gradlew :composeApp:run
Note: The KMP shared framework compiles for iOS targets, but the native SwiftUI app is not yet implemented. iOS development requires macOS + Xcode, which is not available in this environment.
What's complete: Shared Kotlin code,
expect/actualplatform abstractions, framework export configuration.What's needed: Swift/SwiftUI app to consume the
Shared.framework.
Once a Mac is available:
- Navigate to
iosApp/. - Open
iosApp.xcodeprojin Xcode. - Implement the SwiftUI app consuming
Shared.framework. - Run on a Simulator or Device.
To ensure the SOS functionality works as intended, the application requires the following permissions:
- Location (
ACCESS_FINE_LOCATION,ACCESS_COARSE_LOCATION): Used to attach accurate coordinates to emergency alerts. - SMS (
SEND_SMS): Used to send the SOS message directly to your emergency contacts.
- Location (
NSLocationWhenInUseUsageDescription): Required to access your current location for alerts.
- Location: MacOS and Windows may prompt to allow location access for the application to function correctly.
- Language: Kotlin 2.0+
- UI: Jetpack Compose / Compose Multiplatform
- DI: Koin
- Database: SQLDelight
- Async: Coroutines & Flows
- Navigation: Navigation Compose
├── composeApp/ # Shared UI & Platform Entry Points
├── shared/ # Domain, Data, & Logic
├── iosApp/ # Native iOS Shell
└── gradle/ # Build Configuration
| Milestone | Description | Status |
|---|---|---|
| v2.0 | KMP Migration — Android, Desktop, iOS framework | ✅ Complete |
| v2.1 | iOS Native App — SwiftUI integration | 🚧 Pending (requires macOS) |
| v3.0 | Cloud Sync & Auth — Cross-device backup | 📋 Planned |