Skip to content

Commit

Permalink
Merge pull request #51 from BinniesLite/Thanh-update/readme
Browse files Browse the repository at this point in the history
added user, wallet and modified schema
  • Loading branch information
BinniesLite authored Jul 8, 2023
2 parents a6a6381 + d86d028 commit 3260a85
Showing 1 changed file with 93 additions and 22 deletions.
115 changes: 93 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,89 +7,160 @@
- [Backend](#backend)
- [API Documentation](#api-documentation)



## About
Welcome to our personal finance app! Our app is designed to help you manage your finances and achieve your financial goals. We understand that managing your money can be stressful, time-consuming, and confusing, but we believe that it doesn't have to be. Our app provides a simple, user-friendly interface that makes it easy to track your income, expenses, and savings, so you can get a clear picture of your financial health.

Welcome to our personal finance app! Our app is designed to help you manage your finances and achieve your financial goals. We understand that managing your money can be stressful, time-consuming, and confusing, but we believe that it doesn't have to be. Our app provides a simple, user-friendly interface that makes it easy to track your income, expenses, and savings, so you can get a clear picture of your financial health.

## Installation

Run

```bash
git clone https://github.com/BinniesLite/finance_app.git
```

To start the project from the root of the project using Docker Compose, run the command `docker compose up` in your terminal.

Make sure you have Docker and docker compose installed on your machine.
Make sure you have Docker and docker compose installed on your machine.

For front-end navigate to **localhost:80** and for back-end navigate to **localhost:5000**

When adding a new package to the project, delete all images and dockerfile and run `docker compose up --build` to rebuild the images.


## Backend
## Backend

This is the backend of the project. It is a RESTful API built with Node.js and Express.js. It is connected to a PostgreSQL database using Docker.

### API Documentation

#### Transactions
##### Get all transactions
#### User

##### Get all users

```http
GET /api/transactions
GET /api/user
```

##### Get transaction by id
##### Get transaction by email

```http
GET /api/user/email
```

##### Create user

```http
POST /api/user/create
```

##### Update user

```http
GET /api/transactions/${id}
PUT /api/user/email
```

##### Delete user

```http
DELETE /api/user/email
```

#### Wallet

##### Get all wallets

```http
GET /api/wallet
```

##### Get wallet by id

```http
GET /api/wallet/${id}
```

##### Create transaction

```http
POST /api/transactions
POST /api/wallet/create
```

##### Update transaction

```http
PUT /api/transactions/${id}
PUT /api/wallet/${id}
```

##### Delete transaction

```http
DELETE /api/transactions/${id}
DELETE /api/wallet/${id}
```

#### Transaction

##### Get all transactions

```http
GET /api/transaction
```

##### Get transaction by id

```http
GET /api/transaction/${id}
```

##### Create transaction

```http
POST /api/transaction/create
```

##### Update transaction

```http
PUT /api/transaction/${id}
```

##### Delete transaction

```http
DELETE /api/transaction/${id}
```

#### Schema

### Schema
```mermaid
erDiagram
wallet ||--o{ transactions: has
user ||--o{ wallet: has
wallet ||--o{ transaction: has
user {
string email PK
string password
}
wallet {
int ID PK
string user_email FK
string name
float balance
date created_at
string payment_type
}
transactions {
transaction {
int ID PK
int wallet_id FK
string name
float amount
date created_at
date created_at
}
```




## Issues

If you have any issues with the project, please feel free to open an issue on the repo.

0 comments on commit 3260a85

Please sign in to comment.