Skip to content

NitishChoubey/FinanceApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฐ Finance โ€” Personal Finance Companion App

Finance App Banner

Android Kotlin Jetpack Compose License API Build


A modern, intelligent personal finance companion built for everyday use.
Track transactions, monitor budgets, understand your spending patterns,
and receive AI-powered financial tips โ€” all in one beautifully designed app.


Features โ€ข Screenshots โ€ข Architecture โ€ข Tech Stack โ€ข Setup โ€ข API Layer โ€ข Project Structure


๐Ÿ“– About The App

Finance is a lightweight personal finance companion app designed to help users understand their daily money habits in a simple, engaging, and visually rich way. It is not a banking app โ€” it is a smart tracking tool that puts financial awareness in your hands.

The app was built with a strong focus on product thinking, mobile UX, and engineering best practices. Every feature is thoughtfully integrated to serve real user needs โ€” from tracking a morning coffee expense to understanding whether you'll hit your savings goal by the end of the month.

๐ŸŽฏ Purpose

Most people know they should track their money. Very few actually do โ€” because existing tools are either too complex, too minimal, or too boring. Finance solves this by being:

  • Fast to use โ€” Add a transaction in under 10 seconds
  • Visually rewarding โ€” Animated charts and progress bars make finances feel alive
  • Intelligent โ€” AI-powered tips and spending forecasts give context, not just data
  • Secure โ€” Biometric lock ensures your financial data stays private
  • Offline-first โ€” Works entirely without internet; the API layer enhances but never blocks

โœจ Features

๐Ÿ  Home Dashboard

  • Live balance card โ€” real-time total balance with a gradient hero design
  • Monthly income & expense summary cards with compact currency formatting
  • Savings rate progress bar โ€” animated, shows percentage of income saved this month
  • Financial Health Score โ€” composite score (0โ€“100) across savings, budget adherence, and tracking consistency with an animated arc ring and sub-score breakdown
  • Month-End Spending Forecast โ€” linear projection of where you'll end up based on daily average, with a savings estimate and on-track / over-budget indicator
  • Spending breakdown by category โ€” animated horizontal bars per category with percentages
  • Recent activity list โ€” last 5 transactions with quick navigation to full list
  • Shimmer loading effect โ€” skeleton placeholder while data loads

๐Ÿ’ณ Transaction Tracking

  • Add transactions โ€” full form with amount, type (income/expense), category grid, date picker, and optional note
  • Edit transactions โ€” tap any transaction card to open pre-filled edit form
  • Delete transactions โ€” swipe left to delete with an undo snackbar (5-second window)
  • Filter by type โ€” All / Income / Expenses filter chips
  • Full-text search โ€” searches across title, note, and category name simultaneously
  • Grouped by date โ€” transactions grouped under Today / Yesterday / formatted date headers
  • 12 pre-built categories โ€” Food & Dining, Transport, Shopping, Health, Entertainment, Bills, Salary, Education, Travel, Investments, Gifts, Other
  • Form validation โ€” inline error messages for all required fields

๐ŸŽฏ Monthly Budget Goals

  • Set budget per category โ€” custom spending limit for any category for the current month
  • Edit goal amount โ€” update the budget limit without losing progress data
  • Live animated progress bars โ€” real-time spend vs budget with smooth animation
  • Smart alerts โ€” yellow warning banner at 80% of budget, red banner when exceeded
  • Overall budget summary card โ€” aggregate view across all goals for the month
  • Duplicate prevention โ€” enforces one goal per category per month
  • Delete goals โ€” remove any goal with a single tap

๐Ÿ“Š Insights Screen

  • 7-day daily bar chart โ€” MPAndroidChart-powered bar chart showing last 7 days of spending
  • Week vs last week comparison โ€” total spend with percentage change and trend icon
  • Month vs last month comparison โ€” current vs previous month with % delta badge
  • Top spending category โ€” highlighted card showing where most money went
  • Full category breakdown โ€” animated percentage bars for every expense category
  • AI Financial Tips โ€” 5 personalised tips fetched from the mock Finance API with a "Powered by Finance API" badge, 600ms loading state, and category-coloured tip cards

๐Ÿ” Security

  • Biometric lock โ€” fingerprint / PIN authentication on every app launch
  • Toggle in settings โ€” enable or disable biometric lock at any time
  • Graceful fallback โ€” falls back to device PIN / password if biometric is unavailable

