Gin Boilerplate

screenshot of Gin Boilerplate

The fastest way to deploy a restful api's with Gin Framework with a structured project that defaults to PostgreSQL database and JWT authentication middleware stored in Redis

Overview

The Golang Gin boilerplate v2 is a structured project that allows for the quick deployment of RESTful APIs using the Gin Framework. It comes pre-configured with a PostgreSQL database and JWT authentication middleware stored in Redis. The boilerplate also includes several other useful utilities and features such as built-in custom validators, CORS middleware, and request ID middleware. It supports SSL, has environment support, and comes with unit testing capabilities.

Features

  • PostgreSQL 12 with JSON/JSONB queries & trigger functions: The boilerplate uses PostgreSQL as the default database and provides support for JSON/JSONB queries as well as trigger functions.
  • SSL Support: The boilerplate supports SSL for secure communications.
  • Environment support: It has built-in environment support for easy configuration based on different environments (e.g., development, production).
  • Unit test: The boilerplate includes unit testing capabilities to ensure the reliability and correctness of the APIs.
  • Built-in Custom Validators: It comes with built-in custom validators to validate the incoming request data.
  • Built-in CORS Middleware: The boilerplate includes built-in CORS middleware to handle cross-origin resource sharing.
  • Built-in RequestID Middleware: It provides built-in middleware to generate and attach a unique request ID to each request.

Summary

The Golang Gin boilerplate v2 provides a quick and efficient starting point for developers looking to deploy RESTful APIs using the Gin Framework. With its built-in support for PostgreSQL, JWT authentication, and other useful features, developers can save time and effort in setting up the project structure and focus more on developing the core functionality of their APIs. The boilerplate also supports SSL, has environment support, and includes unit testing capabilities to ensure the reliability of the APIs. Overall, it serves as a valuable tool for kickstarting any Golang API project.