Home
Softono
i

isaaccheng9

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
2

Software by isaaccheng9

fairsplit
Open Source

fairsplit

# FairSplit [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) ![test](https://github.com/IsaacCheng9/fairsplit/actions/workflows/test.yml/badge.svg) 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. ![FairSplit - Minimising Transactions@2x Simple](https://user-images.githubusercontent.com/47993930/193157219-12522cfb-f831-48d3-9140-bf1cab09d3b5.png) 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. ![FairSplit - Minimising Transactions@2x](https://user-images.githubusercontent.com/47993930/193157096-98f00f14-8548-4093-a213-8e8975a6e036.png) ## Screenshots ![Screenshot 2022-09-30 at 00 23 22](https://user-images.githubusercontent.com/47993930/193159080-2e312e29-a5a1-4f75-afa5-dbd22d45cd9c.jpg) ![Screenshot 2022-09-30 at 00 23 52](https://user-images.githubusercontent.com/47993930/193159103-97d5e28d-e330-4804-a0b8-d3e3ece88747.jpg) ![Screenshot 2022-09-30 at 00 27 59](https://user-images.githubusercontent.com/47993930/193159498-3b7ba9de-e972-4425-85ae-34c6abfdb838.jpg) ![Screenshot 2022-09-30 at 00 29 59](https://user-images.githubusercontent.com/47993930/193159686-2ffb1f4d-e09b-4325-9056-be97ca315a10.jpg) ## 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 `<uri>` with the URI of your MongoDB database: ```txt MONGODB_URI="<uri>" ``` 4. Save the file. 5. Optional: add `CORS_ORIGIN="<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. Navigate to the server directory: `cd server` 4. Install dependencies: `npm install` 5. Run the server: `npm start` ### Running the Client 1. Open a new terminal window (separate to the previous one). 2. Ensure that you're in the root directory: `fairsplit` 3. Navigate to the server directory: `cd client` 4. Install dependencies: `npm install` 5. Run the client: `npm start` 6. Browse to the URL provided in the terminal window. ## Running Tests ### Running Tests on the Server 1. Open a terminal window. 2. Ensure that you're in the root directory: `fairsplit` 3. Navigate to the server directory: `cd server` 4. Install dependencies: `npm install` 5. Run the unit tests: `npm test` ## Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. For more information, please see the [Contributing Guide](CONTRIBUTING.md).

Personal Finance
36 Github Stars
trading-portfolio-tracker
Open Source

trading-portfolio-tracker

# Trading Portfolio Tracker [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Test](https://github.com/IsaacCheng9/trading-portfolio-tracker/actions/workflows/test.yml/badge.svg)](https://github.com/IsaacCheng9/trading-portfolio-tracker/actions/workflows/test.yml) A cross-platform desktop application for monitoring and managing your investments from different brokers, with real-time market data integration from Yahoo Finance. Developed with Qt. ## Motivation Managing investments across different brokers can be challenging, as existing broker-specific systems such as Trading 212 often limit users to viewing investments exclusively within their own platforms. This leads to scattered investment information and a lack of holistic oversight. While some users resort to manual data entry in spreadsheets, this approach lacks real-time market data and user-friendliness. This application offers a centralised solution for monitoring and managing investments across different brokers. By providing real-time market data integration and a user-friendly interface, it enhances the investment management experience. Additionally, as a desktop application, it prioritises data privacy by storing all information locally on the user's computer. Leveraging the Qt framework ensures cross-platform compatibility and high performance. ## Screenshots ![image](https://github.com/IsaacCheng9/trading-portfolio-tracker/assets/47993930/d572dea0-133c-4369-b45f-d497a782dd13) ![image](https://github.com/IsaacCheng9/trading-portfolio-tracker/assets/47993930/48c23b13-45cf-4fb5-a87e-21d5d57e86e9) <img src="https://github.com/IsaacCheng9/trading-portfolio-tracker/assets/47993930/7ffc058c-39fe-404c-a3ac-58d4d7120bef" alt="Add a Transaction" width="400"> <img src="https://github.com/IsaacCheng9/trading-portfolio-tracker/assets/47993930/8067a5d0-f7c6-4cc5-ad00-20ccbf9d0e50" alt="Add a Transaction" width="700"> ## Usage ### Operating System Compatible with: - macOS - Windows <!-- Test Linux compatibility with PyQt6, as Linux doesn't work with PySide6. --> ### Installing Dependencies Run the following command from the [project root](./) directory: ```bash poetry install ``` ### Running the Application Run the following command from the [project root](./) directory: ```bash poetry run app ``` ### Running Tests Run the following command from the [project root](./) directory: ```bash poetry run pytest ``` ### Importing and Exporting Databases DuckDB uses a binary file format which is inefficient, not human-readable, and leads to merge conflicts, so we avoid version controlling the database file directly. Instead, we store the data and schema of the database in the folder [/resources/portfolio_data/](/resources/portfolio_data/) -- this gives us human-readable, merge-friendly files that we can easily version control. To **import** the database, run the following command from the [project root](./) directory: ```bash poetry run export_db ``` To **export** the database, run the following command from the [project root](./) directory: ```bash poetry run import_db ``` Note that importing the database won't work if [/resources/portfolio.db](./resources/portfolio.db) already exists – you must rename it, move it, or delete it before importing. ## Data Privacy We store all data locally on the user's computer in a DuckDB database at [/resources/portfolio.db](./resources/portfolio.db). Live market data is fetched from Yahoo Finance, but we do not store any of this data permanently.

Personal Finance
14 Github Stars