โš™๏ธ Profile & Settings

  • Display name โ€” personalise the app with your name (shown on home screen greeting)
  • Currency selection โ€” 8 supported currencies (INR, USD, EUR, GBP, JPY, AED, SGD, CAD) with live exchange rates fetched from the mock API
  • Dark mode toggle โ€” instant theme switch with system-level persistence via DataStore
  • Biometric lock toggle โ€” enable / disable from settings
  • Daily reminder toggle โ€” enable a 9 PM push notification to log expenses
  • Export transactions โ€” share all transactions as a CSV file via any app (Gmail, Drive, WhatsApp)
  • About section โ€” app version, tech stack, API info

๐Ÿ”” Smart Notifications

  • Daily reminder โ€” WorkManager-scheduled notification at 9 PM to log daily expenses
  • Budget alerts โ€” push notification when any category hits 80% or exceeds 100% of budget
  • Context-aware messages โ€” notification text adapts based on how much of income has been spent this month

๐ŸŒ™ Additional

  • Dark mode โ€” complete dark theme with carefully tuned color palette
  • Animated screen transitions โ€” slide + fade transitions between all screens
  • Offline-first โ€” all core features work without internet; API features degrade gracefully
  • Demo data seeded on first install โ€” 12 categories and 10 transactions pre-loaded so every screen has content immediately
  • Edge-to-edge design โ€” respects system insets for a modern, immersive look

๐Ÿ“ฑ Screenshots

Home (Light) Home (Dark) Transactions Add Transaction
Screen 1 Screen 1 Screen 1 Screen 1
Goals Insights AI Tips Settings
Screen 1 Screen 1 Screen 1 Screen 1
Biometric Lock Health Score Forecast Export
Screen 1 Screen 1 Screen 1 Screen 1

๐Ÿ“น Demo Video: Watch on Loom / Google Drive (add your link here)


๐Ÿ—๏ธ Architecture

The app follows MVVM (Model-View-ViewModel) architecture with a Repository pattern and Hilt dependency injection throughout. Every layer has a single responsibility.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    UI Layer                          โ”‚
โ”‚         Jetpack Compose Screens + ViewModels         โ”‚
โ”‚  HomeScreen โ”‚ TransactionScreen โ”‚ GoalsScreen โ”‚ etc  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ”‚ observes StateFlow
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 ViewModel Layer                      โ”‚
โ”‚  HomeViewModel โ”‚ TransactionViewModel โ”‚ GoalViewModelโ”‚
โ”‚  InsightsViewModel โ”‚ SettingsViewModel               โ”‚
โ”‚  โ€ข Business logic  โ€ข State management (StateFlow)   โ”‚
โ”‚  โ€ข Coroutine orchestration                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ”‚ suspend functions / Flow
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               Repository Layer                       โ”‚
โ”‚  TransactionRepository โ”‚ GoalRepository              โ”‚
โ”‚  CategoryRepository    โ”‚ ApiRepository               โ”‚
โ”‚  โ€ข Single source of truth                           โ”‚
โ”‚  โ€ข Abstracts local DB and remote API                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                           โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚    Local DB Layer    โ”‚   โ”‚    Remote API Layer       โ”‚
โ”‚  Room (SQLite)       โ”‚   โ”‚  Retrofit + OkHttp        โ”‚
โ”‚  โ€ข TransactionDao    โ”‚   โ”‚  โ€ข MockApiInterceptor     โ”‚
โ”‚  โ€ข GoalDao           โ”‚   โ”‚  โ€ข FinanceApiService      โ”‚
โ”‚  โ€ข CategoryDao       โ”‚   โ”‚  โ€ข Exchange rates         โ”‚
โ”‚  โ€ข AppDatabase       โ”‚   โ”‚  โ€ข Financial tips         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Architecture Decisions

Why MVVM + Repository?
Clean separation of UI, business logic, and data. ViewModels survive configuration changes. Repositories make data sources swappable โ€” switching from mock to real API requires changing only one file.

Why Room with Flow?
All DAO queries return Flow<T>. Any database change instantly propagates to all observing screens with zero manual refresh calls. Adding a transaction on the Transactions screen updates the Home dashboard balance in real time automatically.

