I’ll be building a simplified Splitwise Clone that helps users track shared expenses and determine who owes whom. The core features include group creation, expense splitting, and balance tracking.
The backend will manage group creation, expense tracking, and balance calculation.
- POST /groups: Create a new group with a name and a list of user IDs.
- GET /groups/{group_id}: Retrieve details of a group (name, users, total expenses).
-
POST /groups/{group_id}/expenses: Add a new expense to a group.
-
Input: description, amount, paid_by (user_id), split_type (equal or percentage), splits.
-
Support two split types:
- Equal: Split the amount equally among group members.
- Percentage: Split the amount based on the percentages provided for each member.
-
- GET /groups/{group_id}/balances: View who owes whom in a group.
- GET /users/{user_id}/balances: View the balance summary for a specific user across all groups.
- No authentication/authorization required.
- No payment/settlement functionality.
- Use MySQL as the database for persistence.
- Use Spring Data JPA or any other ORM of your choice to interact with the database.
The frontend will interact with the backend APIs to provide a clean, user-friendly interface.
- Create a group with a list of users.
- Add expenses to the group with equal or percentage-based splits.
- View a summary of group balances (who owes whom).
- View a personal balance summary for a user.
The UI should be designed with TailwindCSS and should interact with the backend APIs to fetch and display the relevant data.
Enhance the user experience by adding an AI chatbot that can interpret natural language queries related to expenses and balances.
- “How much does Alice owe in group Goa Trip?”
- “Show me my latest 3 expenses.”
- “Who paid the most in Weekend Trip?”
- Integrate with an LLM (e.g., OpenAI or HuggingFace API).
- Send user queries along with relevant data from the database to the LLM.
- Display the chatbot’s response cleanly within the app.
-
GitHub Repository with the following structure:
- back/SplitWise: Spring Boot application.
- front/: React application.
- docker-compose.yml: To set up and run the full stack locally.
-
README.md with:
- Detailed setup and run instructions.
- API documentation (either OpenAPI or manually listed endpoints).
- Any assumptions or decisions made during development.
-
Clone the repository.
-
Navigate to the backend/ directory.
-
Build the Spring Boot project using Maven or Gradle:
mvn clean install
-
Configure your application.properties or application.yml with MySQL connection details.
-
Run the Spring Boot app:
mvn spring-boot:run
-
The backend will be available at http://localhost:8080.
-
Clone the repository.
-
Navigate to the frontend/ directory.
-
Install dependencies:
npm install
-
Start the React app:
npm start
-
The frontend will be available at http://localhost:3000.
-
Ensure Docker is installed and running on your machine.
-
Clone the repository.
-
Run the following command to set up the full stack:
docker-compose up
-
The full stack will be available at:
- Backend: http://localhost:8080
- Frontend: http://localhost:3000
-
POST /groups Body:
{ "name": "Group Name", "users": [1, 2, 3] }Response:
{ "group_id": 1, "name": "Group Name", "users": [1, 2, 3], "total_expenses": 0 } -
GET /groups/{group_id} Response:
{ "group_id": 1, "name": "Group Name", "users": [1, 2, 3], "total_expenses": 100 }
-
POST /groups/{group_id}/expenses Body:
{ "description": "Dinner", "amount": 100, "paid_by": 1, "split_type": "equal", "splits": [33, 33, 34] }Response:
{ "expense_id": 1, "group_id": 1, "description": "Dinner", "amount": 100, "paid_by": 1, "splits": [33, 33, 34] }
-
GET /groups/{group_id}/balances Response:
{ "balances": [ {"user_id": 1, "amount": 33}, {"user_id": 2, "amount": -33}, {"user_id": 3, "amount": 0} ] } -
GET /users/{user_id}/balances Response:
{ "balances": [ {"group_id": 1, "amount": 33}, {"group_id": 2, "amount": -20} ] }
We appreciate your interest in contributing to the Splitwise Clone project! Here's how you can contribute:
-
Fork and Clone the Repository
-
Fork the repository by clicking the Fork button on the top right of the repository page on GitHub.
-
Clone your forked repository to your local machine using:
git clone https://github.com/kiranraoboinapally/splitwise.git
-
-
Create a New Branch
-
After cloning, navigate into the project directory:
cd splitwise -
Create a new branch for your changes:
git checkout -b mod
-
-
Make Your Changes
- Implement the desired features or fixes in the backend (Spring Boot + MySQL) or frontend (React + TailwindCSS).
-
Stage and Commit Your Changes
-
After making changes, stage and commit them:
git add . git commit -m "Added feature for group creation"
-
-
Push Changes to Your Fork
-
Push your changes to your forked repository:
git push origin mod
-
-
Create a Pull Request (PR)
- Go to your forked repository on GitHub and click Compare & Pull Request.
- In your PR description, include what you’ve done and link to any related issues (e.g.,
Closes #2).
-
Wait for Review and Merge
- After submitting the PR, it will be reviewed and merged if everything looks good.
- No authentication/authorization: This project does not require user login or security.
- No real-time updates: The system doesn’t implement WebSocket or any real-time mechanisms.
- No payment gateway integration: This project is focused only on tracking shared expenses.
We appreciate your help in improving the Splitwise Clone project! If you have any questions or need assistance, please feel free to open an issue or contact us directly.