Skip to content

Commit 0afbf16

Browse files
committed
docs: brand theme color, version nav with migrations, richer landing, vercel build
1 parent b3bfb9e commit 0afbf16

12 files changed

Lines changed: 295 additions & 23 deletions

File tree

‎docs/app/app.config.ts‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import devframePkg from '../../packages/devframe/package.json'
2+
13
export default defineAppConfig({
24
seo: {
35
siteName: 'Devframe',
@@ -21,6 +23,20 @@ export default defineAppConfig({
2123
},
2224
{ label: 'Plugins', sections: ['plugins'], link: 'section' as const },
2325
{ label: 'Errors', sections: ['errors'], link: 'section' as const },
26+
{
27+
label: `v${devframePkg.version}`,
28+
to: '/migrations',
29+
activePath: '/migrations',
30+
children: [
31+
{ label: 'Migrations overview', to: '/migrations' },
32+
{ label: 'Migrating to 0.9', to: '/migrations/migration-0.9' },
33+
{ label: 'Migrating to 0.8', to: '/migrations/migration-0.8' },
34+
{ label: 'Migrating to 0.7', to: '/migrations/migration-0.7' },
35+
{ label: 'Migrating to 0.6', to: '/migrations/migration-0.6' },
36+
{ label: 'Release notes', to: 'https://github.com/devframes/devframe/releases' },
37+
{ label: 'Contributing', to: 'https://github.com/devframes/devframe/blob/main/CONTRIBUTING.md' },
38+
],
39+
},
2440
],
2541
},
2642

@@ -99,15 +115,6 @@ export default defineAppConfig({
99115
],
100116
},
101117
{ title: 'Ecosystem', items: ['/guide/built-with'] },
102-
{
103-
title: 'Migrations',
104-
items: [
105-
'/guide/migration-0.9',
106-
'/guide/migration-0.8',
107-
'/guide/migration-0.7',
108-
'/guide/migration-0.6',
109-
],
110-
},
111118
],
112119
},
113120
ogImage: {
@@ -130,7 +137,7 @@ export default defineAppConfig({
130137

131138
ui: {
132139
colors: {
133-
primary: 'green',
140+
primary: 'sage',
134141
neutral: 'neutral',
135142
},
136143
},

‎docs/app/assets/css/devframe.css‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Devframe brand palette (sage green, anchored on the old VitePress brand
3+
* color #517158). Nuxt UI maps `--ui-color-primary-*` to `var(--color-sage-*)`
4+
* when `ui.colors.primary` is `sage`, so defining these custom properties is
5+
* enough to theme every primary accent (links, section labels, syntax hints).
6+
*/
7+
:root {
8+
--color-sage-50: #f3f7f3;
9+
--color-sage-100: #e3ede4;
10+
--color-sage-200: #c8dcca;
11+
--color-sage-300: #9fc0a4;
12+
--color-sage-400: #6f9d77;
13+
--color-sage-500: #517158;
14+
--color-sage-600: #445f4a;
15+
--color-sage-700: #384d3d;
16+
--color-sage-800: #2f3f33;
17+
--color-sage-900: #28352b;
18+
--color-sage-950: #131d16;
19+
}

‎docs/app/composables/useFilteredNavigation.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,16 @@ export function useFilteredNavigation(): ComputedRef<NavItem[]> {
5555
? headerGroups
5656
: nav.map(item => ({ label: item.title, sections: [segmentOf(item.path, base)] }))
5757

58-
const active = groups.find(group => group.sections?.includes(seg)) ?? groups[0]
58+
const matched = groups.find(group => group.sections?.includes(seg))
59+
// A section reachable only through a manual tab (e.g. migrations, under the
60+
// version dropdown) still gets its own flat sidebar.
61+
if (!matched) {
62+
const node = nav.find(item => segmentOf(item.path, base) === seg)
63+
if (node)
64+
return (node.children ?? []).filter(child => child.path !== node.path)
65+
}
66+
67+
const active = matched ?? groups[0]
5968
const sections = active?.sections
6069
// Manual tabs (no sections) have no content sidebar; fall back to the full tree.
6170
if (!sections?.length)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
title: Migrations
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎docs/content/7.migrations/index.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: 'Migrations'
3+
description: 'Version-by-version upgrade guides for devframe and @devframes/hub. Each release below has a drop-in path from the previous one.'
4+
---
5+
6+
Upgrade guides for devframe and `@devframes/hub`, newest first. Each one lists every breaking change with its drop-in replacement.
7+
8+
| Version | What changed |
9+
| ------- | ------------ |
10+
| [Migrating to 0.9](/migrations/migration-0.9) | Removes the compatibility shims deprecated across the 0.7 series and trims the public API. |
11+
| [Migrating to 0.8](/migrations/migration-0.8) | Makes RPC schemas validator-neutral and runtime-validated, and adds the agent-native MCP surface. |
12+
| [Migrating to 0.7](/migrations/migration-0.7) | Makes `cac` an optional peer and moves json-render into an opt-in package. |
13+
| [Migrating to 0.6](/migrations/migration-0.6) | Tightens `defineDevframe`'s metadata, replaces the terminal and WebSocket transports, and adds enforced auth. |
14+
15+
For the full changelog of every release, see the [release notes on GitHub](https://github.com/devframes/devframe/releases).

‎docs/content/index.md‎

Lines changed: 228 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ A framework-neutral foundation for devtools. One definition becomes a Web Standa
4141
Get started
4242
:::
4343

44-
:::u-button
45-
---
46-
to: /guide#why-it-exists
47-
color: neutral
48-
variant: subtle
49-
size: lg
50-
---
51-
Why Devframe
52-
:::
53-
5444
:::u-button
5545
---
5646
icon: i-simple-icons-github
@@ -64,6 +54,17 @@ A framework-neutral foundation for devtools. One definition becomes a Web Standa
6454
:::
6555
::
6656

57+
::u-page-section
58+
:::callout
59+
---
60+
icon: i-lucide-newspaper
61+
to: https://antfu.me/posts/pluggable-extensible-playful-devtools
62+
target: _blank
63+
---
64+
Read the announcement — **Pluggable, Extensible, and Playful DevTools** — for the vision behind devframe.
65+
:::
66+
::
67+
6768
::landing-features
6869
#headline
6970
Foundation
@@ -124,18 +125,233 @@ One definition, every entry point
124125
:::
125126
::
126127

128+
::landing-tabs
129+
---
130+
items:
131+
- icon: i-simple-icons-hono
132+
title: Hono
133+
description: Pass the Web Standard request straight to the handler.
134+
- icon: i-lucide-server
135+
title: Nitro
136+
description: Mount the same handler on a catch-all event route.
137+
- icon: i-simple-icons-nextdotjs
138+
title: Next.js
139+
description: Wire the handler into an App Router route handler.
140+
- icon: i-simple-icons-vite
141+
title: Vite
142+
description: Use the connect-style middleware the same instance provides.
143+
---
144+
145+
#headline
146+
Portability
147+
148+
#title
149+
The same handler, mounted natively
150+
151+
#description
152+
A devframe's boundary is simply the Web Standard `Request` and `Response`. Any framework that speaks that — or connect-style middleware — mounts the same tool and inherits the whole ecosystem. Only the host-facing glue changes. [See all adapters](/adapters/initiate).
153+
154+
#code-0
155+
```ts [server.ts]
156+
import { Hono } from 'hono'
157+
import { devtools } from './devtools'
158+
159+
const app = new Hono()
160+
161+
app.all(`${devtools.base}*`, c => devtools.handler(c.req.raw))
162+
```
163+
164+
#code-1
165+
```ts [routes/[...devtools].ts]
166+
import { devtools } from '../devtools'
167+
168+
export default defineEventHandler(event => devtools.handler(toWebRequest(event)))
169+
```
170+
171+
#code-2
172+
```ts [app/__my-tool/[...all]/route.ts]
173+
import { devtools } from '@/devtools'
174+
175+
export const GET = (req: Request) => devtools.handler(req)
176+
export const POST = GET
177+
```
178+
179+
#code-3
180+
```ts [vite.config.ts]
181+
import { devtools } from './devtools'
182+
183+
export default defineConfig({
184+
plugins: [{
185+
name: 'my-tool',
186+
configureServer: server => server.middlewares.use(devtools.nodeMiddleware),
187+
}],
188+
})
189+
```
190+
::
191+
192+
::landing-tabs
193+
---
194+
reverse: true
195+
items:
196+
- icon: i-lucide-terminal
197+
title: CLI
198+
description: Ship a standalone command any project can run.
199+
- icon: i-lucide-server-cog
200+
title: Dev server
201+
description: A dedicated dev server for local iteration.
202+
- icon: i-lucide-bot
203+
title: MCP
204+
description: Expose the tool to coding agents over MCP.
205+
- icon: i-lucide-package
206+
title: Static report
207+
description: Build a self-contained SPA snapshot for CI.
208+
---
209+
210+
#headline
211+
Adapters
212+
213+
#title
214+
Package it the way your tool ships
215+
216+
#description
217+
The handler is the smallest common denominator. Higher-level adapters package that same definition into familiar forms — pick the entry points your package needs. [Browse the adapters](/adapters).
218+
219+
#code-0
220+
```ts [cli.ts]
221+
import { createCac } from 'devframe/adapters/cac'
222+
import myDevframe from './my-tool'
223+
224+
createCac(myDevframe).parse()
225+
```
226+
227+
#code-1
228+
```ts [dev.ts]
229+
import { createDevServer } from 'devframe/adapters/dev'
230+
import myDevframe from './my-tool'
231+
232+
createDevServer(myDevframe)
233+
```
234+
235+
#code-2
236+
```ts [mcp.ts]
237+
import { createMcpServer } from 'devframe/adapters/mcp'
238+
import myDevframe from './my-tool'
239+
240+
createMcpServer(myDevframe, { transport: 'stdio' })
241+
```
242+
243+
#code-3
244+
```ts [report.ts]
245+
import { createBuild } from 'devframe/adapters/build'
246+
import myDevframe from './my-tool'
247+
248+
createBuild(myDevframe, { outDir: 'dist-static' })
249+
```
250+
::
251+
252+
::landing-tabs
253+
---
254+
items:
255+
- icon: i-lucide-eye
256+
title: Visual
257+
description: Explore, overview, and compare through a web UI.
258+
- icon: i-lucide-bot
259+
title: Agentic
260+
description: Retrieve focused context and carry out multi-step actions.
261+
---
262+
263+
#headline
264+
Interfaces
265+
266+
#title
267+
One capability, two interfaces
268+
269+
#description
270+
RPC functions stay private by default and opt into agent exposure explicitly. The [MCP adapter](/adapters/mcp) translates those functions, resources, and selected shared state into an agent-consumable surface — the presentation changes, the source of truth stays the same.
271+
272+
#code-0
273+
```ts [rpc.ts]
274+
import { defineRpcFunction } from 'devframe'
275+
276+
export const inspectBuild = defineRpcFunction({
277+
name: 'inspect-build',
278+
type: 'query',
279+
handler: () => readBuildGraph(),
280+
})
281+
```
282+
283+
#code-1
284+
```ts [rpc.ts]
285+
export const inspectBuild = defineRpcFunction({
286+
name: 'inspect-build',
287+
type: 'query',
288+
// opt this capability into the agent surface
289+
agent: { description: 'Read the current build graph and chunk sizes.' },
290+
handler: () => readBuildGraph(),
291+
})
292+
```
293+
::
294+
295+
::landing-tabs
296+
---
297+
reverse: true
298+
items:
299+
- icon: i-lucide-layout-dashboard
300+
title: Compose
301+
description: Register many devframes as plugins of one hub.
302+
- icon: i-lucide-plug
303+
title: Mount
304+
description: Serve the whole collection behind one handler.
305+
---
306+
307+
#headline
308+
Hub
309+
310+
#title
311+
From one devframe to a devtools host
312+
313+
#description
314+
When several devtools run at once, discovery becomes the problem. `@devframes/hub` is a headless composition layer: many devframes register docks, commands, terminals, and shared state, and appear through one consistent entry. [Learn about the hub](/guide/hub).
315+
316+
#code-0
317+
```ts [hub.ts]
318+
import { initHub } from '@devframes/hub/initiate'
319+
import { createTerminalsDevframe } from '@devframes/plugin-terminals'
320+
321+
const hub = initHub({
322+
base: '/__devframes/',
323+
devframes: [
324+
createTerminalsDevframe(),
325+
// ...more devframes
326+
],
327+
ui: await import('@devframes/hub-ui').then(m => m.createUi()),
328+
})
329+
```
330+
331+
#code-1
332+
```ts [server.ts]
333+
import { Hono } from 'hono'
334+
import { hub } from './hub'
335+
336+
// the same handler/middleware API as a standalone devframe
337+
new Hono().all(`${hub.base}*`, c => hub.handler(c.req.raw))
338+
```
339+
::
340+
127341
::landing-cta
128342
---
129343
links:
130344
- label: Get started
131345
to: /guide
132346
trailingIcon: i-lucide-arrow-right
133347
size: lg
134-
- label: Browse the plugins
135-
to: /plugins
348+
- label: Read the announcement
349+
to: https://antfu.me/posts/pluggable-extensible-playful-devtools
350+
target: _blank
136351
color: neutral
137352
variant: subtle
138353
size: lg
354+
icon: i-lucide-newspaper
139355
---
140356
#title
141357
Ship your devtool everywhere

0 commit comments

Comments
 (0)