FairSplit is a modern web application that helps you track group expenses and fairly split payments among friends. Each user can create sessions, record transactions, invite other participants, and finally calculate intermediate or final balances with minimized money transfers.
Free and open source alternative to Splitwise
- Google based login
- Create sessions
- Invite other users on your session
- Add transactions (including easy way to set who paid for whom)
- View intermediate balances per user
- Lock sessions when finished
- View minimized final settlements
- Responsive dark-mode UI with modern "glass" aesthetics
- go (Fiber v3)
- PostgreSQL (with UUIDv7)
- sqlc (type-safe queries)
- templ (templating engine)
- UnoCSS (with Tailwind-compatible reset)
- Alpine.js & HTMX (lightweight interactivity)
- air (live reload during development)
-
Clone the repository:
git clone https://github.com/AlphaByte02/FairSplit.git cd FairSplit -
Start services with Docker Compose:
docker compose up -d --build
This starts:
appon port 8080 (3000 forairwith proxy)postgres(Postgres)admineron port 8081 (Adminer)
-
Apply the migrations in the migration folder
-
Access the app at http://localhost:3000.
-
During development, changes are hot-reloaded automatically via Air.
-
If you run
airon your machine (not docker) you can set the environment variables by copying the.env.examplefile to.envand compile that file as you like -
If you change any .sql files run sqlc to recompile the queries
sqlc generate
-
You can recompile manualy the templ files with:
go tool templ generate
If you use air there is no need to do it yourself (unless you change the files when the service is down)
-
Set the appropiate environment variables in docker-compose.prod.yml. Remember to set the postgres variable with secure value
-
Start the Postgres server
docker compose -f docker-compose.prod.yml up -d postgres
-
Apply the migrations in the migration folder
-
Start services in detached mode (use
--buildonly the first time):docker compose -f docker-compose.prod.yml up -d --build
By default, the app runs on port 8080.
This project is for me a way to learn more about variuos way to do web dev.
If you have any suggestions for improvements, new features, or bug fixes feel free to open a Issue or make a Pull Requests:
- Fork the repo
- Create a new branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request 🎉
Please make sure to update documentation and follow code style conventions.
This project is licensed under the GNU GPLv3 License.