Skip to content

hamomgs/digital-bank-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Idioma: bandeira do brasil

Digital Bank API

GitHub language count Repository size GitHub last commit License

💻 About the Project

This project, part of a challenge proposed by Cubos Academy, aims to create an API for a digital bank with various banking functionalities, such as account opening, transactions, and balance inquiries.


🛣️ How to Run the Project

Follow these instructions to run the project in your local environment.

🚀 Pre-requisites

  • You'll need Git and Node.js installed on your computer to build this app.
  • Additionally, having an editor like VSCode for coding is quite advantageous.

🎲 Building

# Clone the project and access the folder
$ git clone https://github.com/hamomgs/digital-bank-api.git
$ cd digital-bank-api

# Install the dependencies
$ npm install

# Run the application in development mode.
$ npm run dev

# The application will be accessible on port:3000 via http://localhost:3000.

Run in Insomnia


📚 API Reference

Base URL

http://localhost:3000/api

🧩 Endpoits

Accounts

  • GET /contas?senha_banco=Cubos123Bank: List all accounts.
  • POST /contas/: Create a new account.
  • PUT /contas/:numeroConta/usuario: Update account information.
  • DELETE /contas/:numeroConta: Delete an account.
  • GET /contas/saldo?numero_conta=123&senha=123: Get account balance.
  • GET /contas/extrato?numero_conta=123&senha=123: Get account statement.

Transactions

  • POST /transacoes/depositar: Make a deposit.
  • POST /transacoes/sacar: Make a transfer.
  • POST /transacoes/transferir: Make a withdrawal.

📂 Directory Structure

digital-bank/
├── node_modules/
├── src/
│   ├── controllers/
│   │   ├── accountsController.js
│   │   └── transactionsController.js
│   ├── middlewares/
│   │   └── validatePassword.js
│   ├── routes/
│   │   ├── accountsRoutes.js
│   │   ├── index.js
│   │   └── transactionsRoutes.js
│   ├── database.js
│   └── index.js
├── .gitignore
├── LICENCE
├── package-lock.json
├── package.json
└── README.md

🛠 Technologies

📝 License

This project is under the license MIT.

Made with 🧡 by Hamom Silva 👋🏽 Get in Touch!

About

Digital Bank API with Node.js and Express.js

Topics

Resources

License

Stars

Watchers

Forks