This is an app to help track expenses. Users can register and login to track their expenses or login using the demo account.
- React.js
- Node.js
- Postgresql
- Fork and clone the repo
- 'npm install' in the directory
- create the database and run 'npm run migrate' in the database
- m start' or 'npm run dev' to start the server
The app uses GET requests to pull the expense information off the database. POST requests get sent to the database for adding expenses, logging a user in and creating a new user. DELETE requests are called when deleting an expense. In the future I would like to add in PATCH requests for both expenses and userss.
For Posting and Getting user accounts
{
full_name: string,
email_address: email,
username: string,
password: string
}
For Posting, Getting and Deleting expenses
For Posting, Getting and Deleting expenses
{
expense: integer,
description: string,
user_id: integer,
date_created: timestamp,
id: integer
}
For Posting to the Authentication of a user
{
username: string,
password: string
}
/api
.
|-- /auth
| |__ POST
| |-- /login
|-- /users
| |__ GET
| |-- /
| |__ POST
| |-- /
|-- /expenses
| |__ GET
| |-- /
| |-- /:expense_id
| |__ POST
| |-- /
| |__ DELETE
| |-- /:expense_id
/api/auth/login
// req.body
{
username: string,
password: string
}
// res.body
{
authToken: string
}
/api/users
// res.body
{
username: string,
password: string,
full_name: string,
email_address: email
}
/api/users
// req.body
{
username: string,
password: string,
full_name: string,
email_address: email
}
//res.body
{
username: string,
password: string,
full_name: string,
email_address: email
}
/api/expenses
// req.body
{
expense: integer,
description: string,
date_created: timestamp,
id: integer,
user_id: integer
}
// res.body
{
expense: integer,
description: string,
date_created: timestamp,
id: integer,
user_id: integer
}
/api/expenses
//res.body
{
expense: integer,
description: string,
date_created: timestamp,
id: integer,
user_id: integer
}
This is a Minimal Viable Product (MVP)