Why Hilt?
Constructor injection throughout โ€” every ViewModel, Repository, and Worker gets its dependencies injected. No manual instantiation anywhere. Makes the codebase testable and the dependency graph explicit.

Why Mock API instead of a real backend?
The mock API layer demonstrates the full production network architecture โ€” Retrofit service interface, OkHttp interceptor, Repository abstraction, sealed ApiResult error handling, and loading states โ€” without requiring a real server. Swapping MockApiInterceptor for a real base URL is literally the only change needed for production.

Offline-first by design
All core features (transactions, goals, insights, balance) run entirely on local Room data. The app works with no internet connection. API features (tips, exchange rates) fail silently โ€” the UI shows nothing rather than an error screen. Core features never depend on network availability.


๐Ÿ› ๏ธ Tech Stack

Category Technology Version Purpose
Language Kotlin 2.0.21 Primary language
UI Framework Jetpack Compose BOM 2024.12.01 Declarative UI
UI Components Material Design 3 via BOM Design system
Architecture MVVM + Repository โ€” App architecture
DI Hilt (Dagger) 2.51.1 Dependency injection
DI KSP KSP 2.0.21-1.0.28 Annotation processing
Database Room (SQLite) 2.6.1 Local persistence
Async Kotlin Coroutines 1.8.1 Async operations
Reactive Kotlin Flow 1.8.1 Reactive data streams
Navigation Navigation Compose 2.8.4 Screen navigation
Networking Retrofit 2 2.11.0 API layer
HTTP Client OkHttp 4 4.12.0 HTTP + mock interceptor
JSON Gson 2.11.0 JSON serialisation
Charts MPAndroidChart v3.1.0 Bar chart visualisation
Preferences DataStore 1.1.1 Settings persistence
Background WorkManager 2.9.1 Scheduled notifications
Biometric AndroidX Biometric 1.1.0 Fingerprint / PIN auth
Splash Screen Core SplashScreen 1.0.1 Launch screen
Build System Gradle (KTS) 8.7.3 Build tooling
Min SDK Android 8.0 (API 26) โ€” Device support
Target SDK Android 15 (API 35) โ€” Latest platform

๐Ÿ“ก Mock API Layer

The app implements a complete network architecture layer using a custom OkHttp interceptor that simulates a real REST API with realistic 600ms network latency.

Endpoints

Endpoint Method Description UI Location
/v1/exchange-rates GET Currency exchange rates (8 currencies) Settings โ†’ Currency sheet
/v1/financial-tips GET 5 AI-generated financial tips Insights โ†’ AI Tips card
/v1/spending-advice?percent=N GET Context-aware spending advice Internal / Logcat

How to Verify It's Working

Method 1 โ€” Visual proof

  • Go to Settings โ†’ Currency โ†’ bottom sheet opens with 600ms spinner โ†’ rates populate
  • Go to Insights โ†’ scroll to bottom โ†’ AI Tips card appears after 600ms spinner

Method 2 โ€” Logcat

Filter: OkHttp

You'll see full request/response logs including the JSON body and timing.

Method 3 โ€” Network Inspector Android Studio โ†’ App Inspection โ†’ Network Inspector โ†’ all 3 endpoints listed with 200 status and ~600ms response time.

Switching to a Real API

The interceptor is designed to be removed in one step:

// In NetworkModule.kt โ€” remove this line:
.addInterceptor(MockApiInterceptor())

// And update:
.baseUrl("https://your-real-api.com/v1/")

Everything else โ€” the service interface, repositories, ViewModels, and UI โ€” requires zero changes.


๐Ÿ—‚๏ธ Project Structure

