zenwallet

module
v0.0.0-...-c76d545 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT

README

ZenWallet

Overview

This app represents a tech challenge from Storicard. It is a RESTful API for account management developed in Go, incorporating features such as JWT Authentication, rate limiting, Swagger documentation, and database operations through GORM. The application utilizes the Gin Gonic web framework and is containerized using Docker.

Getting Started

Prerequisites
Installation
  1. Clone the repository
git clone https://github.com/wjoseperez20/zenwallet.git
  1. Navigate to the directory
cd zenwallet
  1. Build and run the Docker containers
make setup && make build && make up
  1. Run Migrations and Seeds
make database
Environment Variables

You can set the environment variables in the .env file. Here are some important variables:

  • GMAIL_USER
  • GMAIL_SECRET
  • POSTGRES_HOST
  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • POSTGRES_PORT
  • JWT_SECRET
  • API_SECRET_KEY
  • AWS_REGION
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
API Documentation

The API is documented using Swagger and can be accessed at:

http://localhost:8001/swagger/index.html

Usage

Authentication

To use authenticated routes, you must include the Authorization header with the JWT token.

curl -H "Authorization: Bearer <YOUR_TOKEN>" http://localhost:8001/api/v1/accounts

Directories

Path Synopsis
cmd
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
pkg
api

Jump to

Keyboard shortcuts

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