Warning
This repository is still a work-in-progress
A modern, production-ready Go web application starter template with best practices and common features pre-configured. This template includes both backend (Go) and frontend (TypeScript) components.
- 🚀 Fast and efficient web server using Gin
- 📦 Clean project structure following Go best practices
- 🔧 Live reloading for development
- 🧪 Built-in testing setup
- 📊 Code quality tools (SonarQube, ESLint, Prettier)
- 🔄 CI/CD pipeline ready
- 🛡️ Security best practices
- 💻 Modern frontend development with TypeScript and Bun
- 🎨 Consistent code formatting with Prettier
- 📝 Type safety with TypeScript
- Go 1.24 or higher
- Bun (for frontend development)
- Air (optional, for live reloading)
- Make (optional, for using Makefile commands)
- Docker (optional, for containerization)
-
Clone the repository:
git clone https://github.com/Dobefu/go-web-starter.git cd go-web-starter
-
Install Go dependencies:
go mod download
-
Install frontend dependencies:
bun install
-
Start the development server with live reloading:
make dev
Or run directly:
go run main.go server
-
The server will start on port 4000 by default. You can change the port using the
-p
flag:go run main.go server -p 8080
Run the test suite:
make test
Build the application:
make build
This will build both the frontend and backend components.
The project uses Air for live reloading during development. Configuration can be found in .air.toml
.
The frontend uses:
- TypeScript for type safety
- Bun for package management and bundling
- ESLint for code linting
- Prettier for code formatting
make dev
: Start development server with live reloadingmake build
: Build the applicationmake test
: Run testsmake lint
: Run lintersmake bench
: Run benchmarksmake clean
: Clean build artifacts
- Fork the repository
- Create your feature branch (
git checkout -b feature/cool-new-feature
) - Commit your changes (
git commit -m 'Add a cool new feature'
) - Push to the branch (
git push origin feature/cool-new-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue in the GitHub repository.