app/src/main/java/com/yourname/financeapp/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ data/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ local/
โ”‚   โ”‚   โ”œโ”€โ”€ AppDatabase.kt          # Room DB singleton + seeding callback
โ”‚   โ”‚   โ”œโ”€โ”€ Converters.kt           # TypeConverter for TransactionType enum
โ”‚   โ”‚   โ”œโ”€โ”€ TransactionDao.kt       # 12 queries โ€” CRUD, search, aggregates
โ”‚   โ”‚   โ”œโ”€โ”€ GoalDao.kt              # Goal CRUD + month/year queries
โ”‚   โ”‚   โ””โ”€โ”€ CategoryDao.kt          # Category CRUD
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ model/
โ”‚   โ”‚   โ”œโ”€โ”€ Transaction.kt          # @Entity + TransactionType enum
โ”‚   โ”‚   โ”œโ”€โ”€ Category.kt             # @Entity + DEFAULT_CATEGORIES list
โ”‚   โ”‚   โ”œโ”€โ”€ Goal.kt                 # @Entity with FK to Category
โ”‚   โ”‚   โ”œโ”€โ”€ TransactionWithCategory.kt  # @Relation join model
โ”‚   โ”‚   โ”œโ”€โ”€ GoalWithCategory.kt     # @Relation join model
โ”‚   โ”‚   โ””โ”€โ”€ CategorySpending.kt     # Aggregate projection for charts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ preferences/
โ”‚   โ”‚   โ””โ”€โ”€ UserPreferences.kt      # DataStore wrapper for all settings
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ remote/
โ”‚   โ”‚   โ”œโ”€โ”€ ApiService.kt           # Retrofit interface (3 endpoints)
โ”‚   โ”‚   โ”œโ”€โ”€ ApiModels.kt            # Response data classes
โ”‚   โ”‚   โ”œโ”€โ”€ ApiRepository.kt        # Sealed ApiResult + safeCall wrapper
โ”‚   โ”‚   โ””โ”€โ”€ MockApiInterceptor.kt   # OkHttp interceptor with mock JSON
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ ๐Ÿ“ repository/
โ”‚       โ”œโ”€โ”€ TransactionRepository.kt
โ”‚       โ”œโ”€โ”€ GoalRepository.kt
โ”‚       โ””โ”€โ”€ CategoryRepository.kt
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ di/
โ”‚   โ”œโ”€โ”€ DatabaseModule.kt           # Hilt: Room DB + all DAOs
โ”‚   โ””โ”€โ”€ NetworkModule.kt            # Hilt: OkHttp + Retrofit + ApiService
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ ui/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ theme/
โ”‚   โ”‚   โ”œโ”€โ”€ Color.kt                # Brand colors + category palette (10 colors)
โ”‚   โ”‚   โ”œโ”€โ”€ Theme.kt                # Light/Dark MaterialTheme configuration
โ”‚   โ”‚   โ””โ”€โ”€ Type.kt                 # Typography scale
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ navigation/
โ”‚   โ”‚   โ””โ”€โ”€ AppNavigation.kt        # NavHost + bottom bar + route constants
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ components/              # Reusable Compose components
โ”‚   โ”‚   โ”œโ”€โ”€ TransactionCard.kt      # Swipeable card with delete + edit
โ”‚   โ”‚   โ”œโ”€โ”€ SummaryCard.kt          # Income / expense summary card
โ”‚   โ”‚   โ”œโ”€โ”€ CategoryChip.kt         # Filter chip component
โ”‚   โ”‚   โ”œโ”€โ”€ EmptyState.kt           # Empty state with icon + CTA
โ”‚   โ”‚   โ”œโ”€โ”€ ShimmerEffect.kt        # Loading skeleton for Home screen
โ”‚   โ”‚   โ””โ”€โ”€ SnackbarController.kt   # Centralized snackbar with undo support
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ lock/
โ”‚   โ”‚   โ”œโ”€โ”€ LockScreen.kt           # Biometric lock UI with gradient
โ”‚   โ”‚   โ””โ”€โ”€ BiometricHelper.kt      # BiometricPrompt wrapper
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ home/
โ”‚   โ”‚   โ”œโ”€โ”€ HomeScreen.kt           # Dashboard with all summary cards
โ”‚   โ”‚   โ”œโ”€โ”€ HomeViewModel.kt        # Balance, income, expense, score, forecast
โ”‚   โ”‚   โ””โ”€โ”€ HealthScoreCard.kt      # Animated arc health score component
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ transactions/
โ”‚   โ”‚   โ”œโ”€โ”€ TransactionListScreen.kt    # List with search, filter, swipe-delete
โ”‚   โ”‚   โ”œโ”€โ”€ AddEditTransactionScreen.kt # Full transaction form
โ”‚   โ”‚   โ””โ”€โ”€ TransactionViewModel.kt     # CRUD, filter, search, validation
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ goals/
โ”‚   โ”‚   โ”œโ”€โ”€ GoalsScreen.kt          # Goal list + Add/Edit bottom sheets
โ”‚   โ”‚   โ””โ”€โ”€ GoalViewModel.kt        # Goal progress, alerts, budget calc
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ insights/
โ”‚   โ”‚   โ”œโ”€โ”€ InsightsScreen.kt       # Charts + comparisons + AI tips
โ”‚   โ”‚   โ”œโ”€โ”€ InsightsViewModel.kt    # Weekly/monthly comparisons + API tips
โ”‚   โ”‚   โ””โ”€โ”€ ForecastCard.kt         # Month-end spending projection card
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ ๐Ÿ“ settings/
โ”‚       โ”œโ”€โ”€ SettingsScreen.kt       # Full settings + profile UI
โ”‚       โ””โ”€โ”€ SettingsViewModel.kt    # Preferences + API calls
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ util/
โ”‚   โ”œโ”€โ”€ CurrencyFormatter.kt        # Multi-currency formatting with symbol map
โ”‚   โ”œโ”€โ”€ DateFormatter.kt            # Relative dates, chart labels, epoch utils
โ”‚   โ””โ”€โ”€ Constants.kt                # App-wide constants
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ workers/
โ”‚   โ”œโ”€โ”€ DailyReminderWorker.kt      # WorkManager: 9 PM daily notification
โ”‚   โ””โ”€โ”€ BudgetAlertWorker.kt        # WorkManager: budget threshold alerts
โ”‚
โ”œโ”€โ”€ FinanceApp.kt                   # @HiltAndroidApp + WorkManager config
โ””โ”€โ”€ MainActivity.kt                 # AppCompatActivity + biometric gate

