Shatkon is a Go package that helps you quickly scaffold a new Go project with customizable configurations for web frameworks, databases, and middleware.
shatkon.mp4
- Interactive CLI for project configuration
- Support for multiple Go web frameworks (Echo, Gin, Fiber, Chi, and standard library)
- Database integration options (MongoDB, PostgreSQL, SQLite)
- Logging middleware setup (for Echo framework)
- Automatic project structure creation
- Git repository initialization
To install Shatkon, use the following command:
go get -u github.com/sarthak0714/shatkon
After installation, you can use Shatkon to create a new project:
shatkon
Follow the interactive prompts to configure your project:
- Enter your GitHub UserID
- Choose a project name
- Select a web framework
- Choose a database
- Enable or disable logging middleware
Shatkon will create a new directory with your project name and set up the basic structure and configuration files based on your choices.
The generated project will have the following structure:
your-project-name/
├── cmd/
│ └── main.go
├── internal/
│ ├── adapters/
│ │ ├── handlers/
│ │ └── repository/
│ ├── config/
│ │ └── config.go
│ └── core/
│ ├── domain/
│ ├── ports/
│ └── services/
├── pkg/
│ └── utils/
│ └── logger.go (if logging is enabled)
├── go.mod
└── .git/
The project is configured using environment variables. Make sure to set the following variables before running your application:
DB_HOST
: Database hostDB_PORT
: Database portDB_USERNAME
: Database usernameDB_PASSWORD
: Database passwordDB_NAME
: Database name
Contributions to Shatkon are welcome! Please feel free to submit a Pull Request.