How mikestefanello/pagoda works
Pagoda is a Go full-stack web starter kit. Its main workflow is an HTTP request through routing and middleware to a feature handler, which processes forms and domain services, accesses persistent state when needed, and renders server-side HTML. Authentication and administration are distinct domain paths; cache, background tasks, and file delivery are additional capabilities documented by the README. The sampled sources establish router setup, authentication persistence, and Ent access; some feature wiring is inferred only from documented capabilities and the repository tree.
Main entry points: router.go Router and Middleware · auth.go Authentication · client.go Ent ORM · handlers.go Feature Handlers
Components 22
Web Runtime
- Web App
cmd/web/main.go - Router and Middleware
pkg/handlers/router.go - Feature Handlers
pkg/handlers/handlers.go
Domain Services
- Auth Routes
pkg/handlers/auth.go - Admin Routes
pkg/handlers/admin.go - File Routes
pkg/handlers/files.go - Search Routes
pkg/handlers/search.go - Task Routes
pkg/handlers/task.go - Authentication
pkg/services/auth.go - Service Container
pkg/services/container.go - Email Service
pkg/services/mail.go
Data and Jobs
- Ent ORM
ent/client.go - User Schema
ent/schema/user.go - SQLite Store
ent/client.go - Cache Service
pkg/services/cache.go - Task Queues
pkg/tasks/register.go
Server UI
- UI Renderer
pkg/ui/ui.go - Page Views
pkg/ui/pages - Form Processing
pkg/form/submission.go - Static Assets
public/fs.go - Email Views
pkg/ui/emails/auth.go
Other components
- Browser
Connections 20
- Browser → Router and Middleware: sends request
- Web App → Router and Middleware: builds routes
- Web App → Task Queues: starts runner
- Router and Middleware → Feature Handlers: registers routes
- Router and Middleware → Static Assets: serves assets
- Router and Middleware → Authentication: loads user
- Auth Routes → Authentication: handles auth
- Admin Routes → Ent ORM: manages entities
- Authentication → Ent ORM: reads and writes
- Ent ORM → SQLite Store: queries
- Ent ORM → User Schema: models
- Feature Handlers → Form Processing: processes submissions
- Feature Handlers → Page Views: renders pages
- Page Views → UI Renderer: uses components
- File Routes → Static Assets: serves files
- Search Routes → Page Views: renders results
- Task Routes → Task Queues: monitors queues
- Service Container → Cache Service: provides cache
- Authentication → Email Service: sends messages
- Email Views → Email Service: supplies content