Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T19:40:37.000Z (over 2 years ago)
- Last Synced: 2023-03-05T13:34:20.809Z (almost 2 years ago)
- Topics: express, http-requests, json, middleware, nodejs, nodemon, uuid-v4
- Language: JavaScript
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- 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
![create](https://user-images.githubusercontent.com/72607039/179602602-e092ee6e-dd3c-408e-80bb-0910e218731b.JPG)```json
{
"sin": 1-123-456-7890,
"name":"your name",
}
```
-----
- POST /deposit
![deposit](https://user-images.githubusercontent.com/72607039/179602679-107e6209-1640-4d45-8b60-f3234024bc6f.JPG)
Header sin: 1-123-456-7890
```json
{
"description":"Account Transfer In",
"amount":4800.00
}
```
-----
- GET /statement
![statement](https://user-images.githubusercontent.com/72607039/179602824-209dbd72-da57-426c-bbeb-809dc76802b9.JPG)
Header sin: 1-123-456-7890
-----
- GET /statement/date
![bydate](https://user-images.githubusercontent.com/72607039/179602872-71c865f1-ff94-40a5-bcdf-c1236b99ad6e.gif)
Header sin: 1-123-456-7890
Query MonthDayYear: July 15, 2022 e.g-----
- POST /withdraw
![withdraw](https://user-images.githubusercontent.com/72607039/179602923-5b611b17-04a9-4f3c-b6c1-e4318d3cf4ff.JPG)
Header sin: 1-123-456-7890
```json
{
"amount": 500
}
```
-----
- GET /balance
![balance](https://user-images.githubusercontent.com/72607039/179602948-48041616-3d1a-4854-88a2-3868bc5de5d9.JPG)
Header sin: 1-123-456-7890
-----
- PUT /account
![putdata](https://user-images.githubusercontent.com/72607039/179602964-28511584-d4d5-462a-b22c-00b716cdda2a.JPG)
Header sin: 1-123-456-7890
```json
{
"name":"Luigi",
}
```
------ DELETE /account
![delete](https://user-images.githubusercontent.com/72607039/179603016-16214939-85d0-410e-b1ce-9b309d03613b.JPG)
Header sin: 1-123-456-7890
-----
## 📄 LicenseThis project was built under MIT. See the file [LICENSE](LICENSE) for more details.
---