fiber-generator
is a lightweight CLI tool designed to bootstrap Go Fiber applications with a clean, simple project structure. It automatically sets up directories and boilerplate code, allowing developers to start building their web applications immediately.
Fiber Generator creates a straightforward project structure that integrates the high-performance Fiber web framework with HTMX for modern, server-side web applications. The generated project includes routing, controllers, and static file serving out of the box.
-
Automated Project Scaffolding
- Creates a clean directory structure for views, public assets, and controllers
- Generates a basic Fiber application setup
- Includes HTMX integration for dynamic web interfaces
-
Development Ready
- Initializes a Go module with required dependencies
- Provides pre-configured static file serving
- Sets up basic routing structure
- Go 1.20 or later
- Make (optional, recommended for development workflow)
Install the CLI tool using Go's package manager:
go install github.com/SuperninjaXII/fiber-generator@latest
Generate a new project with:
fiber-generator --name my-project
The generated project follows this structure:
my-project/
├── app.go # Main application entry point
├── controllers/
│ └── CreateUserHandler.go
├── routes/
│ └── userRoutes.go
├── views/
│ └── index.html
├── public/
│ ├── css/
│ │ └── style.css
│ ├── js/
│ │ └── app.js
│ └── lib/
│ └── htmx.min.js
├── go.mod
└── Makefile
-
Navigate to your project directory:
cd my-project
-
Install dependencies:
go mod tidy
-
Start the development server:
make dev
make dev
: Start the development servermake setup
: Install project dependencies
This project is licensed under the MIT License - see the LICENSE file for details.