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
4 changes: 4 additions & 0 deletions .github/actions/setup-deno/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ runs:
cache: true
cache-hash: ${{ hashFiles('deno.json') }}

- name: Generate template manifest
shell: bash
run: deno run -A scripts/build/generate-templates-manifest.ts && deno fmt cli/templates/manifest.json

- name: Warm esm.sh cache
if: inputs.warm-cache == 'true'
shell: bash
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ jobs:
with:
deno-version: lts

- run: deno run -A scripts/build/generate-templates-manifest.ts
- run: deno run -A scripts/build/prepare-framework-sources.ts
- run: deno run -A scripts/build/prebundle-bridge.ts
- run: deno task build:prepare

- name: Compile binary
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ deno.lock
# Generated integration data (rebuild with generate-integrations-module.ts)
src/integrations/_data.ts

# Generated template manifest (rebuild with generate-templates-manifest.ts)
cli/templates/manifest.json

# NPM build artifacts (fully generated by dnt via `deno task build:npm`)
npm/

Expand Down
39 changes: 33 additions & 6 deletions DISTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,35 +126,53 @@ This creates binaries in `dist/`:
### Build Individual Platform

```bash
# Required prep step (manifests, prebundles, framework sources)
deno task build:prepare

# macOS ARM (M1/M2/M3)
deno compile --allow-all \
--include src/platform/polyfills \
--include src/proxy/main.ts \
--include dist/framework-src \
--target aarch64-apple-darwin \
--output dist/veryfront-macos-arm64 \
src/cli/main.ts
cli/main.ts

# macOS Intel
deno compile --allow-all \
--include src/platform/polyfills \
--include src/proxy/main.ts \
--include dist/framework-src \
--target x86_64-apple-darwin \
--output dist/veryfront-macos-x64 \
src/cli/main.ts
cli/main.ts

# Linux x64
deno compile --allow-all \
--include src/platform/polyfills \
--include src/proxy/main.ts \
--include dist/framework-src \
--target x86_64-unknown-linux-gnu \
--output dist/veryfront-linux-x64 \
src/cli/main.ts
cli/main.ts

# Linux ARM64
deno compile --allow-all \
--include src/platform/polyfills \
--include src/proxy/main.ts \
--include dist/framework-src \
--target aarch64-unknown-linux-gnu \
--output dist/veryfront-linux-arm64 \
src/cli/main.ts
cli/main.ts

# Windows x64
deno compile --allow-all \
--include src/platform/polyfills \
--include src/proxy/main.ts \
--include dist/framework-src \
--target x86_64-pc-windows-msvc \
--output dist/veryfront-windows-x64.exe \
src/cli/main.ts
cli/main.ts
```

### Test Binaries
Expand Down Expand Up @@ -186,6 +204,9 @@ deno task release 0.1.0
### 2. Build All Binaries

