Skip to content

fiber generator is go fiber scalfording cli tool simpler to express generator

Notifications You must be signed in to change notification settings

SuperninjaXII/fiber-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fiber Generator

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.

Overview

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.

Features

  • 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

Requirements

  • Go 1.20 or later
  • Make (optional, recommended for development workflow)

Installation

Install the CLI tool using Go's package manager:

go install github.com/SuperninjaXII/fiber-generator@latest

Usage

Creating a New Project

Generate a new project with:

fiber-generator --name my-project

Project Structure

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

Setup and Development

  1. Navigate to your project directory:

    cd my-project
  2. Install dependencies:

    go mod tidy
  3. Start the development server:

    make dev

Available Make Commands

  • make dev: Start the development server
  • make setup: Install project dependencies

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

fiber generator is go fiber scalfording cli tool simpler to express generator

Resources

Stars

Watchers

Forks

Packages

No packages published