Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions cli/templates/files/saas-starter/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export default function LandingPage(): React.JSX.Element {
Your AI-powered platform
</h1>
<p className="mt-4 text-lg text-neutral-500 dark:text-neutral-400 max-w-lg mx-auto">
Built with Veryfront. Agents, tools, and memory are ready for
production.
Built with Veryfront. Agents, tools, and memory are ready for production.
</p>
<div className="mt-8 flex gap-3 justify-center">
<a
Expand All @@ -55,15 +54,17 @@ export default function LandingPage(): React.JSX.Element {
{[
{
title: "AI Agents",
desc: "Define agents with tools, memory, and streaming. Veryfront auto-discovers them from your project.",
desc:
"Define agents with tools, memory, and streaming. Veryfront auto-discovers them from your project.",
},
{
title: "Per-User Memory",
desc: "Each user gets their own conversation history, persisted across sessions.",
},
{
title: "Production Ready",
desc: "Use auth, rate limiting, and deployment to ship to production with one command.",
desc:
"Use auth, rate limiting, and deployment to ship to production with one command.",
},
].map(({ title, desc }) => (
<div key={title}>
Expand Down
8 changes: 5 additions & 3 deletions cli/templates/files/saas-starter/tools/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import { defineSchema } from "veryfront/schemas";
export default tool({
id: "search",
description: "Search your knowledge base",
inputSchema: defineSchema((v) => v.object({
query: v.string().describe("Search query"),
}))(),
inputSchema: defineSchema((v) =>
v.object({
query: v.string().describe("Search query"),
})
)(),
execute: async ({ query }) => {
// Replace with your domain-specific search logic
return {
Expand Down
8 changes: 8 additions & 0 deletions cli/templates/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ describe("cli/templates", () => {
}
});

it("does not make baseline framework extensions starter-specific", async () => {
const files = await getTemplate("saas-starter");
assertExists(files);

assertEquals(files.some((file) => file.path === "veryfront.config.ts"), false);
assertEquals(templateConfigs["saas-starter"], undefined);
});

it("imports globals.css from each styled starter root layout", async () => {
for (const templateName of STYLED_STARTER_TEMPLATES) {
const layoutPath = new URL(`./files/${templateName}/app/layout.tsx`, import.meta.url);
Expand Down
4 changes: 2 additions & 2 deletions cli/templates/manifest.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions docs/architecture/12-extension-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@ request classification, application authorization, request-to-socket
correlation, cancellation, and shutdown ownership. Those responsibilities do
not require a WebSocket protocol package and remain in the runtime adapter.

The wire-protocol implementation is supplied by the explicitly activated
The wire-protocol implementation is supplied by the default
`@veryfront/ext-node-websocket-ws` package through the dependency-free
`NodeWebSocketServerProvider` contract. Bootstrap snapshots one immutable
provider generation before it starts a listener, so later mutation or extension
reload cannot change the implementation underneath a running server.

The extension is deliberately neither built in nor auto-loaded. Core does not
probe for `ws` or substitute another implementation. A Node HTTP server can run
without the provider, but an authorized WebSocket upgrade fails closed and
identifies the extension needed to enable the feature.
The standard npm/CLI distribution installs and auto-activates the extension;
custom service distributions install the package for Node WebSocket support.
Core does not import `ws`, probe for it, or substitute another implementation.
A Node HTTP server can run without the provider, but an authorized WebSocket
upgrade fails closed and identifies the extension needed to restore the feature.

## Boundaries

Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/20-support-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ project.
| ----------------------------- | --------------------------------------------------------- | ------------------------------------- | --------------------------------------- | ---------------------------- |
| `SchemaValidator` | `@veryfront/ext-schema-zod` | Built-in | Schema-backed runtime validation | None (pure JS) |
| `Bundler`, `ModuleLexer` | `@veryfront/ext-bundler-esbuild` | Built-in | Build, import analysis, module bundling | esbuild binary |
| `CSSProcessor` | `@veryfront/ext-css-tailwind` | Built-in | Tailwind CSS processing | Network (esm.sh for plugins) |
| `CSSProcessor` | `@veryfront/ext-css-tailwind` | Built-in | Tailwind CSS processing | Filesystem read (pinned CSS) |
| `ContentProcessor` | `@veryfront/ext-content-mdx` | Built-in | MDX or Markdown content compilation | None (unified ecosystem) |
| `CodeParser` | `@veryfront/ext-parser-babel` | Built-in | AST parsing or build-time code analysis | None (Babel) |
| `DocumentExtractor` | `@veryfront/ext-document-kreuzberg` | Built-in | Document text extraction | FS (WASM/native extraction) |
Expand All @@ -73,7 +73,7 @@ project.
| `NodeTelemetryProvider` | `@veryfront/ext-observability-opentelemetry` | Built-in | Node OpenTelemetry SDK bootstrap | Network (OTLP endpoint) |
| `EvalReportExporterRegistry` | Core registry and future `@veryfront/ext-eval-*` packages | Built-in registry, optional exporters | Eval report export | Vendor-specific |
| `TokenCacheStore` | `@veryfront/ext-cache-redis` | Optional | Redis-backed token cache | Network (Redis) |
| `NodeWebSocketServerProvider` | `@veryfront/ext-node-websocket-ws` | Explicit | Node.js WebSocket upgrades | Node.js and scoped env reads |
| `NodeWebSocketServerProvider` | `@veryfront/ext-node-websocket-ws` | Built-in | Node.js WebSocket upgrades and HMR | Node.js and scoped env reads |

## Dependency boundaries

Expand Down
17 changes: 9 additions & 8 deletions docs/guides/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,26 +161,27 @@ fallback.

## Enable Node.js WebSocket upgrades

Install the explicit Node.js transport extension:
The standard `veryfront` npm/CLI distribution installs and auto-activates the
Node.js transport extension, including for local HMR. Custom Node service
distributions must install it alongside `veryfront`:

```bash
deno add npm:@veryfront/ext-node-websocket-ws
```

Add it to `veryfront.config.ts`:
No `veryfront.config.ts` entry is required. To disable the builtin when
WebSocket support is intentionally unavailable, use:

```ts
import { defineConfig } from "veryfront";
import extNodeWebSocketWs from "@veryfront/ext-node-websocket-ws";

export default defineConfig({
extensions: [extNodeWebSocketWs()],
extensions: [{ name: "ext-node-websocket-ws", enabled: false }],
});
```

Restart the Node.js server after changing the configuration. HTTP serving does
not require this extension. Without it, Node.js WebSocket upgrades fail closed
with an error that names the required package.
HTTP serving does not require the provider. Without it, Node.js WebSocket
upgrades fail closed with an error that names the required package.

## First-party extension areas

Expand All @@ -207,7 +208,7 @@ replacement passes preflight.

## Verify it worked

Restart `veryfront dev` after editing `veryfront.config.ts`:
Restart `veryfront dev` after changing extension configuration:

- The dev log should print a setup line for each loaded extension.
- Any contract the extension provides should now be resolvable through the
Expand Down
Loading