Skip to content

awais-124/khata_tracker

Repository files navigation

Khata Tracker 💰

Flutter Firebase License

A cross-platform debt management app built with Flutter & Firebase. Track loans, credit, and payments seamlessly across Android, iOS, and Web.

Features ✨

  • 🔐 Secure authentication (Email/Google)
  • 📝 Record debts with details (amount, date, witness)
  • 🔍 Search & filter by person/status
  • 📊 Monthly debt summaries
  • 🎨 Dark/Light theme support
  • 📄 Export transactions to PDF
  • 🔔 Payment reminders

Tech Stack 🖪️

  • Frontend: Flutter 3.16
  • Backend: Firebase (Auth, Firestore)
  • State Management: Provider
  • PDF Generation: pdf package
  • Notifications: flutter_local_notifications

Screenshots 📱

Login Screen Debt List Add Transaction

Installation 🚀

Prerequisites

  • Flutter SDK (>=3.16.0)
  • Firebase account
  • Android Studio/Xcode (for mobile builds)

1. Clone the Repository

git clone https://github.com/awais-124/khata_tracker.git
cd khata_tracker

2. Firebase Setup

Create a new Firebase project at console.firebase.google.com

Enable these services:

  • Authentication (Email/Password + Google)
  • Firestore Database (Start in test mode)

3. Configure FlutterFire

# Install FlutterFire CLI
dart pub global activate flutterfire_cli

# Run configuration (select platforms: Android, iOS, Web)
flutterfire configure

4. Install Dependencies

flutter pub get

5. Running the App ▶️

Web Development

flutter run -d chrome

Android Build

flutter build apk --release
# APK location: build/app/outputs/flutter-apk/app-release.apk

iOS Build (Mac Only)

flutter build ios
open ios/Runner.xcworkspace

Project Structure 📂

lib/
├── core/               # Business logic & utilities
│   ├── constants/      # App constants
│   ├── services/       # Firebase services
│   └── utils/          # Helper functions
├── features/           # Feature modules
│   ├── auth/           # Authentication
│   ├── debts/          # Debt management
│   └── settings/       # User settings
├── shared/             # Reusable components
│   ├── models/         # Data models
│   └── widgets/        # Custom widgets
└── main.dart           # App entry point

Environment Variables 🔒

Create .env file in root (add to .gitignore):

FIREBASE_API_KEY=your_api_key
FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
FIREBASE_PROJECT_ID=your_project_id

Common Issues & Fixes ⚠️

1. Firebase Not Initialized

# Ensure you've run:
flutterfire configure

2. Web CORS Errors

Update Firestore rules (for dev only):

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

Contributing 🤝

  1. Fork the repository
  2. Create a new branch
git checkout -b feature/your-feature
  1. Commit your changes
git commit -m "Add some feature"
  1. Push to the branch
git push origin feature/your-feature
  1. Open a Pull Request

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

Need Help?

Contact @awais-124 or open an issue in the repository.


About

A Flutter app for managing your debts and be reminded to pay in time.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published