Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #58

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 94 additions & 23 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
#### User

##### Get all users

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

##### Get transaction by email

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

##### Create user

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

##### Update user

```http
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 wallet

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

##### Update wallet

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

##### Delete wallet

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

#### Transaction

##### Get all transactions

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

##### Get transaction by id

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

##### Create transaction

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

##### Update transaction

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

##### Delete transaction

```http
DELETE /api/transactions/${id}
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.