Skip to content

Repository files navigation

🧘 Innerly

AI-powered Android App for Emotion & Habit Tracking

Innerly helps users balance their lives by logging daily emotions, building healthy habits, and receiving personalized advice from AI.

Final Project - CSC13009: Mobile Software Development


✨ Key Features

📊 Mood Tracking

  • Log emotions with 5 levels (emoji + color)
  • Tag entries by categories (Emotions, Health, Social…)
  • Attach notes and up to 6 photos per entry
  • Support multiple check-ins per day with custom timestamps
  • Monthly calendar view with color-coded mood history

🎯 Goal & Habit Tracking

  • 8 built-in challenges (Get Fit, Mindfulness, Productivity…)
  • Create custom goals with icons, colors, and frequency
  • Streak system & streak freeze (up to 3 per month)
  • Individual reminders per goal with exact alarms
  • Pause / resume goals at any time

🤖 AI Integration (Google Gemini)

  • Daily Insight: Analyze daily moods → personalized advice
  • Goal Coach: Generate weekly plans & tips for specific goals
  • Wellness Chatbot: Free chat about mental well-being

📱 Others

  • Home Dashboard with weekly summaries & daily progress
  • Multi-method authentication (Email + Google Sign-In)
  • Dark Mode
  • Statistics & charts (mood distribution, weekly charts)
  • Offline-first with Firebase synchronization

🛠️ Tech Stack

Component Technology
Language Kotlin 2.0.21
UI Jetpack Compose (Material Design 3)
Architecture MVVM + Repository Pattern
DI Dagger Hilt
Local DB Room (SQLite)
Backend Firebase (Auth, Firestore, Storage, Cloud Functions)
AI Google Gemini 2.5 Flash (server-side)
Image Loading Coil
Preferences DataStore

📁 Project Structure

Innerly/
├── app/
│   └── src/main/java/com/seapple/innerly/
│       ├── data/          # Entities, DAOs, Repositories, Firebase, Preferences
│       ├── di/            # Hilt DI Modules (Database, Firebase, AI)
│       ├── service/       # GeminiService, Notification system
│       ├── ui/
│       │   ├── navigation/    # Navigation graph (28 routes)
│       │   ├── screens/       # 8 feature packages, 20+ screens
│       │   └── theme/         # Material 3 (Light + Dark)
│       └── util/
├── functions/             # Firebase Cloud Functions (Node.js)
│   └── index.js           # 3 Gemini-powered functions
├── docs/                  # Documentation
│   ├── REQUIREMENTS.md
│   ├── IMPLEMENTATION_PLAN.md
│   ├── PROGRESS.md
│   ├── CHANGELOG.md
│   ├── Features.csv
│   └── data_design.csv
└── report/                # Project's report

🚀 Getting Started

Requirements

  • Android Studio Ladybug (2024.2+)
  • JDK 17
  • Android device/emulator (API 26+)
  • Firebase project (with configured google-services.json)

Build & Run

# Clone repository
git clone https://github.com/<your-username>/Innerly.git
cd Innerly

# Build debug APK
./gradlew assembleDebug

# Install on connected device
./gradlew installDebug

Deploy Cloud Functions

cd functions
npm install

# Set Gemini API key (one-time)
firebase functions:secrets:set GEMINI_API_KEY

# Deploy
firebase deploy --only functions

📐 Architecture

┌──────────────────────────────────────────────┐
│              UI Layer (Compose)              │
│  Screens ← StateFlow ← ViewModels            │
├──────────────────────────────────────────────┤
│            Repository Layer                  │
│  MoodRepository │ GoalRepository │ AuthRepo  │
├──────────┬──────────────────────┬────────────┤
│ Room DB  │                      │  Firebase  │
│ (Local)  │                      │  (Cloud)   │
│ Source   │                      │ Firestore  │
│ of Truth │                      │ Storage    │
│          │                      │ Auth       │
│          │                      │ Functions  │
└──────────┴──────────────────────┴────────────┘

Offline-first: Write to Room immediately → async sync to Firestore. Sync on login: Atomic transaction pulls all cloud data → Room.


🗄️ Database

Room (4 entities)

Table Description
mood_entries Emotion logs (mood 1–5, notes, selections, photos)
challenges Challenge categories (8 built-in, local only)
goals Goals/habits (frequency, reminders, streak freeze)
goal_completions Completion records (status: done/frozen)

Firestore

users/{uid}/
├── moods/{firebaseId}
├── goals/{firebaseId}/checkins/{date}
└── insights/{relatedDate}

🤖 AI Cloud Functions

Three callable Firebase Cloud Functions v2 using Google Gemini 2.5 Flash:

Function Purpose Limit
generateDailyInsight Analyze moods → advice <100 words
generateGoalAdvice Weekly plan & goal tips <120 words
chatWithCoach Mental wellness chatbot 2–4 sentences/turn

API keys are stored in Firebase Secrets - never exposed on the client.


👥 Team Members

Name Student ID
Nguyen Thai Bao 23120023
Khong Duc Tien 23120173

Supervising Lecturers:

  • Assoc. Prof. Dr. Tran Minh Triet
  • MSc. Do Trong Le
  • MSc. Huynh Viet Tham

📄 Documentation


📝 License

This project is developed for educational purposes as part of the CSC13009 course at HCMUS.

About

Final Project - CSC13009: Mobile Application Development

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages