Coder Social home page Coder Social logo

go_bank_backend's Introduction

Bank Backend with Go Lang (Gin-Gonic)

Welcome to the Bank Backend built with Go Lang using the Gin-Gonic framework and a PostgreSQL database. This backend serves as the foundation for a banking application, providing essential functionality for managing accounts, transactions, and user data. This README provides a guide on setting up and using the backend.

Table of Contents

Features

  • User Management: Create, update, and delete user accounts.
  • Account Management: Add, view, and manage bank accounts for users.
  • Transaction Handling: Record and manage transactions between accounts.
  • Security: Protect sensitive data with encryption and authentication.

Prerequisites

Before setting up the Bank Backend, ensure you have the following prerequisites installed:

  • Go Lang: Go programming language.
  • PostgreSQL: PostgreSQL database server.
  • Git: Version control tool.

Installation

  1. Clone this repository:

    git clone https://github.com/kingsleyocran/go-bank-backend.git
    cd bank-backend
  2. Create a PostgreSQL database for the application. You can use the PostgreSQL command line or a GUI tool like pgAdmin to create a database and user with appropriate privileges.

  3. Set up environment variables. Create a .env file in the root directory with the following content:

DB_DRIVER=postgres DB_SOURCE=postgresql://root:secret@localhost:5432/simple_bank?sslmode=disable SERVER_ADDRESS=0.0.0.0:8080


Replace the placeholders with your database and secret key information.

4. Install required Go packages:

```bash
go mod tidy

Usage

  1. Start the application:

    go run main.go

    The server should now be running at http://localhost:8080.

  2. Access the API endpoints using an API client like Postman or curl. Refer to the API documentation for available endpoints and request formats.

API Documentation

The Bank Backend provides a comprehensive API for managing user accounts, bank accounts, and transactions. You can access the API documentation by navigating to http://localhost:8080/swagger/index.html when the application is running.

Project Structure

  • main.go: Application entry point.
  • db: Database interaction logic, models and schemas.
  • api: API routes and middleware.
  • utils: Utility functions and helper methods.

Contributing

Contributions to this project are welcome. Feel free to open issues and pull requests to help improve the Bank Backend.

License

This Bank Backend is open-source software released under the MIT License.

go_bank_backend's People

Contributors

kingsleyocran avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.