Skip to content

Personal finance minagement app developed using flutter.

Notifications You must be signed in to change notification settings

whtan410/flutter-pfm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expense Tracker App

A Flutter application for tracking personal expenses with Firebase/Firestore integration.

Prerequisites

  • Flutter SDK installed
  • Android Studio installed and configured
    • Set up Android Emulator or connect physical device
  • Firebase account

Features

  • User Authentication
  • Monthly Budget Setting
  • Expense Tracking by Categories
  • Monthly and Yearly Statistics
  • Real-time Updates
  • Secure Data Storage with Firebase

Instructions

  1. Clone the repository

  2. Install dependencies (bash command: flutter pub get )

Firebase Configuration

  1. Setup Firebase CLI:

    firebase login
    dart pub global activate flutterfire_cli
  2. Configure Firebase:

    flutterfire configure
    • Select your Firebase project when prompted
    • This will automatically configure your app for all platforms (android/ios/web/linux)

    Note: Running this command will generate new Firebase configuration files for your project while preserving the existing project structure. Only Firebase-specific configurations will be updated in:

  • lib/firebase_options.dart
  • web/index.html (Firebase config section)
  • android/app/google-services.json
  • ios/Runner/GoogleService-Info.plist
  1. Enable the following Authentication providers in Firebase Console:
  • Email/Password
  • Google Sign-in Path: Firebase Console > Authentication > Sign-in providers
  1. Add SHA-1 and SHA-256 fingerprints to Firebase Console > Project Settings > Your Android app

    # Method 1: Using projects debug keystore
    keytool -list -v -keystore [project_directory]/android/app/debug.keystore -alias androiddebugkey -storepass android -keypass android 
    
    # Method 2: Using Gradle (alternative)
    cd android
    ./gradlew signingReport
  2. Cloud Firestore rules setup

    rules_version = '2';
    service cloud.firestore {
    match /databases/{database}/documents {
        // Users collection
        match /users/{userId} {
            allow read, write: if request.auth != null && request.auth.uid == userId;
        }
    
    // Expenses collection
    match /expenses/{expenseId} {
      function isOwner() {
        return request.auth != null && 
               resource != null && 
               resource.data.userId == request.auth.uid;
      }
    
      allow create: if request.auth != null && 
                   request.resource.data.userId == request.auth.uid;
      allow read: if request.auth != null;
      allow update, delete: if isOwner();
    }
    
    // Budgets collection
    match /budgets/{budgetId} {
      function isOwner() {
        return request.auth != null && 
               resource != null && 
               resource.data.userId == request.auth.uid;
      }
    
      allow create: if request.auth != null && 
                   request.resource.data.userId == request.auth.uid;
      allow read: if request.auth != null;
      allow update, delete: if isOwner();
    }
    
    
  3. Cloud Firestore Indexes setup

    Collection: `expenses`
    - Index 1:
    - `userId`: Ascending
    - `date`: Descending
    
    - Index 2:
    - `userId`: Ascending
    - `date`: Ascending
    
    - Index 3:
    - `userId`: Ascending
    - `id`: Ascending
    
    Collection: `budgets`
    - Index 1:
    - `userId`: Ascending
    - `date`: Ascending
    
  4. Run the app using the command below.

     flutter run 

    Note: Ensure you have an Android emulator running or physical device connected

End Product

Page 1

  • User Authentication Page
  • Users are able to log in or sign up using Email or Google Authentication.

alt text

Page 2

  • Summary Page
  • Users are able to view or delete their current spending.
  • Users can also add new expenses.

alt text

Page 3

  • Monthly View Page
  • Users are able to set their monthly budget.
  • A progress bar is available to check how much they have spent compared to their budget.
  • Users can also view a breakdown of their expenses by category.

alt text

alt text

Page 4

  • Yearly View Page
  • Users are able to view their yearly spending by category.

alt text

About

Personal finance minagement app developed using flutter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published