GoKS adheres to clear, opinionated fullstack standards modeled after modern web frameworks like Next.js, while retaining standard Go package conventions.
myapp/
├── app/ # File-system router
│ ├── layout.gox # Root HTML layout and global SEO metadata
│ ├── page.gox # Home route (/)
│ ├── not-found.gox # Custom 404 page
│ ├── docs/ # Route /docs
│ │ └── page.gox
│ └── api/ # Backend REST API routes
│ └── todos/
│ └── route.go # GET/POST /api/todos handler
├── components/ # Reusable GOX components
│ └── ui/ # Components generated via 'goks ui add'
├── models/ # ORM database models and schemas
├── public/ # Static assets (CSS, images, robots.txt, sitemap.xml)
├── go.mod # Go module definition
└── .goks/ # Internal compilation cache (ignored in git)Key Directories Explained
Contains all file-based routes. Every folder with apage.goxrepresents a public URL path. Layouts (layout.gox) wrap children pages hierarchically.
Hosts file-based REST API handlers. Aroute.gofile exports standard HTTP methods (GET,POST,PUT,DELETE). API routes are strictly server-side and never bundled into client WebAssembly.
Shared, reusable UI components. Components created viagoks ui addare placed incomponents/ui/.
Database model definitions used bypkg/orm. Defines table schemas, relations, hooks, and validations.
Static files served directly by GoKS. Files placed here likerobots.txt,sitemap.xml, images, and fonts are served at the root or under/public/*.