๐Ÿš€ Setup & Installation

Prerequisites

Requirement Version
Android Studio Ladybug / Meerkat (2024.2+)
JDK 17
Android SDK API 35 (compile), API 26 (min)
Gradle 8.7.3

Steps

# 1. Clone the repository
git clone https://github.com/yourusername/finance-app.git
cd finance-app

# 2. Open in Android Studio
# File โ†’ Open โ†’ select the cloned folder

# 3. Wait for Gradle sync
# First sync downloads all dependencies including MPAndroidChart from JitPack
# This may take 2โ€“3 minutes on first run

# 4. Run on device or emulator
# Shift + F10  or  click the green Run button
# Requires Android API 26+ (Android 8.0 Oreo or higher)

First Launch Experience

On first install, the app automatically:

  1. Creates the Room database
  2. Seeds 12 default categories with icons and colors
  3. Seeds 10 demo transactions spread across the past 10 days
  4. All 5 screens have meaningful content immediately โ€” no empty states on first open

Build Variants

# Debug build (default)
./gradlew assembleDebug

# Release build
./gradlew assembleRelease

# Install directly to connected device
./gradlew installDebug

๐Ÿ—ƒ๏ธ Database Schema

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   transactions   โ”‚       โ”‚    categories    โ”‚       โ”‚     goals        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค       โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค       โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ id (PK)          โ”‚       โ”‚ id (PK)          โ”‚       โ”‚ id (PK)          โ”‚
โ”‚ amount           โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ name             โ”‚โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ categoryId (FK)  โ”‚
โ”‚ type (enum)      โ”‚       โ”‚ icon             โ”‚       โ”‚ budgetLimit      โ”‚
โ”‚ categoryId (FK)  โ”‚       โ”‚ colorHex         โ”‚       โ”‚ month            โ”‚
โ”‚ title            โ”‚       โ”‚ isDefault        โ”‚       โ”‚ year             โ”‚
โ”‚ note             โ”‚       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ”‚ createdAt        โ”‚
โ”‚ date (epoch ms)  โ”‚                                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ createdAt        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Constraints:
โ€ข transactions.categoryId โ†’ categories.id (ON DELETE SET DEFAULT)
โ€ข goals.categoryId โ†’ categories.id (ON DELETE CASCADE)
โ€ข One goal per categoryId + month + year (enforced in repository layer)

๐Ÿ’ก Key Design Decisions

1. Room + Flow = Zero Manual Refresh

Every DAO query returns Flow<T>. When a transaction is added, the Flow emits a new value and every screen observing it (Home balance, Transaction list, Insights chart) updates automatically. No LiveData, no manual notifyDataSetChanged(), no polling.

