The back-end of the BillRift app
- Start the mongo db instance
$ mongod
- Run the server
$ npm run dev
Group:
- id : Number,
- name : String,
- userIds : Array
User:
- name : String,
- googleId : String,
- groupIds: Array
Transaction:
- id : Number
- userFromId : String
- userToId : String
- amount : Number
Balance (Only as contract with application, doesn't have to be implemented as persistent model on backend):
- from : String
- to : String
- amount : Number
- groupId : Number
pass in idToken as auth-token=<token> in header to all of the endpoints to authenticate
all post "query parameters" are actually parameters in request body
GET /groups - Get the list of group objects. --DONE
POST /group?name={groupName} - add a new group to the user --DONE
GET /group/:id/balances - Get the list of balances for a group identified by id. --BLOCKED TOO HARD
GET /group/:id/transactions - Get the list of transactions for a group identified by id. --DONE
GET /group/:id/users - Get the lits of users from a group identified by id --DONE
POST /group/:id/user?email={email} - add a user to a group --DONE
POST /group/:id/transaction - add a new transaction to the group. --DONE
GET /user - test API to return all users --DONE
POST /user/login - log in --DONE