Goodnessuc / PayWalletEngine

Basic version of a wallet engine implementation in Go with the hexagonal architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PayWalletEngine

made-with-Go GoReportCard Go.mod version LICENSE

Introduction

This is a basic MVP version of a bank account system implemented in Go using the hexagonal architecture. It includes features such as JWT authentication, account management, transaction processing, and user management.

Table of Contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Go (version 1.15 or later)
  • Make

Installation and Setup

  1. Clone the repository
git clone https://github.com/goodnessuc/paywalletengine.git
  1. Change directory to the project folder
cd paywalletengine
  1. Install dependencies
make install
  1. Build the application
make build
  1. Run the application
./cmd/server/main.go

Usage

To start the server, run the following command:

./cmd/server/main.go

The server will start and listen on the default port 8080.

Docker Deployment

This application can be run using Docker Compose, which sets up the required services including a database and the application itself.

Prerequisites

Running with Docker Compose

  1. Ensure that Docker and Docker Compose are installed on your machine.

  2. Navigate to the project directory:

cd paywalletengine
  1. Build and run the application and its services using Docker Compose:
docker-compose up --build

This will start up the db service using the PostgreSQL image and the api service which is your application. The application will connect to the database, and both will be accessible from your machine.

To stop the services, simply run:

docker-compose down

This will gracefully shut down the containers and remove them.

Testing

To run the tests, run the following command:

make test

Technologies and Tools

  • Go - The programming language used
  • GORM - Database ORM tool
  • The Gorilla Mux Router - Go based HTTP routing tool
  • JWT - JSON Web Tokens for authentication
  • Make - Build automation tool

Contributing

Contributions are welcome! Feel free to open a pull request right away.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Basic version of a wallet engine implementation in Go with the hexagonal architecture

License:MIT License


Languages

Language:Go 98.3%Language:Makefile 0.9%Language:Dockerfile 0.9%