⚠️ Warning: Archived Project. Please check instead - https://github.com/KostLinux/go-skeleton-app
GoBlitz is a powerful framework built on top of Gin Gonic, designed to help develop production ready web applications in Golang. GoBlitz creates an abstraction layer for the Gin-Gonic framework and provides a structured way to build web applications. It is designed to be fast, secure, and easy to use. The framework is built with security in mind and provides a set of security features to protect web applications from common web vulnerabilities.
Feel free to fork this repository as website boilerplate for your next project.
- Dependabot - Dependency Management
- Gin Gonic - Golang Web Framework
- Goose - Golang Migrations framework
- GoDotEnv - Golang .env file parser
- Golang CI Lint - Golang Linter
- GoSec - Golang Security Scan
- TailwindCSS - CSS Framework from the CDN
- Air - Live reload for Go applications
make build
- Build the applicationmake run
- Run the applicationmake test
- Run the testsmake fumpt
- Run the go fmtmake linter
- Run the comprehensive GolangCILint to check the code qualitymake gosec
- Run the GoSec to check code for vulnerabilitiesmake mod-vendor
- Vendor the dependenciesmake validate
- Runsmake linter
,make test
andmake gosec
to validate the codemake migrate-create MIGRATION_NAME
- Create a new migrationmake migrate-up
- Run the migrationsmake migrate-down
- Rollback the migrations
/
- Home page/status
- Status pageAPI_PATH/ping
- API check endpointAPI_PATH/users
- Sample Users API endpoint
Note! Replace API_PATH
with the actual path of the application. By default it's /api/v1/
Note! Before getting started, make sure you have Goose
, Air
, Golang CI Lint
, Gosec
and Go
installed on your host
- Clone the repository
git clone git@github.com:KostLinux/GoBlitz.git my-web-application
- Change the directory
cd my-web-application
- Configure .env
cp .env.example .env
- Setup the database
docker-compose up -d db
- Run the migrations
make migrate-up
- Generate
STATUSPAGE_API_KEY
go run bin/api/generate_api_key.go
-
Paste the generated key into the
.env
file into theSTATUSPAGE_API_KEY
variable -
Run the application
make run
- Visit the application in your browser
Feel free to visit the application at localhost:8000
and move around available paths
- Install Air
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s
mv ./bin/air /usr/local/bin/air
- Run the application with Air
make
You can find the documentation page here.
Feel free to contribute to the project by creating a pull request.
Make sure to follow the Contribution Guidelines.