{"repo":"IsaacCheng9/fairsplit","free":true,"listed":false,"github":"https://github.com/IsaacCheng9/fairsplit","clone":"git clone https://github.com/IsaacCheng9/fairsplit.git","description":"A web application to split bills and track shared expenses in a group, with a transaction minimisation algorithm. Developed with Node and React.","language":"JavaScript","stars":36,"topics":["bill-splitting","express","expressjs","heuristic","javascript","minimisation","mongodb","node","nodejs","react"],"license":null,"category":"data-pipelines","readme_excerpt":"FairSplit A bill-splitting application to track shared expenses in a group, developed with Node and React. Explanation of Transaction Minimisation Algorithm We implemented a greedy algorithm to minimise the number of transactions required to settle the debts between all members of a group when the user toggles 'Smart Split'. The algorithm runs in O(n log n), where n is the number of users – this means that it scales well with the number of users. A simple example of this algorithm is shown below. In this example, Alice owes Bob £10 and Bob owes Charlie £10 for a total of two transactions. The algorithm will suggest that Alice pays Charlie £10 directly, meaning only one transaction is required to settle the debts. This may seem like a trivial problem to solve, but it becomes more complex as the number of users increases. The following diagram shows a more complex example when there are six users with six transactions between them. This is reduced to only four transactions by the algorithm. Screenshots Installation and Usage Setting up the MongoDB Database 1. Create a file in the server directory with the name: .env 2. Open the file in a text editor (such as Notepad or TextEdit). 3. Add the following line to the file, replacing with the URI of your MongoDB database: 4. Save the file. 5. Optional: add CORS ORIGIN=\" \" if the client is not served from http://localhost:3000 . Running the Server 1. Open a terminal window. 2. Ensure that you're in the root directory: fairsplit 3. Nav","default_branch":null,"files":null,"tree":[],"storefront":"/r/IsaacCheng9","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/IsaacCheng9/fairsplit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}