Skip to content

Repository files navigation

GymFlow Android Application (Kotlin + Jetpack Compose)

A native Android application for GymFlow built with 100% Kotlin, Jetpack Compose, Material 3, and Clean Architecture (MVVM).


📱 Features

  1. Real-Time Gym Occupancy Pulse:

    • Live circular progress gauge showing current occupants vs capacity.
    • Status badges with dynamic color & pulsing indicator:
      • 🟢 LOW Crowd (< 40% occupancy, 0–5 min wait time)
      • MODERATE (40% - 74% occupancy, 10 min wait time)
      • 🔴 HIGH Crowd (>= 75% occupancy, 15–25 min wait time)
    • Real-time turnout rate & capacity benchmarks.
  2. One-Tap Self Check-In & Check-Out:

    • Check-in directly from the home dashboard with instant optimistic updates and server synchronization.
    • Automatic creation and closure of visit logs with workout duration and calories calculated.
  3. AI Crowd Predictions & Schedule:

    • 17-hour attendance curve (6:00 AM to 10:00 PM) calibrated to active facility capacity.
    • Custom Jetpack Compose canvas-based Attendance Wave / Bar Chart.
    • Interactive time segment filters: All Day, Morning (6–11 AM), Afternoon (12–4 PM), Evening (5–10 PM).
    • Highlight cards for Morning Window (6–7:30 AM), Afternoon Window (1:30–3:30 PM), and Peak Rush (5:30–8 PM).
  4. Personal Workout History & Logging:

    • View past gym visit sessions with date, duration, workout discipline, and calories burned.
    • Monthly summary metrics (Total visits, Average duration, Total calories burned).
    • Log Workout Modal Sheet to record training sessions (workout type, duration slider, calories, notes).
    • Delete workout session records.
  5. Admin Member Directory & Access Control (Admin Only):

    • Real-time member search by name or email.
    • Filter chips: All, Inside Gym (checked in), Outside Gym, Basic, Pro Athlete, VIP Elite.
    • 1-Tap Admin Master Check-In / Check-Out toggle for any registered member.
    • Create new members with assigned subscription tiers (Basic ₹999, Pro ₹1,999, Elite ₹3,499).
    • Edit member profile, role, subscription tier, and reset password.
    • Facility Capacity Manager modal (dynamically scale capacity 10–2000 occupants).
    • Live crowd simulation tools (+1, -1, Auto-Simulate flow).
  6. Design System & Theming:

    • Custom GymFlow light and dark palettes matching the web design system:
      • Dark Theme: #090A0D canvas, #131418 cards, #22242B borders, #FFFFFF text.
      • Light Theme: #F7F7F7 canvas, #FFFFFF cards, #DEDEDE borders, #171717 text.
    • Dynamic Theme Switcher with instant toggle in top app bar.
  7. Network & Server Switcher:

    • In-app endpoint configuration dialog supporting:
      • Android Emulator: http://10.0.2.2:3000/
      • Railway Production Cloud: https://gymflowserver-production.up.railway.app/
      • Local Physical Device: http://<YOUR_LAN_IP>:3000/

🛠️ Tech Stack & Architecture

  • Language: Kotlin 2.0+
  • UI Toolkit: Jetpack Compose, Material 3, Navigation Compose
  • Architecture: MVVM + Clean Architecture + Unidirectional Data Flow (UDF)
  • State Management: Kotlin Coroutines, StateFlow, asStateFlow(), update
  • Networking: Retrofit 2 + OkHttp 3 + Gson
  • Session & Auth: Persistent SessionCookieJar handling Better Auth cookies (better-auth.session_token) across app restarts
  • Storage: SharedPreferences for user session and server endpoint caching

📂 Project Structure

Android_app/
├── app/
│   ├── build.gradle.kts
│   ├── proguard-rules.pro
│   └── src/
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/com/gymflow/app/
│       │   │   ├── MainActivity.kt
│       │   │   ├── data/
│       │   │   │   ├── api/          # GymFlowApiService, ApiClient
│       │   │   │   ├── model/        # GymStatus, AuthModels, VisitLog, Member, HourlyPrediction
│       │   │   │   ├── repository/   # AuthRepository, OccupancyRepository, VisitsRepository, MembersRepository
│       │   │   │   └── session/      # SessionManager, SessionCookieJar
│       │   │   └── ui/
│       │   │       ├── components/   # OccupancyGauge, AttendanceWaveChart, Sparkline, Badges, Modals
│       │   │       ├── screens/      # SplashScreen, AuthScreen, DashboardScreen, ScheduleScreen, HistoryScreen, AdminMembersScreen, GymFlowApp
│       │   │       ├── theme/        # Color, Theme, Type
│       │   │       └── viewmodel/    # AuthViewModel, DashboardViewModel, ScheduleViewModel, HistoryViewModel, AdminMembersViewModel
│       │   └── res/                  # Icons, Drawables, Themes, Network security config
│       └── test/
│           └── java/com/gymflow/app/ # GymFlowLogicTest
├── gradle/
│   ├── libs.versions.toml            # Version catalog
│   └── wrapper/
├── build.gradle.kts
├── settings.gradle.kts
├── local.properties
└── README.md

🚀 How to Run

Option 1: Using Android Studio

  1. Open Android Studio.
  2. Select Open Project and choose D:\Projects\GymFlow\Android_app.
  3. Wait for Gradle Sync to complete.
  4. Select your target device / emulator and click Run (Shift+F10).

Option 2: Using Command Line (Gradle)

cd D:\Projects\GymFlow\Android_app

# Build debug APK
.\gradlew assembleDebug

# Run Unit Tests
.\gradlew testDebugUnitTest

The generated APK will be at app/build/outputs/apk/debug/app-debug.apk.


🔑 Demo Credentials

  • Admin Account: admin@gymflow.com / Admin123456! (Tap Demo Admin on login screen)
  • Member Account: member@gymflow.com / Member123456! (Tap Demo Member on login screen)

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages