Dex Documentation
Dex Documentation
Welcome to the Dex documentation. Dex is a composable, Bun-first full-stack framework powered by a Native Go CLI (dex) (<8 MB binary, <5ms startup), file-based React routing, Elysia server primitives, and a typed OpenAPI route-tree client.
Getting Started
- Getting Started — Install the native Go CLI and start quickly
- What is Dex? — Understand the framework and architecture
- Your First App — Build your first app step by step
- How Dex Works — Mental model for routing, layouts, SSG, and builds
Core Concepts
- File-Based Routing — Pages map to routes
- Pages and Layouts — Layout composition and head metadata
- Configuration — Customize paths, subdomains, fonts, and API codegen
- Build Process — ESM code splitting, SSG prerendering, and standalone Bun server executable
- Dev vs Production — Development and production runtime differences
Guides
- Router — File-based routing, concurrent transitions, prefetching, and subdomain mounting
- Server — Serving assets, SSG-aware SPA fallback, Google Fonts, and dev reload
- Pie (API Client) — Typed route-tree HTTP client and JSON/YAML OpenAPI code generator
- Development — Parallel dev watcher and build helpers
Recipes
- Custom Structure — Custom folder layout
- Monorepo Setup — Use Dex in a monorepo
- API-Only Deploy — Backend-only mode with
DEX_API_ONLY=1 - Static Generation — SSG prerendering and metadata injection
- Environment Config — Client-safe public environment variables
Reference
- CLI Flags — Command-line options
- Config Schema — Configuration reference
- Server Exports —
@dex/serverAPI surface - Dev API Reference —
@dex/devhelpers - File Conventions — Naming rules
Full Documentation
- CLI — Scaffolding, syncing, template diffing, and multi-version management
- Deployment — Production builds and deployment targets
- Troubleshooting — Common issues and fixes