https://github.com/binaryleo/nodejs_financial_api
A Node JS application to manage financial data
https://github.com/binaryleo/nodejs_financial_api
express http-requests json middleware nodejs nodemon uuid-v4
Last synced: 4 months ago
JSON representation
A Node JS application to manage financial data
- Host: GitHub
- URL: https://github.com/binaryleo/nodejs_financial_api
- Owner: BinaryLeo
- License: mit
- Created: 2022-07-06T01:50:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T19:40:37.000Z (almost 3 years ago)
- Last Synced: 2025-02-02T08:15:07.570Z (5 months ago)
- Topics: express, http-requests, json, middleware, nodejs, nodemon, uuid-v4
- Language: JavaScript
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nodejs_financial_api
A Node JS application to manage financial data (Stored in memory)
Technologies |
Requirements |
Business Rules |
How to use |
Endpoints |
License## 🧪 technologies
This project was built using the following technologies and features:
- [Node.js](https://nodejs.org/en/)
- [Express](http://expressjs.com/)
- [Visual Studio Code](https://code.visualstudio.com/)
- [Insomnia](https://insomnia.rest/)## 🧪 requirements
* [NodeJs](https://nodejs.org/en/)
* [Yarn](https://classic.yarnpkg.com/) or [npm](https://www.npmjs.com/package/npm)- [x] It must be possible to create an account.
- [x] It must be possible to fetch the customer's bank statement.
- [x] It must be possible to make a deposit.
- [x] It must be possible to withdraw.
- [x] It must be possible to search for the customer's bank statement by date.
- [x] It should be possible to update customer account data.
- [x] It must be possible to obtain customer account data.
- [x] It should be possible to delete an account.
- [x] It must be possible to return the balance.## 🧪 business_rules
- [x] It should not be possible to register an account with an existing SIN number (Social Insurance Number).
- [x] It should not be possible to fetch a statement from a non-existing account.
- [x] It should not be possible to deposit to a non-existing account.
- [x] It should not be possible to withdraw from a non-existing account.
- [x] It should not be possible to withdraw when the balance is insufficient.
- [x] It should not be possible to delete a non-existing account.## 💡 how to use
Clone the repository.
- Open the project from your IDE.**Follow the steps below**
```bash
# Install the dependencies
$ yarn
$ npm i# Start the app
$ yarn dev
$ npm run dev
```## 💡 endpoints
- POST /account
```json
{
"sin": 1-123-456-7890,
"name":"your name",
}
```
-----
- POST /deposit

Header sin: 1-123-456-7890
```json
{
"description":"Account Transfer In",
"amount":4800.00
}
```
-----
- GET /statement

Header sin: 1-123-456-7890
-----
- GET /statement/date

Header sin: 1-123-456-7890
Query MonthDayYear: July 15, 2022 e.g-----
- POST /withdraw

Header sin: 1-123-456-7890
```json
{
"amount": 500
}
```
-----
- GET /balance

Header sin: 1-123-456-7890
-----
- PUT /account

Header sin: 1-123-456-7890
```json
{
"name":"Luigi",
}
```
------ DELETE /account

Header sin: 1-123-456-7890
-----
## 📄 LicenseThis project was built under MIT. See the file [LICENSE](LICENSE) for more details.
---