Skip to content

Sonicloop-dev/Love-counter-Android-Build

Repository files navigation

Love Counter Android App

A beautiful Android application built with Jetpack Compose that tracks relationship milestones and celebrates love stories.

Features

Core Functionality

  • Live Counter: Real-time tracking of days, weeks, months, and years together
  • Milestone Tracking: Progress towards relationship milestones (100 days, 1 year, etc.)
  • Achievements System: Unlock achievements as you reach different milestones
  • Couple Names: Personalize the app with both partners' names
  • Date Selection: Set your relationship start date with a beautiful date picker

User Experience

  • Material Design 3: Modern, beautiful UI following Google's latest design principles
  • Smooth Animations: Delightful animations and transitions throughout the app
  • Gradient Backgrounds: Beautiful pink, purple, and blue gradient backgrounds
  • Responsive Design: Optimized for different screen sizes
  • Debug Features: Hidden debug menu (tap the heart icon 5 times)

Technical Architecture

Technologies Used

  • Kotlin: Modern Android development language
  • Jetpack Compose: Declarative UI toolkit (Android's equivalent to SwiftUI)
  • Material Design 3: Latest Material Design system
  • Hilt: Dependency injection framework
  • DataStore: Modern data storage solution for preferences
  • StateFlow: Reactive state management
  • Coroutines: Asynchronous programming

Architecture Pattern

  • MVVM: Model-View-ViewModel architecture
  • Repository Pattern: Data abstraction layer
  • Single Activity: Modern Android navigation with Compose
  • State Management: Unidirectional data flow with StateFlow

Project Structure

app/src/main/java/com/lovecounter/
├── data/
│   ├── local/          # Local data storage (DataStore)
│   ├── model/          # Data models and entities
│   └── repository/     # Repository implementations
├── di/                 # Dependency injection modules
├── ui/
│   ├── components/     # Reusable UI components
│   ├── screens/        # Screen composables
│   ├── theme/          # Material Design theme
│   └── viewmodel/      # ViewModels for state management
├── utils/              # Utility classes
├── LoveCounterApplication.kt
└── MainActivity.kt

Key Components

Data Models

  • LoveCounterData: Main data class storing relationship information
  • TimeComponents: Calculated time breakdowns (years, months, days, etc.)
  • Milestone: Achievement milestone definitions

UI Components

  • CounterCard: Beautiful cards displaying time counts
  • TimeCard: Individual time unit displays
  • LoveButton: Custom styled buttons with animations

ViewModels

  • LoveCounterViewModel: Main app state management with reactive data flows

Getting Started

Prerequisites

  • Java JDK 17+: Required for Android development
    # macOS with Homebrew
    brew install openjdk@17
    
    # Set JAVA_HOME (add to ~/.zshrc or ~/.bash_profile)
    export JAVA_HOME=/opt/homebrew/Cellar/openjdk@17/17.x.x/libexec/openjdk.jdk/Contents/Home
  • Android Studio (recommended) or Android SDK
  • Android SDK 24 (Android 7.0) or higher
  • Kotlin 1.9.10+

Quick Setup

  1. Clone/Download the project
  2. Install Java JDK (see prerequisites above)
  3. Run the setup script:
    cd "Love counter Android Build"
    ./setup.sh

Manual Building

  1. Open terminal in project directory
  2. Build the project:
    ./gradlew assembleDebug
  3. Install on connected device:
    ./gradlew installDebug

Development in Android Studio

  1. Open Android Studio
  2. Choose "Open an existing project"
  3. Select the project folder
  4. Wait for Gradle sync
  5. Run the app (Shift + F10)

Development

  • The app uses local storage only (DataStore Preferences)
  • No network permissions required for basic functionality
  • Future cloud sync integration planned with Supabase

Conversion from iOS

This Android app is a faithful conversion of the iOS SwiftUI Love Counter app, featuring:

  • Equivalent UI: Jetpack Compose components mirroring SwiftUI layouts
  • Matched Animations: Similar smooth transitions and scaling effects
  • Consistent UX: Same user flows and interaction patterns
  • Preserved Features: All core functionality from the iOS version

iOS to Android Mapping

  • SwiftUI → Jetpack Compose
  • Core Data → DataStore (with future Room integration)
  • ObservableObject → ViewModel + StateFlow
  • @State → State/MutableState
  • Timer → Coroutine-based timer

Future Enhancements

  • Supabase authentication integration
  • Cloud data synchronization
  • Room database for offline-first architecture
  • Widget support for home screen
  • Notification reminders for milestones
  • Photo memories integration
  • Sharing functionality
  • Multiple relationship support

License

This project is part of a personal app development portfolio.

Contributing

This is a personal project, but feedback and suggestions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors