npx claudepluginhub jackielii/structpagesStruct Pages provides a way to define routing using struct tags and methods. It integrates with Go's http.ServeMux, allowing you to quickly build web applications with minimal boilerplate.
Status: Alpha - This package is in early development and may have breaking changes in the future. Currently used in a medium-sized project, but not yet battle-tested in production.
go get github.com/jackielii/structpages
Define your page structure using struct tags:
package main
import (
"log"
"net/http"
"github.com/jackielii/structpages"
)
type index struct {
product `route:"/product Product"`
team `route:"/team Team"`
contact `route:"/contact Contact"`
}
// Implement the Page method using Templ
templ (index) Page() {
<html>
<body>
<h1>Welcome</h1>
<nav>
<a href="/product">Product</a>
<a href="/team">Team</a>
<a href="/contact">Contact</a>
</nav>
</body>
</html>
}
func main() {
mux := http.NewServeMux()
_, err := structpages.Mount(mux, index{}, "/", "Home")
if err != nil {
log.Fatal(err)
}
log.Println("Starting server on :8080")
http.ListenAndServe(":8080", mux)
}
Route definitions use the format [method] path [Title]:
/path - All methods, no titlePOST /path - POST requests onlyGET /path Page Title - GET requests with title "Page Title"Check out the examples directory for complete working applications:
RenderTargetServeHTTP returning RenderComponent(...) to re-render a sibling component (in-memory store)See CONTRIBUTING.md for development setup and guidelines.
MIT License - see LICENSE file for details.
Opinionated Go web app scaffolding with Templ + HTMX + Alpine.js + Tailwind
Web frontend development with vanilla HTML, CSS, JavaScript, and HTMX
Build ultrafast web APIs and apps with Hono across any JavaScript runtime. Covers routing, Context API, 25+ built-in middleware (auth, CORS, caching, security), type-safe RPC client, Zod/Standard Schema validation, JSX rendering, streaming/SSE, WebSocket, cookie/JWT helpers, testing patterns, and deployment to Cloudflare Workers, Bun, Deno, Node.js, AWS Lambda, Vercel, Netlify, and more.
Build modern Hono web applications with AI guidance. Supports rapid API and web service development with Claude.
Go code review and development skills covering architecture, middleware, data persistence, concurrency, and framework-specific patterns for BubbleTea, Wish SSH, and Prometheus.
Share bugs, ideas, or general feedback.
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claim