Bankie.go
- MacBobby Chibuzor
- Dev log
- July 9, 2023
Table of Contents
Description
Bankie.go is a simple banking application built with Go programming language. It provides basic banking functionalities such as creating accounts, making deposits and withdrawals, and transferring funds between accounts.
Features
Account Management: Users can create new bank accounts and manage their existing accounts. Deposits and Withdrawals: Users can deposit money into their accounts or make withdrawals. Fund Transfers: Users can transfer funds from one account to another. Transaction History: The application maintains a transaction history for each account, allowing users to track their transactions. Installation Bankie.go can be installed using one of the following methods:
Installation with Makefile
To run Bankie.go using the Makefile, make sure you have Go and Make installed on your system. Then, follow these steps:
- Clone the repository:
git clone https://github.com/theghostmac/bankie.go.git
- Navigate to the project directory:
cd bankie.go
- Start the PostgreSQL repository by running the Docker installation below, in another terminal. To start Bankie any time, run:
docker start bankie
- Build and run the application using the
Makefile
:make run
Installation with Docker
To run Bankie.go using Docker, make sure you have Docker installed on your system. Then, follow these steps:
- Clone the repository:
git clone https://github.com/theghostmac/bankie.go.git
- Navigate to the project directory:
cd bankie.go
- Build the Docker image:
docker build -t bankie .
- Run the Docker container:
docker run -p 8080:8080 bankie
Installation by Cloning the Repository
To run Bankie.go by cloning the repository, make sure you have Go installed on your system. Then, follow these steps:
Clone the repository:
git clone https://github.com/theghostmac/bankie.go.git
Navigate to the project directory:
cd bankie.go
Build the application:
go build
Run the application:
./bankie.go
Usage
Once the application is running, you can interact with it using a RESTFul API. The following endpoints are available:
POST /accounts
: Create a new bank account. Provide the account holder’s name and an initial deposit amount.GET /accounts/:id
: Retrieve information about a specific account.POST /accounts/:id/deposit
: Make a deposit to a specific account. Provide the deposit amount.POST /accounts/:id/withdraw
: Make a withdrawal from a specific account. Provide the withdrawal amount.POST /accounts/:id/transfer
: Transfer funds from one account to another. Provide the recipient account ID and the transfer amount.GET /accounts/:id/transactions
: Retrieve the transaction history of a specific account. Make sure to replace:id
with the actual account ID in the endpoint URLs.
Contributing
Contributions to Bankie.go are welcome! If you find any issues or would like to add new features, please feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License.