v0.3.1 - Email verification for new registration, forgot/reset password process, AWS SES email implemntation
v0.3 - New file structure - separating dev files from Gojang framework files - AI Skills added - Docs updated - addModel and addPage automations removed - Ent schema files moved to more convenient location
v0.2 - Added some changes based on what I learned from another production app that has been built on top of Gojang over the past eight months. I learned a lot about Gojangβs pros and cons, and I hope to make many improvements based on my experience running the app in production.
A modern, batteries-included web framework for Go with HTMX. Build dynamic web applications with minimal JavaScript and maximum productivity.
- AI Skills: Start AI development from strong boilerplate, save time and tokens - Claude and Codex compatible
- Batteries Included: Authentication, admin panel, ORM, security - ready to go
- HTMX First: Modern interactions without heavy JavaScript frameworks
- Developer Joy: Minimal boilerplate, maximum productivity
- Type Safe: Ent ORM catches errors at compile time
- Production Ready: Security, logging, and best practices built-in
- Easy to Learn: Clear documentation and simple patterns
- π Authentication & Authorization - Built-in user system with sessions
- π₯ User Management - Complete user CRUD with permissions
- ποΈ Auto-Generated Admin Panel - Automatic CRUD interface for any model
- π Type-Safe ORM - Powered by Ent with reflection-based queries
- π¨ HTML Templates - Go templates with layouts and partials
- β‘ HTMX Integration - Dynamic interactions without heavy JavaScript
- οΏ½ Security First - CSRF protection, rate limiting, password hashing
- π― Simple & Clean - Minimal boilerplate, maximum productivity
- π Production Ready - Audit logging, middleware, error handling
| Technology | Purpose |
|---|---|
| Go 1.21+ | Backend language |
| HTMX | Dynamic interactions |
| Ent | Type-safe ORM |
| Chi | HTTP router |
| Custom CSS | Clean, semantic styling |
| SQLite / PostgreSQL | Database |
app/
βββ cmd/ # Application commands
β βββ migrate/
β βββ seed/
β βββ web/
βββ gojang/ # Framework core, admin, auth, models, renderers
βββ pages/ # App-owned page handlers, routes, and templates
βββ posts/ # App-owned post handlers, routes, and templates
βββ views/
βββ i18n/ # Public translation files
βββ static/ # Public CSS, images
-
Clone the repository:
git clone https://github.com/gojangframework/gojang
-
Copy environment file:
cp .env.example .env
-
Install dependencies:
go mod download
-
Run Ent schema generation:
task schema-gen
-
Run the application in dev mode:
task dev
-
Visit: http://localhost:8080
That's it! The database is automatically created and migrated on first run.
You need to run seed program to insert the first admin account
task seedThis project uses Task for task automation (cross-platform alternative to Make).
macOS/Linux:
go install github.com/go-task/task/v3/cmd/task@latestOr using Homebrew:
brew install go-taskWindows:
go install github.com/go-task/task/v3/cmd/task@latestOr using Chocolatey:
choco install go-taskFor other installation methods, see the official Task installation guide.
Air provides automatic reload when code changes, making development faster.
All platforms:
go install github.com/air-verse/air@latestAfter installation, you can use task dev to run the server with live reload.
Run task --list to see all available tasks:
task dev # Run server with live reload
task build # Build the application
task test # Run tests
task migrate # Run database migrations
task seed # Seed database with initial data
task schema-gen # Generate Ent code after schema changesOr use plain Go commands:
go run ./app/cmd/web # Run server
go build -o app ./app/cmd/web # Build binary
go test ./... # Run tests
go generate ./app/gojang/models # Generate codeReady to start building? Check out our comprehensive guides:
- Creating Static Pages - Add simple pages like About, Contact (~5 minutes)
- Creating Data Models - Full CRUD with database models (~20 minutes)
- HTMX Integration Patterns - Master dynamic interactions with HTMX (~15 minutes)
- Documentation Index - Complete guide with all tutorials
// 1. Create schema: app/schema/product.go
// 2. Generate: go generate ./app/gojang/models
// 3. Register admin: registry.RegisterModel(...)See the documentation for detailed step-by-step guides!
Register any model and get a full admin interface automatically:
registry.RegisterModel(ModelRegistration{
ModelType: &models.Product{},
Icon: "π¦",
NamePlural: "Products",
ListFields: []string{"ID", "Name", "Price"},
ReadonlyFields: []string{"ID", "CreatedAt"},
})Includes:
- β List view with sorting
- β Create/Edit forms with validation
- β Delete with confirmation
- β Relationship handling
- β Search and filters (coming soon)
Dynamic interactions without writing JavaScript:
<button hx-get="/products/load"
hx-target="#product-list"
hx-swap="innerHTML">
Load Products
</button>Define schemas once, use everywhere:
// Define schema
field.String("name").NotEmpty()
field.Float("price").Positive()
// Use with type safety
product := client.Product.Create().
SetName("Widget").
SetPrice(19.99).
Save(ctx)Contributions are welcome!
Please feel free to submit a Pull Request or email gojangframework@gmail.com
BSD 3-Clause "New" or "Revised" License