Structure
One home for each responsibility.
app/
controllers/ticketscontroller/
views/tickets/index.html.tpl
services/ticketservice/
init/
dependencies.go
routes.go
cmd/app/
A Go web framework with clear conventions, plain Go services, and tools to inspect how your application works.
Try this in Codex
Use GoLazy to build a small support ticket app. Follow the project's AGENTS.md and skills.
Prepared example: listing support tickets. These excerpts use fixed sample data; an agent's implementation will vary.
Structure
app/
controllers/ticketscontroller/
views/tickets/index.html.tpl
services/ticketservice/
init/
dependencies.go
routes.go
cmd/app/
Controller
// app/controllers/ticketscontroller/controller.go
// Excerpt: New(ctx) resolves the service.
type TicketsController struct {
controllers.BaseController
tickets *ticketservice.Service
}
func (c *TicketsController) Index(
_ http.ResponseWriter, _ *http.Request,
) error {
c.Set("tickets", c.tickets.List())
return nil
}
// init/routes.go
router.Resources(ticketscontroller.New)
Service
// services/ticketservice/service.go
// Prepared example with fixed sample data.
type Ticket struct {
Title string
Status string
}
type Service struct{}
func (s *Service) List() []Ticket {
return []Ticket{
{Title: "Reset my password", Status: "open"},
{Title: "Update billing email", Status: "open"},
}
}
View
<!-- app/views/tickets/index.html.tpl -->
<h1>Support tickets</h1>
{{range .tickets}}
<article>
<h2>{{.Title}}</h2>
<p>{{.Status}}</p>
</article>
{{else}}
<p>No tickets yet.</p>
{{end}}
Controllers, services, and views have clear homes. Project instructions and skills give your agent a place to start.
Business rules live in plain Go services. Read the types and trace the calls when you review a change.
The devpanel brings routes, requests, services, and logs into the development loop.
02 / Install
Install the CLI, create the app, and let the devpanel keep the loop visible.
$ curl -fsSL https://golazy.dev/install.sh | sh
$ lazy new github.com/you/myweb
$ cd myweb && lazy
03 / Keep going