8000 GitHub - silvergama/transactions: This repository contains the source code for a transaction management application developed in Go. The application includes features for accounts and transactions, with Swagger documentation for easy understanding of API endpoints. It utilizes PostgreSQL as the database and Docker for streamlined development environments.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This repository contains the source code for a transaction management application developed in Go. The application includes features for accounts and transactions, with Swagger documentation for easy understanding of API endpoints. It utilizes PostgreSQL as the database and Docker for streamlined development environments.

Notifications You must be signed in to change notification settings

silvergama/transactions

Repository files navigation

Quality Gate Status Maintainability Rating Reliability Rating Vulnerabilities Security Rating Duplicated Lines (%) Coverage

Pismo Technical Challenge - Transaction API

Transaction API

Description:

This is a transaction API project developed as part of the technical challenge proposed by Pismo. The main goal is to create an application that manages financial transactions, allowing the creation, listing, and querying of accounts and transactions.

Main Features:

  • Account Registration: Enables the creation of accounts associated with a document (CPF or CNPJ).
  • Transaction Registration: Allows the creation of financial transactions associated with an account, including operations such as purchase, payment, withdrawal, among others.
  • Account and Transaction Query: Offers the ability to query detailed information about accounts and transactions, facilitating the analysis and monitoring of financial activities.

Project Structure:

The project follows a modular structure, separating responsibilities into different packages. The main packages include:

  • account: Contains business logic related to accounts, including services, database storage, and unit tests.

  • cmd: This directory houses the main entry point of the application, which can be executed to start the service.

  • config: Provides the structure for managing configurations and associated tests.

  • docker-compose.yaml: Docker composition file that facilitates running services in containers.

  • infrastructure: Responsible for handling the infrastructure layer, such as initializing and managing database connections.

  • internal: Contains internal packages necessary for the application to function.

  • migrations: SQL files used for database migrations.

  • pkg: Modules and packages that are shared across different parts of the project.

  • transaction: Deals with logic related to transactions, including services, database storage, and unit tests.

How to Use:

Requirements

Ensure you have the following tools installed:

Installation:

To install project dependencies, run the following command

make ensure

Local Execution:

Run build with the following command:

make build

Run swagger doc with the following command:

After building, you can access the Swagger documentation at: http://localhost:8080/swagger/index.html

make swag

Run application with the following command:

make run

Tests:

Run unit tests with the following command:

make test

Linting:

Perform linting checks with the following command:

make lint

Docker Execution:

To build, run, and test the application using Docker, use the following commands:

make docker/build
make docker/run
make docker/migrate/up

About

This repository contains the source code for a transaction management application developed in Go. The application includes features for accounts and transactions, with Swagger documentation for easy understanding of API endpoints. It utilizes PostgreSQL as the database and Docker for streamlined development environments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
3421
0