united-atomic-bank-server

module
v0.0.0-...-3a54392 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: MIT

README

Build Status Build Status

 

UAB - API Server

A complete RESTful API for Financial Institutions, developed with Go.

Report Bugs  •  Actions  •  Pull Requests

 

db_diagram

A Financial Software specialized in the intermediation of money between savers and those in need of loans, as well as in the custody of that money.

This API was written following SOLID principles and Clean Code guidelines, for better scalability and code maintenance.

Using PostgreSQL as a database ensures durability and consistency in financial records.

The application was deployed on AWS, efficiently orchestrated by Kubernetes. This choice allows for dynamic scalability and simplified container management.

The implementation of automated tests, integrated into the continuous integration (CI) process, ensures code stability at all phases of development.

Additionally, monitoring is a priority. Prometheus and Grafana work together to provide detailed insights into application performance. This proactive approach, through metrics and dashboards, allows a quick response to any anomaly, maintaining system reliability and availability.

 

Built With

Tech Tools

Table of Contents
  1. Getting Started
  2. Grafana Dashboard
  3. API Documentation
  4. License
  5. Contact

 

Getting Started

To get started, You need to have Go 1.21+ installed on your machine, for more information visit Go Downloads. You also need to have Docker Desktop installed, for more information visit Docker Desktop Install.

OBS: This guide is designed to run this project locally (Local Development), on Linux-based systems.

Installation

  1. Clone the repository.

    git clone https://github.com/caard0s0/united-atomic-bank-server.git
    
  2. Install Golang-Migrate as CLI. for more information visit Golang CLI Documentation.

  3. Create an app.env file with environment variables.

    WARNING: The values ​​below are for testing purposes only, please change them in the future.

    cat > app.env << EOF
    DB_DRIVER=postgres
    DB_SOURCE=postgresql://root:secret@postgres:5432/bank?sslmode=disable
    HTTP_SERVER_ADDRESS=0.0.0.0:80
    HTTP_CLIENT_ADDRESS=http://localhost:3000
    
    TOKEN_SYMMETRIC_KEY=12345678901234567890123456789012
    ACCESS_TOKEN_DURATION=30m
    
    EMAIL_SENDER_NAME=
    EMAIL_SENDER_ADDRESS=
    EMAIL_SENDER_PASSWORD=
    EOF
    
  4. Install GoMock and be able to use the MockGen tool.

    • Framework installation.

      go install github.com/golang/mock/[email protected]
      
    • add this PATH to your go/bin folder in the ~/.zshrc file or another Shell.

      WARNING: This PATH below is just an example.

      export PATH=$PATH:~/.asdf/installs/golang/1.21.5/packages/bin
      
  5. Install SQLC. for more information visit SQLC Documentation.

WARNING: To install and use the Full Application, click on the Link below.

  1. Install the Client Side. for more information visit UAB - Web Version.

Usage

After completing the installation, you can run the project.

  1. Create and run the Containers.

    docker compose up -d
    

Tests

To be able to run all the tests, follow the command below.

  1. Run all the Tests.

    go test -v -cover ./...
    

Grafana Dashboard

A dashboard created with Grafana to view all the main information about Docker Containers and Requests.

docker_dashboard   api_dashboard


API Documentation

A complete and detailed documentation of the API using Swagger. To view, visit API Documentation.

swagger_docs


License

This project is being distributed under the MIT License, see LICENSE.txt for more information.


Contact

  • Software Engineer
  • Vinicius Cardoso - Email

↑ back to top

Directories

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
internal
api
database/mock
Package mockdb is a generated GoMock package.
Package mockdb is a generated GoMock package.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL