Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DatePlan logo

DatePlan

Plan, live and remember moments together.
A mobile app for couples, built with Kotlin Multiplatform and Compose Multiplatform.

Build Kotlin Compose Multiplatform Platforms iOS License

Google Play · Website · Português · Organization


DatePlan gives a couple one private place for their relationship: plan the next date, keep the memories that matter and see how many days you have been together. It works offline, speaks 7 languages and talks to its own REST backend (dateplan-api-v2).

Contents

Features · Status · Tech stack · Architecture · Project structure · Getting started · Configuration · iOS · Contributing · License

Features

  • Dates: create, edit and delete dates with category icons, a warning for two dates on the same day and reminders before they happen.
  • Relationship: link two accounts with an invite (send, accept or decline), see the start date and the days together, and end the relationship.
  • Memories: record, edit and revisit important moments.
  • Home-screen widget (Android): days together at a glance, built with Glance.
  • Offline first: everything is cached locally; the app tells no internet apart from server unavailable.
  • Accounts: email and password or Google sign-in, automatic login, edit name and password, delete account.
  • Personalization: light, dark or system theme and a configurable reminder time.
  • 7 languages: English, Portuguese, Spanish, French, Italian, Japanese and Hindi.

Status

Platform State
Android (min SDK 24) Stable, live on Google Play
iOS Experimental: the shared UI runs; ads, push notifications, local reminders, the widget and Google sign-in are not implemented yet

Tech stack

Area Technology
Language and UI Kotlin 2.4 · Compose Multiplatform 1.12 · Material 3
Navigation Navigation Compose
Dependency injection Koin
Networking Ktor 3.6 (bearer auth with refresh-token rotation, timeouts, content negotiation) · CIO on Android, Darwin on iOS
Local data SQLDelight 2.3 (offline cache) · Multiplatform Settings · KSafe (encrypted credentials)
Android only Firebase (Auth, Cloud Messaging, Crashlytics, Performance) · AdMob · Glance widget · WorkManager and AlarmManager · Credential Manager (Google sign-in) · Coil (GIF)
Build Gradle (Kotlin DSL) · Android Gradle Plugin 9
CI GitHub Actions (debug APK)

Architecture

MVVM with StateFlow, use cases and a cache first, then network data flow.

flowchart LR
    UI["Compose screens"] --> VM["ViewModels<br/>(StateFlow)"]
    VM --> UC["Use cases"]
    UC --> Repo["Repositories"]
    Repo --> DB[("SQLDelight<br/>local cache")]
    Repo --> API["Ktor API clients"]
    API -->|HTTPS + JWT| Backend["dateplan-api-v2"]
Loading

Offline versus server down. Network state is decided only by the outcome of requests, with no connectivity check on the device:

Outcome of a request State
DNS failure or unreachable network Offline
Connection refused, timeout, HTTP 502 / 503 / 504 Maintenance (server unavailable)
Any other response from the server (2xx, 4xx, isolated 500) Online

Authentication. Access and refresh tokens are kept in encrypted storage (KSafe). The Ktor client refreshes the access token automatically and only ends the session when the refresh token is rejected (400, 401 or 403), never because of a network failure.

Results as types. API calls return sealed classes (ApiResult, NetworkApiResult, per-feature results) so the UI handles success, failure and offline explicitly.

Project structure

.
├── androidApp/          Android app: Activity, manifest, widget, alarms, FCM, AdMob
├── iosApp/              Xcode project that hosts the shared Compose UI (experimental)
└── shared/
    └── src/
        ├── commonMain/  UI, domain, data, DI, resources (strings in 7 languages)
        │   └── kotlin/.../dateplan/
        │       ├── core/          network status, session, theme, utils, error reporting
        │       ├── data/          local (SQLDelight) and remote (Ktor) data sources
        │       ├── domain/        models, repositories, use cases
        │       ├── presentation/  screens, components, view models
        │       ├── navgation/     routes and navigation
        │       └── di/            Koin modules
        ├── androidMain/ Android implementations (expect/actual)
        └── iosMain/     iOS implementations (expect/actual)

Getting started

Prerequisites

  • JDK 17 or newer
  • A recent Android Studio with the Android SDK
  • A Firebase project (Cloud Messaging, Crashlytics, Performance)
  • An OAuth client ID of type Web in the Google Cloud Console, for Google sign-in
  • A running DatePlan backend (see Backend)

Run on Android

  1. Clone the repository.
  2. Create androidApp/google-services.json in the Firebase console for the package mayckgomes.com.dateplan (or your own, if you change the applicationId). google-services.json.example is enough to compile only.
  3. Copy local.properties.example to local.properties and fill it in (see Configuration).
  4. Build and install:
./gradlew :androidApp:assembleDebug

Or open the project in Android Studio and run the androidApp configuration.

⚠️ Never use real AdMob IDs in development builds and never click real ads: it can get the account suspended. Without AdMob IDs the app uses Google's test IDs.

Backend

The app needs the DatePlan REST API (JWT authentication with refresh tokens, relationships, dates, memories, invites and notifications): DatePlan-API. Run it locally and point API_BASE_URL at it. The emulator reaches your computer's localhost as 10.0.2.2.

Configuration

Values are read from local.properties (ignored by git) at build time.

Key Required Description
GOOGLE_WEB_CLIENT_ID for Google sign-in OAuth Web client ID
API_BASE_URL yes Backend URL. Default: http://10.0.2.2:8080 (plain HTTP only in debug builds)
ADMOB_APP_ID no AdMob app ID
ADMOB_BANNER_DATE, _MEMORIES, _PROFILE, _RELATIONSHIP, _HOME no AdMob banner unit IDs

Release builds depend on these values. Without them a release build uses test ads and points to 10.0.2.2.

iOS (experimental)

  1. On a Mac with Xcode, set the backend in iosApp/Configuration/Config.xcconfig (API_BASE_URL, default http://localhost:8080 for the simulator).
  2. Open iosApp/iosApp.xcodeproj and run on a simulator or device.

Not implemented on iOS yet: ads, push notifications, local reminders, the widget and Google sign-in.

Roadmap and known limitations

  • Automated tests (there are none yet)
  • iOS: local reminders, push notifications, ads, widget and Google sign-in
  • Automatic recovery when the connection or the server comes back
  • Screenshots and a short demo in this README

Contributing

Contributions are welcome. Read CONTRIBUTING.md (in Portuguese) and follow the Code of Conduct. For vulnerabilities, do not open a public issue: see SECURITY.md.

License

Source code is source-available under the PolyForm Noncommercial License 1.0.0: you can read, study, modify and use it for noncommercial purposes (personal use, learning, research, hobby projects, nonprofits). Commercial use requires written permission from the author.

The name "DatePlan", the logo and the app icons are the project's identity and are not covered by the license: forks must use their own name and visual identity.

Credits

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages