Skip to content

Installation

Go 1.24 or newer. Nothing else: no C compiler, no Node, no database server (SQLite is built in).

Terminal window
go version
Terminal window
go install github.com/semutdev/goigniter/cmd/goigniter@latest
goigniter new myapp
cd myapp
go run .

Open http://localhost:8080 and log in as admin@admin.com. On the first run the console prints the admin password:

Admin account created: admin@admin.com / 3f9c2a7b1e04d6c8a2 (shown only once, change it after logging in)

Tables are created automatically on startup. There is no separate migration or seeding step.

SQLite is the default. For MySQL, pass the connection details (the database must already exist):

Terminal window
goigniter new myapp --db=mysql --db-user=root --db-pass=secret --db-name=myapp

All options: goigniter help. You can change the database later in .env (DB_DRIVER, DB_DSN).

myapp/
├── application/
│ ├── config/ # Database connection
│ ├── controllers/ # Your controllers (admin/ holds the admin panel)
│ ├── libs/ # Shared code, e.g. authentication
│ ├── models/ # GORM models
│ └── views/ # HTML templates
├── database/ # Table setup and first-run data
├── public/ # Static files, served at /static/
├── .env # Configuration (APP_KEY, database, admin account)
├── go.mod
└── main.go # Entry point

The generated app includes a login page and an admin panel with a dashboard, user management and settings. Use it as a starting point or delete what you don’t need.

Add a new route in main.go, before app.Run:

app.GET("/hello", func(c *core.Context) error {
return c.JSON(200, core.Map{
"message": "Hello World!",
})
})

Restart the server and visit http://localhost:8080/hello.

Templates already reload on every request in development. To also restart on Go code changes, use Air:

Terminal window
go install github.com/air-verse/air@latest
air

Next: Routing to learn how to define routes.

Migrating from CodeIgniter 3? Check Agentic Migration for automated migration with AI assistance.