```bash
# One-shot local distribution verification (binary + npm package)
deno task verify:dist

# Build for all platforms
node scripts/build/build-all.js

Expand Down Expand Up @@ -509,12 +530,18 @@ jobs:
with:
deno-version: v2.x

- name: Prepare build artifacts
run: deno task build:prepare

- name: Build binary
run: |
deno compile --allow-all \
--include src/platform/polyfills \
--include src/proxy/main.ts \
--include dist/framework-src \
--target ${{ matrix.target }} \
--output dist/${{ matrix.output }} \
src/cli/main.ts
cli/main.ts

- name: Generate checksum
run: |
Expand Down
2 changes: 1 addition & 1 deletion cli/app/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function createApp(config: AppConfig): App {

state = setTemplates([
{ id: "ai-agent", name: "AI Chatbot", description: "Agent + chat UI + streaming" },
{ id: "chat-with-your-docs", name: "Chat with Docs", description: "RAG with source citations" },
{ id: "docs-agent", name: "Docs Agent", description: "Document Q&A with source citations" },
{
id: "multi-agent-system",
name: "Multi-Agent",
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/init/catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("catalog", () => {
assertEquals(ids, [
"minimal",
"ai-agent",
"chat-with-your-docs",
"docs-agent",
"agentic-workflow",
"multi-agent-system",
"coding-agent",
Expand Down
6 changes: 3 additions & 3 deletions cli/commands/init/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const TEMPLATES: readonly TemplateOption[] = [
{ id: "minimal", label: "Minimal", description: "Blank canvas, no extras" },
{ id: "ai-agent", label: "AI Agent", description: "Agent + chat UI + streaming" },
{
id: "chat-with-your-docs",
label: "Chat with Your Docs",
description: "RAG with source citations",
id: "docs-agent",
label: "Docs Agent",
description: "Document Q&A with source citations",
},
{
id: "agentic-workflow",
Expand Down
4 changes: 2 additions & 2 deletions cli/commands/init/command-help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const initHelp: CommandHelp = {
{
flag: "-t, --template <name>",
description:
"Project template (minimal | ai-agent | chat-with-your-docs | agentic-workflow | multi-agent-system | coding-agent | saas-starter)",
"Project template (minimal | ai-agent | docs-agent | agentic-workflow | multi-agent-system | coding-agent | saas-starter)",
},
{
flag: "--integrations <list>",
Expand Down Expand Up @@ -39,7 +39,7 @@ export const initHelp: CommandHelp = {
"veryfront init # Interactive wizard",
"veryfront init my-app",
"veryfront init my-app --template ai-agent",
"veryfront init my-rag --template chat-with-your-docs",
"veryfront init my-rag --template docs-agent",
"veryfront init my-pipeline --template agentic-workflow",
"veryfront init my-app --deploy # Create and deploy",
"veryfront init --config project.json # From config file",
Expand Down
9 changes: 9 additions & 0 deletions cli/commands/init/config-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ export async function createPackageJson(
): Promise<void> {
const fs = createFileSystem();

// Read any existing package.json (e.g. from template) to merge dependencies
let templateDeps: Record<string, string> = {};
const pkgPath = join(projectDir, "package.json");
if (await fs.exists(pkgPath)) {
const existing = JSON.parse(await fs.readTextFile(pkgPath));
templateDeps = existing.dependencies ?? {};
}

const dirName = projectDir.split(/[/\\]/).pop();
const packageJson = {
name: projectName ?? dirName ?? "veryfront-project",
Expand All @@ -25,6 +33,7 @@ export async function createPackageJson(
onlyBuiltDependencies: ["esbuild", "veryfront"],
},
dependencies: {
...templateDeps,
react: `^${DEFAULT_INIT_REACT_VERSION}`,
"react-dom": `^${DEFAULT_INIT_REACT_VERSION}`,
veryfront: `^${VERSION}`,
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/init/init-command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("InitCommand Types", () => {
describe("InitTemplate", () => {
const templates: InitTemplate[] = [
"ai-agent",
"chat-with-your-docs",
"docs-agent",
"multi-agent-system",
"agentic-workflow",
"coding-agent",
Expand Down
4 changes: 2 additions & 2 deletions cli/commands/init/init.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ describe("init command integration", () => {
assertEquals(statResult.isDirectory, true);
});

it("should use chat-with-your-docs template when specified", async () => {
it("should use docs-agent template when specified", async () => {
const result = await runInitCommand([
projectName,
"-t",
"chat-with-your-docs",
"docs-agent",
"--skip-install",
]);

Expand Down
2 changes: 1 addition & 1 deletion cli/commands/init/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { FeatureName, IntegrationName } from "../../templates/types.ts";

export type InitTemplate =
| "ai-agent"
| "chat-with-your-docs"
| "docs-agent"
| "multi-agent-system"
| "agentic-workflow"
| "coding-agent"
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/new/fast-scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function dedupeFilesByPath(files: TemplateFile[]): TemplateFile[] {
function createVeryfrontConfig(slug: string, template: InitTemplate): TemplateFile {
const usesAppRouter = [
"ai-agent",
"chat-with-your-docs",
"docs-agent",
"multi-agent-system",
"agentic-workflow",
"coding-agent",
Expand Down
2 changes: 1 addition & 1 deletion cli/help/tips.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("cli/help/tips", () => {
for (
const template of [
"ai-agent",
"chat-with-your-docs",
"docs-agent",
"multi-agent-system",
"agentic-workflow",
"coding-agent",
Expand Down
2 changes: 1 addition & 1 deletion cli/help/tips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getBuildTips(): string {
export function getInitTemplates(): string {
return `${yellow("Available Templates:")}\n` +
` • ${green("ai-agent")} - AI chatbot with tools and streaming\n` +
` • ${green("chat-with-your-docs")} - Chat with your docs (RAG + citations)\n` +
` • ${green("docs-agent")} - Document Q&A with source citations\n` +
` • ${green("multi-agent-system")} - Agents that delegate to each other\n` +
` • ${green("agentic-workflow")} - AI pipeline with approvals\n` +
` • ${green("coding-agent")} - AI code assistant with file tools\n` +
Expand Down
2 changes: 1 addition & 1 deletion cli/mcp/remote-file-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ const remoteCreateProjectInput = z.object({
"Project slug (lowercase letters, numbers, hyphens only). A random suffix is appended if the slug is already taken.",
),
templateSlug: z.string().optional().describe(
"Template project slug to fork from (e.g., 'blank', 'ai-agent', 'chat-with-your-docs')",
"Template project slug to fork from (e.g., 'blank', 'ai-agent', 'docs-agent')",
),
is_public: z.boolean().optional().describe("Whether the project is public (default: false)"),
});
Expand Down
6 changes: 3 additions & 3 deletions cli/mcp/tools/catalog-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const EXAMPLES: ExampleInfo[] = [
{
name: "data-analyst",
description: "RAG-powered data analyst with Sheets and Snowflake",
template: "chat-with-your-docs",
template: "docs-agent",
integrations: ["sheets", "snowflake", "notion"],
features: ["Document search", "Chart generation", "Reports"],
difficulty: "advanced",
Expand Down Expand Up @@ -89,7 +89,7 @@ const TEMPLATES: TemplateInfo[] = [
recommended: true,
},
{
name: "chat-with-your-docs",
name: "docs-agent",
description: "Chat with your docs using retrieval-augmented generation",
features: ["Document search", "Source citations", "File-based knowledge"],
},
Expand Down Expand Up @@ -407,7 +407,7 @@ const createProjectInput = z.object({
template: z
.enum([
"ai-agent",
"chat-with-your-docs",
"docs-agent",
"multi-agent-system",
"agentic-workflow",
"coding-agent",
Expand Down
26 changes: 0 additions & 26 deletions cli/templates/files/chat-with-your-docs/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions cli/templates/files/chat-with-your-docs/agents/qa.ts

This file was deleted.

This file was deleted.

31 changes: 0 additions & 31 deletions cli/templates/files/chat-with-your-docs/app/layout.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions cli/templates/files/chat-with-your-docs/app/page.tsx

This file was deleted.

Loading