Skip to content

Importantus/coinsaw

Repository files navigation

The logo of the coinsaw app

Coinsaw

Expense splitting for groups. Nothing more.

GitHub Actions Workflow Status GitHub release (latest by date) GitHub

Warning

This app is still under heavy development and not ready for production use!

Coinsaw is an app used to track and split expenses within groups. It works fully offline but allows for optional synchronization with a server.

I built this app mainly to learn Jetpack Compose and as an alternative to Splitwise (which costs money since autumn 2023).

Mockup_Coinsaw

How it works

The app is organized in groups. You can create a group and add as many members as you want. These users are not linked to an account and are scoped to the group. You can then add expenses to the group and split them between the members. The app will calculate how much each member owes the others. That's basically it.

Sync

Whenever you perform actions in a group (add a member, rename the group, or add or edit an expense), it updates the local database (as you would know from other apps). Each of these actions is also saved in a changelog. When you sync the group, the app will send the changelog to the server and download the changelog of the other members. This way, the app can merge the changes and keep the data in sync.

Server

You can find the server here. Since I don't have the resources or legal knowledge to run a public server, I can't provide a public instance. However, you can easily run your own instance with Docker. You can set the server URL per group when you enable syncing.

Auth

As mentioned earlier, the app doesn't require an account. Instead, when you enable syncing, you can create share tokens that you can share with other members. These tokens are used to create new sessions that then authenticate the clients. You can set per share token how often it can be used and if the sessions that are created with it are admin sessions. Admin sessions can edit the group, add or remove shares, and manage other sessions.

Development

The app is built with Jetpack Compose and uses Room for the database. It also uses Hilt for dependency injection. The app is built with a MVVM architecture in mind.

Release

When you want to create a new release, follow these steps:

  1. Update the versionName (e.g. 1.2.3) and increase the versionCode (e.g. 3) in app/build.gradle.kts
  2. Commit that change (git commit -am v1.2.3)
  3. Tag the commit (git tag v1.2.3). Make sure your tag name's format is v*.*.*
  4. Push the changes to GitHub (git push && git push --tags)
  5. Edit and publish the release draft created by the workflow in GitHub

After building successfully, the action will publish the release artifacts in a new release draft that will be created on GitHub with download links for the app.

Contributing

If you wish to contribute, feel free to open an issue or a pull request. I appreciate any help and tips, especially since this is my first project for Android. If you want to contribute to the server, you can find the repository here.

Encryption

I want to add end-to-end encryption to the app, but I'm unsure how to do it securely. I lack expertise in security and don't want to implement something that is not secure. If you have any ideas or would like to help, please open an issue or a pull request.