Skip to content

Repository files navigation

🟢 Diet Monster (饮食绿怪兽)

Diet Monster is a gamified weight-loss and calorie-tracking application built with React Native (Expo). Instead of traditional, boring calorie counters, this app pairs your daily nutritional goals with a virtual pet monster. The monster thrives when you hit your calorie deficits and starves or gets overfed when you neglect your diet.


🌟 Key Features

  • Gamified Tracking (游戏化打卡)
    • Your daily logs affect the "Monster EXP" engine.
    • Sync-on-open Settlement: The app calculates missed days automatically on startup. Starving your monster by not logging meals results in heavy EXP penalties.
  • Lottie Animations (动态成长表现)
    • The monster is fully animated and reacts to your progress. It has 4 distinct stages based on EXP: Happy/Healthy, Overfed, Laboring, and Starving/Dying.
  • AI Camera Logging (AI 视觉打卡模拟)
    • Seamlessly point your phone camera at your food or select from the gallery. (Currently utilizing a high-speed mocked Vision Service to ensure fluid UI testing without AI API key billing constraints).
  • Permanent Death (永久死亡惩罚)
    • If EXP reaches 0, the monster passes away. The user UI is locked to a Tombstone screen until they explicitly wipe their history and reclaim a new egg.
  • Supabase Authentication (安全账户体系)
    • Integrated with @supabase/supabase-js. Note: Local MVP uses a Zustand mocked auth state for zero-configuration testing, but the code is production-ready for real Supabase keys.

🛠 Tech Stack

  • Framework: React Native + Expo (TypeScript)
  • State Management: Zustand
  • Animations: lottie-react-native
  • Media: expo-image-picker
  • Backend Ready: Supabase

🚀 Getting Started

Prerequisites

  • Node.js installed
  • Expo Go app installed on your physical device (iOS or Android)
  • (Optional) Android Studio & Java SDK if you wish to build the standalone .apk.

Installation & Local Dev

  1. Clone the repository and navigate to the project directory:
    cd e:\Work_Code\diet_go
  2. Install dependencies:
    npm install
  3. Start the Expo development server:
    npm start
  4. Scan the QR code shown in the terminal using the Expo Go app on your phone.

Bypassing Auth for Testing

In the current MVP build, the app will simulate a successful login automatically when you press Sign In or Sign Up on the AuthScreen. No real Supabase credentials are required to test the core gamification loop.

📦 Building the APK (Android)

Since Native Android folders have already been generated (npx expo prebuild), you can compile a production .apk directly without Expo Application Services (EAS).

  1. Ensure JAVA_HOME is set matching your JDK 17+ installation.
  2. Navigate to the android folder and run Gradle:
    cd android
    .\gradlew.bat assembleRelease
  3. The generated APK will be waiting for you at: android/app/build/outputs/apk/release/app-release.apk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages