A full-featured Solarflare app demonstrating layouts, dynamic routes, API endpoints, and components.
src/
├── _layout.tsx # Root layout
├── _components/ # Shared components
│ ├── count-button.tsx
│ ├── nav.tsx
│ └── post-form.tsx
├── index.server.tsx # Home server handler
├── index.client.tsx # Home client component
├── api.server.ts # API endpoint
└── blog/
├── _layout.tsx # Blog layout
├── $slug.server.tsx # Dynamic route server
└── $slug.client.tsx # Dynamic route client
npm install
npm run dev- Layouts — Nested
_layout.tsxfiles wrap child routes - Dynamic Routes —
$slugbecomes:slugURL parameter - API Endpoints — Server-only routes return
Responsedirectly - Components —
_components/directory for shared, non-routed components - Assets — CSS and SVG imports
- Deferred Data — Promise props stream to client after initial render