Skip to content

Latest commit

ย 

History

44 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Superkit ๐Ÿš€

Build high-performance apps swiftly with minimal team resources in Go.

Superkit is a full-stack web framework designed for speed and simplicity. It provides essential tools and libraries to help developers build modern web applications with ease.

โš ๏ธ Currently in Experimental Phase


๐Ÿ“– Table of Contents


๐ŸŒŸ Features

โœ… Lightweight & Fast โ€“ Built on Go for blazing-fast performance.
โœ… Modular Design โ€“ Well-structured and easy to extend.
โœ… Built-in Database Support โ€“ Migrations, seeds, and ORM included.
โœ… Templ-based Views โ€“ Type-safe templating engine for UI components.
โœ… Hot Reloading โ€“ Instant feedback during development.
โœ… One-Binary Deployment โ€“ Compiles your app into a single executable.


๐Ÿ“ฅ Installation

Create a new Superkit project with a single command:

# Initialize a new Superkit project
go run github.com/khulnasoft/superkit@master [yourprojectname]

# Navigate into your project
cd [yourprojectname]

# Install TailwindCSS & esbuild
cd bootstrap && npm install && cd ..

# Copy environment configuration
cp bootstrap/.env.example bootstrap/.env
# Edit bootstrap/.env and set a secure SUPERKIT_SECRET (32+ characters)

# Resolve Go dependencies
go clean -modcache && go get -u ./...

# Initialize database migrations (if authentication plugin is enabled)
cd bootstrap && make db-up && cd ..

๐Ÿš€ Getting Started

๐Ÿ“‚ Project Structure

โ”œโ”€โ”€ bootstrap           # Example application (runs with `make dev` from bootstrap/)
โ”‚   โ”œโ”€โ”€ app
โ”‚   โ”‚   โ”œโ”€โ”€ assets      # Static files (CSS, JS)
โ”‚   โ”‚   โ”œโ”€โ”€ conf        # Configuration files
โ”‚   โ”‚   โ”œโ”€โ”€ db          # Database migrations
โ”‚   โ”‚   โ”œโ”€โ”€ events      # Custom event handlers
โ”‚   โ”‚   โ”œโ”€โ”€ handlers    # Request handlers (controllers)
โ”‚   โ”‚   โ”œโ”€โ”€ types       # Data models and interfaces
โ”‚   โ”‚   โ”œโ”€โ”€ views       # HTML templates (Templ)
โ”‚   โ”‚   โ”œโ”€โ”€ routes.go   # Route & middleware setup
โ”‚   โ”‚   โ”œโ”€โ”€ events.go   # Event registration
โ”‚   โ”‚   โ”œโ”€โ”€ db          # GORM/SQLite setup
โ”‚   โ”‚   โ”œโ”€โ”€ public      # Embedded production assets
โ”‚   โ”œโ”€โ”€ cmd
โ”‚   โ”‚   โ”œโ”€โ”€ app         # Application entrypoint
โ”‚   โ”‚   โ”œโ”€โ”€ scripts     # CLI commands & seed scripts
โ”‚   โ”œโ”€โ”€ plugins
โ”‚   โ”‚   โ”œโ”€โ”€ auth        # Authentication module
โ”‚   โ”œโ”€โ”€ public          # Development static assets
โ”‚   โ”œโ”€โ”€ Makefile        # Bootstrap build & run scripts
โ”‚   โ”œโ”€โ”€ go.mod          # Bootstrap module dependencies
โ”œโ”€โ”€ kit                 # Core framework utilities
โ”œโ”€โ”€ db                  # Database connection utilities
โ”œโ”€โ”€ event               # Async event subscription & dispatch
โ”œโ”€โ”€ validate            # Validation utilities
โ”œโ”€โ”€ view                # View engine utilities
โ”œโ”€โ”€ ui                  # Reusable UI components
โ”œโ”€โ”€ Makefile            # Repository-level build & run scripts
โ”œโ”€โ”€ go.mod              # Framework module dependencies
โ””โ”€โ”€ README.md           # Project documentation

๐ŸŽฎ Development Server

Run the development server from the bootstrap/ directory:

cd bootstrap
make dev

This starts all development watchers: Templ (with live reload proxy), Air (Go rebuilds), TailwindCSS, and esbuild.

Note: On Windows (WSL2), you might need to run asset watchers separately:

make watch-assets

๐Ÿ”ฅ Hot Reloading

Hot reloading is enabled by default for CSS & JS.

Note: On Windows (WSL2), you might need to run this command separately:

make watch-assets

๐Ÿ“Š Database Migrations

Create a New Migration

make db-mig-create add_users_table

โžก๏ธ Generates a new migration SQL file in app/db/migrations/

Apply Migrations

make db-up

Reset the Database

make db-reset

Seed the Database

make db-seed

โžก๏ธ Runs the seed script in cmd/scripts/seed/main.go


๐Ÿ›  Creating Views with Templ

SUPERKIT uses Templ for type-safe UI components.
Create structured, reusable HTML fragments with Go templates.


โœ… Validations (Coming Soon)

Stay tuned for built-in validation utilities!


๐Ÿงช Testing

Test Framework Core

make test

Test Bootstrap Application

make app-test

๐Ÿ“ฆ Production Release

Compile your application into a single binary:

make app-build

โžก๏ธ Creates a production-ready binary at bootstrap/bin/app_prod.

Set the environment to production:

SUPERKIT_ENV=production

๐Ÿš€ Start building with SUPERKIT today! ๐Ÿ’™

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages