App to split money between friends and family. Based on the Splitwise app.
- Ensure go is installed on your machine
- Next, clone this repository and
cd
into it - Copy the contents of
.env.example
into a new file called.env
and fill in the required values
It is recommended to use docker to run the app. If you don't have docker installed, you can install it from here
You can use docker to run the app or run it directly on your machine.
- Run
./start.sh
to start the server - Ensure to run
chmod +x start.sh
if you get a permission error - Ensure that the
docker-compose
plugin is in the same path mentioned in thestart.sh
file
- Run
make run
to start the server
GET /health_check
A simple API to test out whether the server is up and running.
GET /health_check_auth
Headers:
Authorization: <token>
A simple API to test out whether you are authorized.
POST /auth/register
body: {
name: string
"email": string,
"password": string
}
}
Endpoint to register a new user. Ensures that the user with same email is not already registered and then creates a new user with a Status Accepted
response.
{
"id": string
}
POST /auth/login
body: {
"email": string,
"password": string
}
Endpoint to login a user. Returns a JWT token which can be used to authenticate the user for other APIs.
{
"token": string
}
POST /auth/logout
Endpoint to log user out. Deletes JWT token from redis db to invalidate token.
{
"message": "ok"
}
POST /group/newGroup
{
"group_name": string,
"simplify_txn": bool
}
Endpoint to create new group. Returns newly created group ID.
{
"id": string
}
- Add jwt redis authentication
- Add refresh token functionality
- Endpoints to
- Create a group
- Add a user to a group
- Manage and view expenses
- View balances