Giter Site home page Giter Site logo

silvergama / transactions Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10.38 MB

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.

Dockerfile 1.08% Makefile 3.27% Go 95.64%

transactions's Introduction

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

transactions's People

Contributors

silvergama avatar

Watchers

 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.