2. Mock API Architecture Mirrors Production

The MockApiInterceptor is a drop-in OkHttp interceptor that returns hardcoded JSON with a 600ms delay. The Retrofit service interface, repositories, ViewModels, and UI have no knowledge of the mock โ€” they consume ApiResult<T> the same way they would with a real API. One line change in NetworkModule.kt connects to production.

3. Biometric Uses AppCompatActivity

BiometricPrompt requires a FragmentActivity. MainActivity extends AppCompatActivity (which extends FragmentActivity) rather than ComponentActivity, enabling native biometric integration without workarounds.

4. DataStore Over SharedPreferences

All user preferences (name, currency, dark mode, biometric toggle, reminder settings) are stored in DataStore<Preferences>. It's type-safe, coroutine-native, and handles concurrent reads without ANR risk โ€” unlike SharedPreferences.

5. Goal Feature: Monthly Budget Per Category

Chosen because it maps directly to real behaviour โ€” people naturally think in monthly budgets per category ("I want to spend max โ‚น5000 on food this month"). It integrates naturally with transaction data, enables the most actionable insight ("you're 80% through your food budget with 12 days left"), and produces the alert system that differentiates the app.

6. Financial Health Score

A composite 0โ€“100 score across three dimensions: savings rate (0โ€“30), budget adherence (0โ€“40), and tracking consistency (0โ€“30). Displayed as an animated arc ring on the Home screen. Gives users a single number to improve โ€” far more actionable than a wall of statistics.

7. Swipe-to-Delete with Undo

Destructive actions must be reversible. Swipe-left-to-delete triggers immediately (for snappy UX) but shows a 5-second undo snackbar that restores the transaction. This follows Material Design's recommended pattern for list item deletion.


๐Ÿ”ฎ What Would Be Added With More Time

  • Recurring transactions โ€” auto-add salary, rent, subscriptions each month
  • Lottie animations โ€” animated illustrations for empty states and onboarding
  • Multi-account support โ€” separate wallets (cash, bank, credit card)
  • Photo receipts โ€” attach camera photos to transactions
  • Budget rollover โ€” unused budget from last month carries forward
  • Data charts export โ€” export insights as PDF report
  • Widget โ€” home screen widget showing current balance
  • Wear OS companion โ€” quick expense logging from the wrist
  • Real backend integration โ€” Spring Boot REST API + JWT auth
  • Google Drive backup โ€” automatic transaction backup to user's Drive

๐Ÿ“‹ Assignment Coverage

Requirement Status Notes
Home Dashboard โœ… Complete Balance, income, expense, chart, savings rate
Transaction Tracking โœ… Complete CRUD, filter, search, swipe-delete, undo
Goal / Challenge Feature โœ… Complete Monthly budget per category with alerts + edit
Insights Screen โœ… Complete 7-day chart, week/month comparison, AI tips
Mobile UX โœ… Complete Empty states, shimmer, transitions, validation
Local Data Handling โœ… Complete Room DB + Flow + DataStore
Code Structure โœ… Complete MVVM + Repository + Hilt DI
Dark Mode โœ… Complete Full dark theme via DataStore
Notifications โœ… Complete WorkManager daily reminder + budget alerts
Animated Transitions โœ… Complete Slide + fade between all screens
Biometric Lock โœ… Complete Fingerprint / PIN on app launch
Data Export โœ… Complete CSV export via FileProvider + share intent
Profile Settings โœ… Complete Name, currency, dark mode, notifications
Offline-First โœ… Complete All core features work without internet
Multi-currency โœ… Complete 8 currencies with live rates from mock API
Mock API Integration โœ… Bonus Retrofit + OkHttp interceptor (not required)
Financial Health Score โœ… Bonus Animated composite score (not required)
Month-End Forecast โœ… Bonus Linear spending projection (not required)

๐Ÿ‘จโ€๐Ÿ’ป Author

Nitish Choubey
๐Ÿ“ง [your.email@example.com]
๐Ÿ”— [github.com/yourusername]
๐Ÿ’ผ [linkedin.com/in/yourusername]


๐Ÿ“„ License

MIT License

Copyright (c) 2026 Nitish Choubey

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

Built with โค๏ธ using Kotlin + Jetpack Compose

Submitted for Zorvyn Mobile Developer Intern Screening โ€” April 2026

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages