Skip to content
/ echo-rest-api Public template

A Golang restful API boilerplate based on Echo framework v4. Includes tools for module generation, db migration, authorization, modular, authentication and more.

License

Notifications You must be signed in to change notification settings

dzungtran/echo-rest-api

Repository files navigation

Go Reference GoReportCard Badge

Echo Rest API boilerplate

A Golang restful API boilerplate based on Echo framework v4. Includes tools for module generation, db migration, authorization, authentication and more.

Overview

Request processing flow - Sequence Diagram

Used libraries:

  • labstack/echo
  • open-policy-agent/opa
  • uber-go/dig
  • spf13/cobra
  • jackc/pgx
  • ory/kratos
  • golang-migrate/migrate

Features

  • User Auth functionality (Signup, Login, Forgot Password, Reset Password) use Ory/Kratos
  • REST API
  • DB Migration
  • Configs via environmental variables
  • Unit tests
  • Dependency injection
  • Role based access control (use Open Policy Agent)
  • Module generation, quickly create model, usecase, api handler

Refs

TODOs

  • Update docker compose for ory/kratos
  • Update README.md
  • Write more tests
  • Add support Heroku