Splitwise is REST Api based application which provides basic functionalities to split the expenses among individuals and groups. It is build using C# .NET CORE framework and postgres db.
Following Frameworks and technologies are being used
- C# .NET Core
- Postgres
- Fluent Validations
- Postgres
- Install Postgres
- Add Postgres and create database with name splitwiseDB
- Create Postgres DB with name
splitwiseDb
with usernameapp_admin
and password aspostgres
- Execute following commands to create the table
dotnet ef migrations add InitialCreate
dotnet ef database update
GET /user/{userId}
Parameter | Type | Description |
---|---|---|
userId |
string |
* Required. User Id |
Response: |
{
"email": "email@domain.com",
"name": "user_name",
"password": "password",
"phoneNumber": "+91 0123456789"
}
POST /user/
Body Parameter | Type | Description |
---|---|---|
email |
string |
Required. Email Address |
name |
string |
Required. Name |
password |
string |
Required. Password |
phone number |
string |
Required. Phone number |
Example: |
{
"description": "stationary",
"amount": 100,
"paidBy": ["userId1", "userId12"],
"owedBy": ["userId3"]
}
- Create:
POST
/expense
POST /user/
Body Parameter | Type | Description |
---|---|---|
description |
string |
Required. Description |
amount |
number |
Required. Number |
paidBy |
list<string> |
Required. PaidBy |
owedBy |
list<string> |
Required. Owed By |
Example: |
{
"description": "stationary",
"amount": 100,
"paidBy": ["userId1", "userId12"],
"owedBy": ["userId3"]
}
- Get:
GET
/expense/{expenseId}
Parameter | Type | Description |
---|---|---|
expenseId |
string |
* Required. Expense Id |
Response: |
{
"expenseId": "exp-Id",
"description": "stationary",
"amount": 100,
"paidBy": ["userId1", "userId12"],
"owedBy": ["userId3"]
}