Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/efectn/fiber-boilerplate
Simple and scalable boilerplate to build powerful and organized REST projects with Fiber.
https://github.com/efectn/fiber-boilerplate
boilerplate fiber fx go gofiber golang golang-package project-template template zerolog
Last synced: about 1 month ago
JSON representation
Simple and scalable boilerplate to build powerful and organized REST projects with Fiber.
- Host: GitHub
- URL: https://github.com/efectn/fiber-boilerplate
- Owner: efectn
- License: mit
- Created: 2021-09-11T10:33:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T02:02:36.000Z (over 1 year ago)
- Last Synced: 2024-04-14T01:00:28.979Z (8 months ago)
- Topics: boilerplate, fiber, fx, go, gofiber, golang, golang-package, project-template, template, zerolog
- Language: Go
- Homepage:
- Size: 265 KB
- Stars: 75
- Watchers: 4
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fiber - efectn/fiber-boilerplate - Simple and scalable boilerplate to build powerful and organized REST projects with Fiber. (🚧 Boilerplates / 🌱 Third Party)
README
# Fiber Boilerplate
[![Go Reference](https://pkg.go.dev/badge/github.com/efectn/fiber-boilerplate.svg)](https://pkg.go.dev/github.com/efectn/fiber-boilerplate)Simple and scalable boilerplate to build powerful and organized REST projects with [Fiber](https://github.com/gofiber/fiber).
## Directory Structure
```
├── app
│ ├── database
│ │ ├── schema
│ │ │ └── article.go
│ │ └── seeder
│ │ └── article_seeder.go
│ ├── middleware
│ │ ├── register.go
│ │ └── token
│ │ └── token.go
│ ├── module
│ │ └── article
│ │ ├── article_module.go
│ │ ├── controller
│ │ │ ├── article_controller.go
│ │ │ ├── article_controller_mock.go
│ │ │ └── controller.go
│ │ ├── repository
│ │ │ ├── article_repository.go
│ │ │ └── article_repository_mock.go
│ │ ├── request
│ │ │ └── article_request.go
│ │ └── service
│ │ ├── article_service.go
│ │ └── article_service_mock.go
│ └── router
│ └── api.go
├── build
│ ├── Dockerfile
│ └── DockerfileAir
├── cmd
│ └── example
│ ├── generate.go
│ └── main.go
├── config
│ └── example.toml
├── docker-compose.yaml
├── go.mod
├── go.sum
├── internal
│ └── bootstrap
│ ├── database
│ │ └── database.go
│ ├── logger.go
│ └── webserver.go
├── LICENSE
├── Makefile
├── README.md
├── storage
│ ├── ascii_art.txt
│ ├── private
│ │ └── example.html
│ ├── private.go
│ └── public
│ └── example.txt
└── utils
├── config
│ └── config.go
├── response
│ ├── response.go
│ └── validator.go
└── utils.go
```## Usage
You can run that commands to run project:```go mod download```
```go run cmd/example/main.go``` or ```air -c .air.toml``` if you want to use air
### Docker
```shell
docker-compose build
docker-compose upCUSTOM="Air" docker-compose up # Use with Air
```## Tech Stack
- [Go](https://go.dev)
- [PostgreSQL](https://www.postgresql.org)
- [Docker](https://www.docker.com/)
- [Fiber](https://github.com/gofiber/fiber)
- [Ent](https://github.com/ent/ent)
- [Fx](https://github.com/uber-go/fx)
- [Zerolog](https://github.com/rs/zerolog)
- [GoMock](https://github.com/golang/mock)## To-Do List
- [x] More error-free logging.
- [x] Add makefile to make something shorter.
- [x] Introduce repository pattern.
- [ ] Add unit tests.
- [x] Add mocking with GoMock.## License
fiber-boilerplate is licensed under the terms of the **MIT License** (see [LICENSE](LICENSE)).