Split!! Mate is an Android app that simplifies splitting expenses among friends and groups, with real-time updates and automatic debt calculations. Built with Java, Firebase Realtime Database, and Firebase Authentication.
- Android Studio (latest version)
- Firebase account (free tier)
- Android device/emulator (API 26+)
git clone https://github.com/NoelRook/SplitMate.git- Go to the Firebase Console.
- Create a new project (e.g.,
SplitMate). - Enable Authentication:
- Go to Authentication → Sign-in Method → Enable Email/Password and Google Sign-In.
- Set Up Realtime Database:
- Go to Realtime Database → Create Database (Start in test mode for development).
- Add these security rules:
{ "rules": { "users": { "$uid": { ".read": "auth != null && auth.uid == $uid", ".write": "auth != null && auth.uid == $uid" } }, "groups": { "$groupId": { ".read": "auth != null && data.child('members').hasChild(auth.uid)", ".write": "auth != null && data.child('members').hasChild(auth.uid)" } } } }
- Register Your Android App:
- Click Project Settings → Add App → Android.
- Package name:
com.example.splitMate(or update it inbuild.gradle). - Download
google-services.jsonand place it inapp/.
- Open the project in Android Studio.
- Sync Gradle and run on an emulator/device.
- Instantly sync expenses across all group members.
- Tech: Firebase Realtime Database listeners.
- Calculates "who owes whom" using optimized algorithms.
- Tech:
DebtCalculator.javawithHashMapaggregation.
- Sign in via Email/Password or Google.
- Tech: Firebase Auth + JWT token validation.
- Works without internet; syncs when reconnected.
- Tech: Firebase’s
keepSynced(true).
- Create groups, add members, and assign expenses.
- Tech: RecyclerView + Firebase adapters.
- Auto-adds GST (9%) or SVC (10%) to expenses.
- Tech:
Nine_GST.java,Ten_SVC.javacalculators.
| Layer | Key Components |
|---|---|
| UI | Activities, Fragments, RecyclerViews |
| Business Logic | DebtCalculator, ExpenseSingleton |
| Data Access | FirebaseDatabaseAdapter, UserAdapter |
| Infrastructure | Firebase Auth, Realtime Database |
- Abstraction:
BaseDatabaseOperationsinterface. - Encapsulation: Private fields + getters/setters in
Expense.java. - Inheritance:
Transaction→Expense/Settlement. - Polymorphism: Generic
FirebaseDatabaseAdapter<T>.
- Multi-Currency Support: For international groups.
- Push Notifications: Remind users of pending debts.
- "Missing google-services.json": Ensure the file is in
app/and the package name matches. - Authentication Failures: Check Firebase Auth settings (e.g., enabled providers).
- Database Permission Denied: Verify security rules in Firebase Console.
MIT © NoelRook
💡 Pro Tip: Use the Debug build variant to see detailed Firebase operation logs!
Let us know if you’d like to contribute or report issues here. Happy splitting! 🎉