Giter Club home page Giter Club logo

pismo's Introduction

Pismo Project

This project is designed to create a suite of APIs using Gin Web Framework and Gorm, the ORM library for Golang. It aims to provide a robust backend solution for financial operations.

Overview

The Pismo project is structured to support scalable and maintainable API development. It includes a Dockerized PostgreSQL database and utilizes the Gin framework for handling HTTP requests and Gorm for object-relational mapping.

Prerequisites

Before running this project, you must have the following installed:

  • Docker and Docker Compose
  • Go programming language
  • Git (for version control)

Getting Started

To get the application up and running, follow these steps:

1. Clone the Repository

First, clone the repository to your local machine:

git clone https://github.com/shiguemori/pismo.git

2. Start the Database

Use docker-compose to spin up the PostgreSQL database container:

docker-compose up -d postgres

3. Run the Application

Navigate to the project directory and run the application with the following command:

go run main.go

Development Workflow

During development, you might want to refresh your database and application state. To reset your environment use the following commands:

docker-compose down -v
docker-compose up -d postgres
go run main.go

Accessing the API Documentation

Once the application is running, the API documentation can be accessed through Swagger at the following URL:

Here you can view the list of available endpoints, their expected request formats, and try out the API calls directly from the browser.

Environment Variables

For security and configuration management, the application utilizes environment variables. Ensure you have a .env file at the root of your project with the necessary variables set, such as POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB.

Testing

Our project comes with a comprehensive test suite designed to ensure the highest standards of quality. To execute the tests and verify that all components behave as expected, follow the steps below:

Run All Tests: To execute all tests across the project, use the following command at the root of the project:

  • go test ./...
    • This will recursively run all tests in all subdirectories.

Test Coverage: To assess the test coverage across the project, you can generate a coverage report by running:

  • go test ./... -cover
    • This command provides a summary of the coverage percentage per file.

Coverage Profile: If you need a detailed coverage report, you can generate a coverage profile with:

  • go test ./... -coverprofile=coverage.out
    • This command creates a file named coverage.out containing the coverage data.

View Coverage in Browser: For a visual representation of the coverage, you can render the coverage profile in HTML format and view it in your web browser:

  • go tool cover -html=coverage.out
    • This will open a webpage displaying the code coverage, with untested lines highlighted.

By regularly running these tests and analyzing coverage, we can maintain and improve the project's quality over time. Make sure to run the test suite before pushing code changes to ensure that all functionalities are working as intended.

Postman

The project includes a Postman collection with a set of requests to test the API. You can import the collection into Postman and run the requests directly from the application.

Contributing

Contributions to the project are welcome. Please follow the standard fork and pull request workflow. Ensure that you write or update tests as necessary and adhere to the existing coding style.

Contact Information

Screenshots

Create Account

Screenshot 1

Get Account

Screenshot 2

Create Transaction

Screenshot 2

pismo's People

Contributors

shiguemori 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.