A simple project that allows friends share bills together.
For Context: A user can # and create a group by adding others through their emails. Users can check what groups they are part of and donate money towards the group's money goals.
- Have Git and Node.js installed on your computer.
- Clone the repo.
- cd into the project and cd into both
backend
andfrontend
folders to install the dependencies usingnpm install
. - In the
backend
folder, remember to migrate and seed important files usingnpm run migrate
andnpm run seed
. - Create a .env file in the backend folder and add the necessary variables following the .env.sample format.
- Run
npm run start:dev
to start the backend server. - Run
yarn start
to power the frontend. - Run
npm run test
to run tests for the backend server
For backend using Heroku - https://bsa-backend.herokuapp.com/ For frontend using Netlify - https://bsa-fibre.netlify.app/
- JavaScript & Node.js & Expressjs
- React with Ant design, Material UI
- Postgres
- ElephantSQL
- Netlify
- Heroku
- Travis CI
- Code Climate
- Open Peeps
SECRET=
DEV_DATABASE_URL = postgres://<pg-user>:<pg-pass>@localhost:5432/<pg-database>
TEST_DATABASE_URL = postgres://<pg-user>:<pg-pass>@localhost:5432/<pg-database>
POST localhost:3000/api/v1/auth/user
{
"email": "funmi@google.com",
"password": "fff.H7",
"firstName": "Funmilayo",
"lastName": "Olaiya"
}
POST localhost:3000/api/v1/auth/signin
{
"email": "funmi@google.com",
"password": "fff.H7"
}
GET localhost:3000/api/v1/account
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
PATCH localhost:3000/api/v1/account
{
"firstName": "Funmilayto",
"lastName": "Olaiya",
"currency": "USD"
}
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
PATCH localhost:3000/api/v1/add-money
{
"balance": 0 // get the present balance you have
"amount": 5000.00,
}
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
Note: if you are creating a group, make sure to add your email too.
POST localhost:3000/api/v1/create-group
{
"emails": ["dele@google.co", "feyi@gmail.co", "ufuoma@gmail.com"],
"category": "Functions",
"name": "Money Movers",
"description": "Let us donate to give Bayo a brand new car.",
"goalBalance": 500.00, // the exact money you wish to accumulate
}
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
PATCH localhost:3000/api/v1/group/:id
{
"emails": ["dele@google.co", "feyi@gmail.co", "ufuoma@gmail.com"],
"category": "Functions",
"name": "Money Movers",
"description": "Let us donate to give Bayo a brand new car.",
"goalBalance": 1000.00, // the exact money you wish to accumulate
}
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
GET localhost:3000/api/v1/group/:id
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
GET localhost:3000/api/v1/groups
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
GET localhost:3000/api/v1/groups
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
GET localhost:3000/api/v1/group?email=
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
PATCH localhost:3000/api/v1/group/add-money/:id
{
"balance": 4600.00,
"goalBalance": 2000.00,
"groupBalance": 700.00,
"amount": 400.00
}
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
DELETE localhost:3000/api/v1/group/:id
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
GET localhost:3000/api/v1/history
Note: copy the token
gotten from the #/in response and add it to the Bearer token
field in postman.
- To #:
localhost:8080/api/v1/sign-up
- To #:
localhost:8080/api/v1/sign-in
- To view a user dashboard after signing up/in:
localhost:8080/api/v1/dashboard
- For user to make simple settings:
localhost:8080/api/v1/settings
- For user to check all groups they have created:
localhost:8080/api/v1/groups
- For user to check all groups they have been added to/part of:
localhost:8080/api/v1/groups/:email
- For user to get just one group:
localhost:8080/api/v1/one-group/:id
- For user to deposit money to personal account:
localhost:8080/api/v1/add-money/:id
- For user to deposit money to group:
localhost:8080/api/v1/group-money/:id
- For user to get transaction logs:
localhost:8080/api/v1/history