a0v0 / go-plate

Boilerplate for go projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go_plate

Yet another go boilerplate. Simple and scalable boilerplate to build powerful and organized REST projects with Fiber.

Prerequisites

Usage

  1. Rename the .env.example to .env and update the values.

  2. Install the dependencies

    task install
  3. To generate go code

    task generate
  4. Start the server

    task start

Instructions

  • Tests are written at service
  • Pass the environment variables in the .env file at the root dir or in the environment. See .env.example for reference.
  • Service Layer: The service layer is the core of the server. This layer communicates with the business layer.
    • Handles all the requests from the client with minamal validation.
    • Handles authentication.
  • Business Layer: The business layer is responsible for handling all the business logic. This layer communicates with the Database layer.
    • Handles all the business logic.
    • Handles authorization.
    • Handles validation.
    • Filtering of data.
  • Database Layer: It is the layer that communicates with the database.
    • Handles all the database operations.
    • DUMB layer.

Service Layer -> Business Layer -> Database Layer

Reference

About

Boilerplate for go projects.

License:MIT License


Languages

Language:Go 98.6%Language:Dockerfile 1.3%Language:HTML 0.1%