Skip to content

About

High-performance offline-first split-bill engine applying greedy algorithms to minimize cash flow paths.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Group Expense & Split-Bill Engine

A high-performance, algorithmic financial tracker designed to instantly simplify and optimize shared group debts. By leveraging complex graph theory and dynamic cash-flow routing, this platform reduces chaotic group expenses into the absolute minimum number of required transactions, wrapped entirely within a premium, finance-focused mobile interface.

Tech Stack

  • Frontend: React Native, TypeScript, Expo, @react-navigation/native-stack
  • Backend: Go (Golang)

Architecture Highlights

Backend: Debt Optimization Algorithm Engine

The Go backend is engineered to handle intensive mathematical computations over complex user relationships in real-time.

  • Greedy Minimum Cash-Flow Algorithm: Rather than relying on simple 1:1 ledgers, the API aggregates total net balances across all group participants and iteratively matches the maximum debtors against the maximum creditors. This graph-theory approach guarantees the mathematically minimal number of transactions required to settle up.
  • Concurrency & Mutex Protection: All global expense arrays and balance ledgers are strictly guarded by sync.Mutex locks, ensuring absolute data integrity during simultaneous high-frequency expense inputs.

Frontend: Strict MVVM Pattern & Native Modal Flows

The mobile application strictly adheres to the Model-View-ViewModel (MVVM) architectural pattern to effortlessly scale complex financial states.

  • Absolute Separation of Concerns: UI components (Views) are completely devoid of business logic, acting purely as consumers of state and transaction mappings.
  • Dynamic Interaction Layer: The ExpenseViewModel processes backend algorithms and orchestrates interactive Native Stack Modals over traditional Bottom Tabs, allowing users to dynamically switch between "Even Splits" and precise "Exact Amounts" flows.

Run Instructions

1. Start the Backend

Navigate to the backend/ directory and run the Go server:

cd backend
go run .

The server will initialize the Financial Engine and listen on localhost:8080.

2. Start the Frontend

In a new terminal window, navigate to the frontend/ directory and start the Expo app:

cd frontend
npx expo start

Use the Expo Go app on your physical device, or run it on an iOS Simulator or Android Emulator.

Author

Roshaan Zaffar

About

High-performance offline-first split-bill engine applying greedy algorithms to minimize cash flow paths.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages