From a15fbb345a56152207bd820b8866f8ae2452cdf2 Mon Sep 17 00:00:00 2001
From: Eric Luce <37158449+eluce2@users.noreply.github.com>
Date: Fri, 19 Sep 2025 11:19:45 -0500
Subject: [PATCH 1/6] template docs
---
apps/docs/cli.json | 11 +
.../content/docs/better-auth/installation.mdx | 42 +-
.../index.mdx} | 0
.../cli/guides/adding-components/meta.json | 6 +
.../guides/adding-components/templates.mdx | 9 +
apps/docs/content/docs/cli/index.mdx | 34 +-
apps/docs/content/docs/cli/meta.json | 2 +
apps/docs/content/docs/cli/registry/index.mdx | 12 +
apps/docs/content/docs/cli/v2.mdx | 38 +
apps/docs/content/docs/index.mdx | 4 +
apps/docs/content/docs/meta.json | 2 +-
apps/docs/content/docs/templates/index.mdx | 3 +
apps/docs/content/docs/templates/meta.json | 6 +
apps/docs/next.config.ts | 2 +
apps/docs/package.json | 16 +-
.../docs/{ => (docs)}/[[...slug]]/page.tsx | 0
.../docs/src/app/docs/{ => (docs)}/layout.tsx | 2 +-
.../src/app/docs/templates/[...slug]/page.tsx | 152 +++
apps/docs/src/app/docs/templates/layout.tsx | 109 ++
apps/docs/src/app/docs/templates/page.tsx | 34 +
.../app/docs/templates/templates-client.tsx | 180 +++
apps/docs/src/app/layout.config.tsx | 1 -
apps/docs/src/components/CliCommand.tsx | 42 +-
apps/docs/src/components/language-toggle.tsx | 68 ++
.../src/components/layout/docs/client.tsx | 81 ++
.../docs/src/components/layout/docs/index.tsx | 368 ++++++
.../components/layout/docs/page-client.tsx | 417 +++++++
apps/docs/src/components/layout/docs/page.tsx | 103 ++
apps/docs/src/components/layout/page.tsx | 288 +++++
.../src/components/layout/shared/client.tsx | 30 +
.../src/components/layout/shared/index.tsx | 182 +++
apps/docs/src/components/redirect.tsx | 14 +
apps/docs/src/components/root-toggle.tsx | 103 ++
apps/docs/src/components/search-toggle.tsx | 79 ++
apps/docs/src/components/sidebar.tsx | 559 +++++++++
apps/docs/src/components/theme-toggle.tsx | 87 ++
apps/docs/src/components/ui/button.tsx | 28 +
apps/docs/src/components/ui/collapsible.tsx | 39 +
apps/docs/src/components/ui/popover.tsx | 32 +
apps/docs/src/components/ui/scroll-area.tsx | 58 +
apps/docs/src/components/ui/skeleton.tsx | 8 +
apps/docs/src/components/ui/toc-clerk.tsx | 179 +++
apps/docs/src/components/ui/toc-thumb.tsx | 73 ++
apps/docs/src/components/ui/toc.tsx | 101 ++
apps/docs/src/lib/is-active.ts | 23 +
apps/docs/src/lib/merge-refs.ts | 15 +
apps/docs/src/lib/templates.ts | 103 ++
pnpm-lock.yaml | 1073 +++++++----------
48 files changed, 4128 insertions(+), 690 deletions(-)
create mode 100644 apps/docs/cli.json
rename apps/docs/content/docs/cli/guides/{adding-components.mdx => adding-components/index.mdx} (100%)
create mode 100644 apps/docs/content/docs/cli/guides/adding-components/meta.json
create mode 100644 apps/docs/content/docs/cli/guides/adding-components/templates.mdx
create mode 100644 apps/docs/content/docs/cli/registry/index.mdx
create mode 100644 apps/docs/content/docs/cli/v2.mdx
create mode 100644 apps/docs/content/docs/templates/index.mdx
create mode 100644 apps/docs/content/docs/templates/meta.json
rename apps/docs/src/app/docs/{ => (docs)}/[[...slug]]/page.tsx (100%)
rename apps/docs/src/app/docs/{ => (docs)}/layout.tsx (93%)
create mode 100644 apps/docs/src/app/docs/templates/[...slug]/page.tsx
create mode 100644 apps/docs/src/app/docs/templates/layout.tsx
create mode 100644 apps/docs/src/app/docs/templates/page.tsx
create mode 100644 apps/docs/src/app/docs/templates/templates-client.tsx
create mode 100644 apps/docs/src/components/language-toggle.tsx
create mode 100644 apps/docs/src/components/layout/docs/client.tsx
create mode 100644 apps/docs/src/components/layout/docs/index.tsx
create mode 100644 apps/docs/src/components/layout/docs/page-client.tsx
create mode 100644 apps/docs/src/components/layout/docs/page.tsx
create mode 100644 apps/docs/src/components/layout/page.tsx
create mode 100644 apps/docs/src/components/layout/shared/client.tsx
create mode 100644 apps/docs/src/components/layout/shared/index.tsx
create mode 100644 apps/docs/src/components/redirect.tsx
create mode 100644 apps/docs/src/components/root-toggle.tsx
create mode 100644 apps/docs/src/components/search-toggle.tsx
create mode 100644 apps/docs/src/components/sidebar.tsx
create mode 100644 apps/docs/src/components/theme-toggle.tsx
create mode 100644 apps/docs/src/components/ui/button.tsx
create mode 100644 apps/docs/src/components/ui/collapsible.tsx
create mode 100644 apps/docs/src/components/ui/popover.tsx
create mode 100644 apps/docs/src/components/ui/scroll-area.tsx
create mode 100644 apps/docs/src/components/ui/skeleton.tsx
create mode 100644 apps/docs/src/components/ui/toc-clerk.tsx
create mode 100644 apps/docs/src/components/ui/toc-thumb.tsx
create mode 100644 apps/docs/src/components/ui/toc.tsx
create mode 100644 apps/docs/src/lib/is-active.ts
create mode 100644 apps/docs/src/lib/merge-refs.ts
create mode 100644 apps/docs/src/lib/templates.ts
diff --git a/apps/docs/cli.json b/apps/docs/cli.json
new file mode 100644
index 00000000..8a9e3361
--- /dev/null
+++ b/apps/docs/cli.json
@@ -0,0 +1,11 @@
+{
+ "aliases": {
+ "uiDir": "./components/ui",
+ "componentsDir": "./components",
+ "blockDir": "./components",
+ "cssDir": "./styles",
+ "libDir": "./lib"
+ },
+ "baseDir": "src",
+ "commands": {}
+}
\ No newline at end of file
diff --git a/apps/docs/content/docs/better-auth/installation.mdx b/apps/docs/content/docs/better-auth/installation.mdx
index 63af87ce..a5891415 100644
--- a/apps/docs/content/docs/better-auth/installation.mdx
+++ b/apps/docs/content/docs/better-auth/installation.mdx
@@ -4,11 +4,27 @@ title: Installation & Usage
import { Callout } from "fumadocs-ui/components/callout";
+import { CliCommand } from "@/components/CliCommand";
+
This package is currently in beta. Please report any issues you find to the [GitHub repository](https://github.com/proofgeist/proofkit/issues), or reach out to us in the [Community](https://community.ottomatic.cloud/c/proofkit/13)
+# Prerequisites
+- Ensure OData is enabled on your FileMaker server.
+- Ensure your credentials have the `fmodata` privilege enabled.
+- If you are using OttoFMS 4.11+ and you want to use a Data API key instead of plain credentials, ensure OData is enabled for that key.
+
+# Step 1a: Automated Setup with the ProofKit CLI
+
+This automated setup expects you to have Next.js and shadcn/ui setup in your project. It will also setup various auth pages for you, but these may not work if you have a prefix configured for tailwindcss. You can use this opinionated setup to get you started, or if you need more control you should refer to the manual setup.
+
+
+Run the following command to add the neccesary packages and config files to your project. You will not need to follow the better-auth installation guide.
+
+
+# Step 1b: Manual Setup
Follow the [Better-Auth installation guide](https://better-auth.com/docs/installation) to get started in your app, but come back here for special instructions for anything related to your Database Setup or schema migrations.
@@ -39,26 +55,24 @@ export const auth = betterAuth({
database: process.env.FM_DATABASE,
},
}),
+ // ...rest of your config
});
```
-### Create Database Tables
+# Step 2: Create/Update Database Tables
-Run the following command to create the necessary tables and fields in your FileMaker file.
-```bash
-pnpm dlx @proofkit/better-auth@latest migrate
-```
-[Full Access] credentials are required for the schema changes to be applied automatically, but you may want to use a more restricted account for the rest of better-auth usage. If your credentials that you entered eariler in the `auth.ts` file do not have the [Full Access] permissions, you can override them in the CLI.
-```bash
-pnpm dlx @proofkit/better-auth@latest migrate --username "full_access_username" --password "full_access_password"
-```
+Run the following command to create the necessary tables and fields in your FileMaker file. It will show you a confirmation before any changes are applied, so you can review them.
+
-
-If you make any schema-related changes to the better-auth config, such as adding plugins, you will need to run the migration command again to apply the changes to your FileMaker file.
-
+[Full Access] credentials are required for the schema changes to be applied automatically, but you may want to use a more restricted account for the rest of better-auth usage. If your credentials that you entered eariler in the `auth.ts` file do not have the [Full Access] permissions, you can override them in the CLI.
+
+These changes affect database schema only. No layouts or relationships are created or modified during this process.
+The tables/fields that are created will be dependent on how your `auth.ts` file is setup. If you want to use any of your existing tables, just set [custom table names](https://www.better-auth.com/docs/concepts/database#custom-table-names) in the `auth.ts` file before running the migration command.
-## Next Steps
+You may see fields added to your tables that you don't plan on using, but it's best to keep them in your database anyway to avoid potential errors.
-Now that you have your database setup and your tables created, you can continue with the [Better-Auth installation guide](https://better-auth.com/docs/installation) to get your app up and running.
+
+If you make any schema-related changes to the better-auth config, such as adding plugins, you will need to run the migration command again to apply the changes to your FileMaker file.
+
diff --git a/apps/docs/content/docs/cli/guides/adding-components.mdx b/apps/docs/content/docs/cli/guides/adding-components/index.mdx
similarity index 100%
rename from apps/docs/content/docs/cli/guides/adding-components.mdx
rename to apps/docs/content/docs/cli/guides/adding-components/index.mdx
diff --git a/apps/docs/content/docs/cli/guides/adding-components/meta.json b/apps/docs/content/docs/cli/guides/adding-components/meta.json
new file mode 100644
index 00000000..18c4c7fc
--- /dev/null
+++ b/apps/docs/content/docs/cli/guides/adding-components/meta.json
@@ -0,0 +1,6 @@
+{
+ "title": "Adding Components",
+ "icon": "puzzle",
+ "pages": ["templates"],
+ "defaultOpen": true
+}
diff --git a/apps/docs/content/docs/cli/guides/adding-components/templates.mdx b/apps/docs/content/docs/cli/guides/adding-components/templates.mdx
new file mode 100644
index 00000000..fdf728ab
--- /dev/null
+++ b/apps/docs/content/docs/cli/guides/adding-components/templates.mdx
@@ -0,0 +1,9 @@
+---
+title: All Templates
+icon: ExternalLink
+---
+
+import Redirect from "@/components/redirect";
+
+# ProofKit Templates
+
diff --git a/apps/docs/content/docs/cli/index.mdx b/apps/docs/content/docs/cli/index.mdx
index 90bf95df..c38e49da 100644
--- a/apps/docs/content/docs/cli/index.mdx
+++ b/apps/docs/content/docs/cli/index.mdx
@@ -1,12 +1,40 @@
---
-title: ProofKit CLI
-icon: terminal
+title: Introduction
+description: Build a web-app quicker than ever before.
---
import { InitCommand } from "@/components/InitCommand";
import { Card } from "fumadocs-ui/components/card";
-Build a web-app quicker than ever before.
+
+## What is ProofKit?
+ProofKit is a collection of TypeScript tools and libraries for building modern web applications, with a focus on seamless integration with Claris FileMaker.
+
+The ProofKit CLI aims to make web development easier for beginners and more efficient for experienced devs. It’s opinionated structure allows for more than just a starter template or bootstrapping tool, but code-mod scripts that can modify a project after the initial setup.
+
+Think of it as our experience building web apps encapsulated into a CLI tool to help you structure your project and add to it over time. Each template is just a starting point, and you are free to modify any part of it as you see fit.
+
+## Core Libraries
+
+The ProofKit CLI will automatically install these other packages for you (depending on what you choose to build), but they are published seperately if you want to use them in your own projects, without the opinionated structure provided by the CLI.
+
+
+
+
+A library for interacting with the FileMaker Data API.
+
+
+A library for generating TypeScript types and validation schemas from FileMaker layouts.
+
+
+A library for interacting with the FileMaker WebViewer.
+
+
+Self-hosted auth for your web apps, backed by your FileMaker database.
+
+
+
+
## Quick Start
diff --git a/apps/docs/content/docs/cli/meta.json b/apps/docs/content/docs/cli/meta.json
index 375a4bba..73024426 100644
--- a/apps/docs/content/docs/cli/meta.json
+++ b/apps/docs/content/docs/cli/meta.json
@@ -4,7 +4,9 @@
"icon": "Terminal",
"root": true,
"pages": [
+ "index",
"guides/motivation",
+ "v2",
"---Guides---",
"guides/getting-started",
"guides/adding-components",
diff --git a/apps/docs/content/docs/cli/registry/index.mdx b/apps/docs/content/docs/cli/registry/index.mdx
new file mode 100644
index 00000000..e977f272
--- /dev/null
+++ b/apps/docs/content/docs/cli/registry/index.mdx
@@ -0,0 +1,12 @@
+---
+title: ProofKit Registry
+description: A collection of ProofKit templates for building great apps
+---
+
+The ProofKit Registry is a collection of ProofKit templates for building great apps.
+
+## Templates
+
+### @proofkit/template-basic
+
+A basic ProofKit template for building great apps.
\ No newline at end of file
diff --git a/apps/docs/content/docs/cli/v2.mdx b/apps/docs/content/docs/cli/v2.mdx
new file mode 100644
index 00000000..0abe35b6
--- /dev/null
+++ b/apps/docs/content/docs/cli/v2.mdx
@@ -0,0 +1,38 @@
+---
+title: What's new in v2?
+description: In this major release, the ProofKit CLI has been reimagined as a more powerful tool for building web apps.
+---
+
+# The Highlights
+### A new starting point
+When you start a new app using the ProofKit CLI, the new template is based on shadcn and tailwindcss instead of Mantine. This new simple template still includes the best practices from the Proof+Geist team, but with now with even more flexibility.
+
+### A new way to add [anything]
+The `proofkit add` command leverages the shadcn CLI to install any component or utility into your app, or you can use the shadcn CLI directly to install any component from any compatible library. Even better, these templates are now published right here on the docs site, so we can more easily release updates and new components that you can use right away.
+
+### A new level of compatibility
+You can now use the ProofKit CLI in an existing Next.js app, even if it wasn’t bootstraped with the CLI, as long as it's already using shadcn. This unlocks the ability for more advanced developers to leverage the power of ProofKit, while still trying out the latest and greatest in the JavaScript ecosystem.
+
+
+# Why the change?
+Adding new templates to the ProofKit CLI was always a challenge, and arugably the most lacking of the whole system. The templates are meant to be just a starting place, so they needed to be generic to fit any project, yet useful enough to warrant inclusion in the binary everyone downloads to run the CLI. That wasn’t scalable. But shadcn has taken the JavaScript world by storm of the past few year, especially with the rise of AI and especially tools like v0. We needed to unlock the ability to easily add anything to your JavaScript projects, whether it was a template from Proof, shadcn, v0 (AI-generated), or from any of the other emerging UI libraries built on the shadcn CLI.
+
+But this required a new starting point. While mantine and tailwind can be used together in the same project, they get in each other’s way. At Proof+Geist, we’ve been building new projects without ProofKit for a few months now, so it was time to bring those learnings back to the framework so we could all move more quickly. New projects will start with a new foundation based on tailwindcss. It’s easier for AI to understand, and more compatible with any UI component built for shadcn to install for you.
+
+But the shadcn CLI isn’t just about UI components. It can install any utility or set of components into your app. Take the new `@proofkit/better-auth` package that was recently released. It’s the best way to quickly and easily add self-hosted authentication to your web app, without having to compromise on login options or pay for an external auth service. But setting it up was not easy...until now! Check out our @proofkit/better-auth [guide](/docs/better-auth/installation) for more details.
+
+# Upgrade from v1
+Unfortunately, there is not an easy path for you to upgrade projects that were created with v1 to be fully compatible with v2. But if you are able to setup tailwindcss and shadcn in your existing project, you can still use the ProofKit CLI to add new components and utilities to your app.
+
+Basic steps:
+1. Configure [tailwindcss](https://tailwindcss.com/) in your project.
+ - If possible, you should replace any use of the Mantine UI library with tailwind-based components. You could also configure tailwind with a prefix so as not to conflict with the Mantine classes, but not all of the new components are compatible.
+2. Install [shadcn](https://ui.shadcn.com/).
+3. Add/change the "ui" key in your `proofkit.json` file and set to "shadcn".
+```json title="proofkit.json"
+{
+ "ui": "shadcn"
+}
+```
+4. Install/update the ProofKit CLI, or use the npx commands to run the CLI without needing to install it in your project
+
diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx
index 4167ad44..9f3c7abc 100644
--- a/apps/docs/content/docs/index.mdx
+++ b/apps/docs/content/docs/index.mdx
@@ -30,3 +30,7 @@ A library for generating TypeScript types and validation schemas from FileMaker
### @proofkit/webviewer
A library for interacting with the FileMaker WebViewer. [Learn more](/docs/webviewer)
+
+### @proofkit/better-auth
+
+Self-hosted auth for your web apps, backed by your FileMaker database. [Learn more](/docs/better-auth)
diff --git a/apps/docs/content/docs/meta.json b/apps/docs/content/docs/meta.json
index 9efe2649..09649e1a 100644
--- a/apps/docs/content/docs/meta.json
+++ b/apps/docs/content/docs/meta.json
@@ -1,3 +1,3 @@
{
- "pages": ["cli", "fmdapi", "webviewer", "typegen", "better-auth"]
+ "pages": ["cli", "templates", "fmdapi", "webviewer", "typegen", "better-auth"]
}
diff --git a/apps/docs/content/docs/templates/index.mdx b/apps/docs/content/docs/templates/index.mdx
new file mode 100644
index 00000000..7898e6a7
--- /dev/null
+++ b/apps/docs/content/docs/templates/index.mdx
@@ -0,0 +1,3 @@
+---
+title: ProofKit Templates
+---
\ No newline at end of file
diff --git a/apps/docs/content/docs/templates/meta.json b/apps/docs/content/docs/templates/meta.json
new file mode 100644
index 00000000..5347a602
--- /dev/null
+++ b/apps/docs/content/docs/templates/meta.json
@@ -0,0 +1,6 @@
+{
+ "title": "Templates",
+ "description": "Quickly install via CLI",
+ "icon": "Puzzle",
+ "root": true
+}
diff --git a/apps/docs/next.config.ts b/apps/docs/next.config.ts
index 5649c293..61483a15 100644
--- a/apps/docs/next.config.ts
+++ b/apps/docs/next.config.ts
@@ -1,6 +1,7 @@
import { createMDX } from "fumadocs-mdx/next";
import { type NextConfig } from "next";
import { validateRegistry } from "@proofkit/registry";
+import { source } from "./src/lib/source";
const withMDX = createMDX();
// validateRegistry();
@@ -16,6 +17,7 @@ const config: NextConfig = {
destination: "/r/:path*",
permanent: true,
},
+ { source: "/docs", destination: "/docs/cli", permanent: false },
];
},
};
diff --git a/apps/docs/package.json b/apps/docs/package.json
index e96e7434..8647288c 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -13,26 +13,32 @@
"@proofkit/registry": "workspace:*",
"@proofkit/typegen": "workspace:*",
"@proofkit/webviewer": "workspace:*",
+ "@radix-ui/react-collapsible": "^1.1.12",
+ "@radix-ui/react-popover": "^1.1.15",
+ "@radix-ui/react-presence": "^1.1.5",
+ "@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@tabler/icons-react": "^3.34.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
- "fumadocs-core": "15.3.3",
+ "fumadocs-core": "15.7.13",
"fumadocs-docgen": "^2.1.0",
"fumadocs-mdx": "11.6.4",
- "fumadocs-twoslash": "^3.1.4",
- "fumadocs-typescript": "^4.0.6",
- "fumadocs-ui": "15.3.3",
+ "fumadocs-twoslash": "^3.1.7",
+ "fumadocs-typescript": "^4.0.8",
+ "fumadocs-ui": "15.7.13",
"hono": "^4.9.0",
"jiti": "^1.21.7",
"lucide-react": "^0.511.0",
"next": "^15.4.6",
+ "next-themes": "^0.4.6",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"shadcn": "^2.10.0",
- "shiki": "^3.9.2",
+ "shiki": "^3.13.0",
"tailwind-merge": "^3.3.1",
+ "ts-morph": "^26.0.0",
"twoslash": "^0.3.4",
"zod": "3.25.64"
},
diff --git a/apps/docs/src/app/docs/[[...slug]]/page.tsx b/apps/docs/src/app/docs/(docs)/[[...slug]]/page.tsx
similarity index 100%
rename from apps/docs/src/app/docs/[[...slug]]/page.tsx
rename to apps/docs/src/app/docs/(docs)/[[...slug]]/page.tsx
diff --git a/apps/docs/src/app/docs/layout.tsx b/apps/docs/src/app/docs/(docs)/layout.tsx
similarity index 93%
rename from apps/docs/src/app/docs/layout.tsx
rename to apps/docs/src/app/docs/(docs)/layout.tsx
index 6f51a33d..aeeab9b1 100644
--- a/apps/docs/src/app/docs/layout.tsx
+++ b/apps/docs/src/app/docs/(docs)/layout.tsx
@@ -1,4 +1,4 @@
-import { DocsLayout } from "fumadocs-ui/layouts/docs";
+import { DocsLayout } from "@/components/layout/docs";
import type { ReactNode } from "react";
import { baseOptions } from "@/app/layout.config";
import { source } from "@/lib/source";
diff --git a/apps/docs/src/app/docs/templates/[...slug]/page.tsx b/apps/docs/src/app/docs/templates/[...slug]/page.tsx
new file mode 100644
index 00000000..43602c37
--- /dev/null
+++ b/apps/docs/src/app/docs/templates/[...slug]/page.tsx
@@ -0,0 +1,152 @@
+import { getAllTemplates, getTemplateByName } from "@/lib/templates";
+import { notFound } from "next/navigation";
+import Link from "next/link";
+import { ArrowLeft, Package, ExternalLink } from "lucide-react";
+import type { Metadata } from "next";
+
+interface TemplatePageProps {
+ params: Promise<{ slug: string[] }>;
+}
+
+export async function generateStaticParams() {
+ const templates = await getAllTemplates();
+
+ return templates.map((template) => ({
+ slug: template.name.split("/"),
+ }));
+}
+
+export async function generateMetadata({
+ params,
+}: TemplatePageProps): Promise {
+ const { slug } = await params;
+ const templateName = slug.join("/");
+
+ const template = await getTemplateByName(templateName);
+
+ if (!template) {
+ return {
+ title: "Template Not Found",
+ };
+ }
+
+ return {
+ title: `${template.title} - ProofKit Templates`,
+ description:
+ template.description ||
+ `Learn about the ${template.title} template for ProofKit applications.`,
+ };
+}
+
+export default async function TemplatePage({ params }: TemplatePageProps) {
+ const { slug } = await params;
+ const templateName = slug.join("/");
+
+ const template = await getTemplateByName(templateName);
+
+ if (!template) {
+ notFound();
+ }
+
+ return (
+
+ {/* Template header */}
+
+
+
+
+
+
+
{template.title}
+ {template.description && (
+
+ {template.description}
+
+ )}
+
+
+
+
+
+ {template.category}
+
+
+ {template.name}
+
+
+
+
+ {/* Template content */}
+
+
+
+
+ Template Details
+
+
+
+
+
+ Installation
+
+
+ npx proofkit@latest add {template.name}
+
+
+
+
+
+ Registry Path
+
+
+ {template.name}
+
+
+
+
+
+ Category
+
+
{template.category}
+
+
+
+
+ {/* Placeholder content - you can expand this later */}
+
+
About this template
+
+ This template provides{" "}
+ {template.description?.toLowerCase() ||
+ "functionality for your ProofKit application"}
+ .
+
+
+
+
+ Coming soon: Detailed documentation, code
+ examples, and usage guides will be available here.
+
- {/* Placeholder content - you can expand this later */}
-
-
About this template
-
- This template provides{" "}
- {template.description?.toLowerCase() ||
- "functionality for your ProofKit application"}
- .
-
-
-
-
- Coming soon: Detailed documentation, code
- examples, and usage guides will be available here.
-
-
-
+
);
diff --git a/apps/docs/src/components/CliCommand.tsx b/apps/docs/src/components/CliCommand.tsx
index 87b8add2..4932090b 100644
--- a/apps/docs/src/components/CliCommand.tsx
+++ b/apps/docs/src/components/CliCommand.tsx
@@ -1,5 +1,7 @@
+"use client";
import { DynamicCodeBlock } from "fumadocs-ui/components/dynamic-codeblock";
import { Tabs, Tab } from "fumadocs-ui/components/tabs";
+import { cliVersion } from "@/lib/constants";
const MANAGERS = [
{
@@ -31,7 +33,7 @@ const MANAGERS = [
export function CliCommand({
command,
exec,
- execPackage = "@proofkit/cli",
+ execPackage = `@proofkit/cli@${cliVersion}`,
}: {
command: string;
exec?: boolean;
diff --git a/apps/docs/src/components/InitCommand.tsx b/apps/docs/src/components/InitCommand.tsx
index a64521ee..59be04f0 100644
--- a/apps/docs/src/components/InitCommand.tsx
+++ b/apps/docs/src/components/InitCommand.tsx
@@ -1,10 +1,11 @@
import { DynamicCodeBlock } from "fumadocs-ui/components/dynamic-codeblock";
import { Tabs, Tab } from "fumadocs-ui/components/tabs";
+import { cliVersion } from "@/lib/constants";
const MANAGERS = [
- { key: "pnpm", label: "pnpm", command: "pnpm create proofkit@latest" },
- { key: "npm", label: "npm", command: "npx create-proofkit@latest" },
- { key: "yarn", label: "yarn", command: "yarn create proofkit@latest" },
+ { key: "pnpm", label: "pnpm", command: `pnpm create proofkit@${cliVersion}` },
+ { key: "npm", label: "npm", command: `npx create-proofkit@${cliVersion}` },
+ { key: "yarn", label: "yarn", command: `yarn create proofkit@${cliVersion}` },
];
export function InitCommand() {
diff --git a/apps/docs/src/lib/constants.ts b/apps/docs/src/lib/constants.ts
new file mode 100644
index 00000000..f5a10200
--- /dev/null
+++ b/apps/docs/src/lib/constants.ts
@@ -0,0 +1,2 @@
+// which version of the CLI to use in the docs
+export const cliVersion: "latest" | "beta" = "beta";
diff --git a/packages/fmdapi/tests/client-methods.test.ts b/packages/fmdapi/tests/client-methods.test.ts
index 257ef907..b0502136 100644
--- a/packages/fmdapi/tests/client-methods.test.ts
+++ b/packages/fmdapi/tests/client-methods.test.ts
@@ -19,8 +19,8 @@ describe("sort methods", () => {
sort: { fieldName: "recordId", sortOrder: "descend" },
});
expect(resp.data.length).toBe(3);
- const firstRecord = parseInt(resp.data[0].fieldData.recordId as string);
- const secondRecord = parseInt(resp.data[1].fieldData.recordId as string);
+ const firstRecord = parseInt(resp.data[0]?.fieldData.recordId as string);
+ const secondRecord = parseInt(resp.data[1]?.fieldData.recordId as string);
expect(firstRecord).toBeGreaterThan(secondRecord);
});
test("should sort ascending by default", async () => {
@@ -28,8 +28,8 @@ describe("sort methods", () => {
sort: { fieldName: "recordId" },
});
- const firstRecord = parseInt(resp.data[0].fieldData.recordId as string);
- const secondRecord = parseInt(resp.data[1].fieldData.recordId as string);
+ const firstRecord = parseInt(resp.data[0]?.fieldData.recordId as string);
+ const secondRecord = parseInt(resp.data[1]?.fieldData.recordId as string);
expect(secondRecord).toBeGreaterThan(firstRecord);
});
});
@@ -48,6 +48,7 @@ describe("find methods", () => {
const resp = await client.find({
query: { anything: "anything" },
});
+
expect(Array.isArray(resp.data)).toBe(true);
});
test("successful findFirst with multiple return", async () => {
@@ -75,7 +76,7 @@ describe("portal methods", () => {
const result = await layoutClient.list({
limit: 1,
});
- expect(result.data[0].portalData.test.length).toBe(50); // default portal limit is 50
+ expect(result.data[0]?.portalData?.test?.length).toBe(50); // default portal limit is 50
const { data } = await layoutClient.list({
limit: 1,
@@ -83,10 +84,10 @@ describe("portal methods", () => {
});
expect(data.length).toBe(1);
- const portalData = data[0].portalData;
- const testPortal = portalData.test;
- expect(testPortal.length).toBe(1);
- expect(testPortal[0]["related::related_field"]).toContain("2"); // we should get the 2nd record
+ const portalData = data[0]?.portalData;
+ const testPortal = portalData?.test;
+ expect(testPortal?.length).toBe(1);
+ expect(testPortal?.[0]?.["related::related_field"]).toContain("2"); // we should get the 2nd record
});
it("should update portal data", async () => {
await layoutClient.update({
@@ -106,13 +107,13 @@ describe("portal methods", () => {
});
expect(
- "long_and_strange.portalName#forTesting" in data[0].portalData,
+ "long_and_strange.portalName#forTesting" in (data?.[0]?.portalData ?? {}),
).toBeTruthy();
const portalData =
- data[0].portalData["long_and_strange.portalName#forTesting"];
+ data[0]?.portalData["long_and_strange.portalName#forTesting"];
- expect(portalData.length).toBeGreaterThan(50);
+ expect(portalData?.length).toBeGreaterThan(50);
});
});
diff --git a/packages/fmdapi/tests/tsconfig.json b/packages/fmdapi/tests/tsconfig.json
index f4d49859..2aea2cf0 100644
--- a/packages/fmdapi/tests/tsconfig.json
+++ b/packages/fmdapi/tests/tsconfig.json
@@ -3,7 +3,8 @@
"compilerOptions": {
"noEmit": true,
"types": ["vitest", "node"],
- "isolatedModules": true
+ "isolatedModules": true,
+ "rootDir": "../"
},
"include": ["./**/*.ts"],
"exclude": ["../dist", "../schema"]
diff --git a/packages/typegen/src/buildSchema.ts b/packages/typegen/src/buildSchema.ts
index 3ce4986e..34e9bf85 100644
--- a/packages/typegen/src/buildSchema.ts
+++ b/packages/typegen/src/buildSchema.ts
@@ -35,6 +35,7 @@ export function buildSchema(
schemaFile.addImportDeclaration({
moduleSpecifier: "@proofkit/fmdapi",
namedImports: ["InferZodPortals"],
+ isTypeOnly: true,
});
}
}
@@ -349,6 +350,7 @@ export function buildOverrideFile(
overrideFile.addImportDeclaration({
moduleSpecifier: "@proofkit/fmdapi",
namedImports: ["InferZodPortals"],
+ isTypeOnly: true,
});
}
diff --git a/packages/typegen/tests/__snapshots__/strict-numbers.snap.ts b/packages/typegen/tests/__snapshots__/strict-numbers.snap.ts
index f5798ab2..050d9f46 100644
--- a/packages/typegen/tests/__snapshots__/strict-numbers.snap.ts
+++ b/packages/typegen/tests/__snapshots__/strict-numbers.snap.ts
@@ -4,7 +4,7 @@
* DO NOT EDIT THIS FILE DIRECTLY. Changes may be overritten
*/
import { z } from "zod/v4";
-import { InferZodPortals } from "@proofkit/fmdapi";
+import type { InferZodPortals } from "@proofkit/fmdapi";
// @generated
// prettier-ignore
diff --git a/packages/typegen/tests/__snapshots__/zod-layout-client.snap.ts b/packages/typegen/tests/__snapshots__/zod-layout-client.snap.ts
index 2cd6f680..e2fef985 100644
--- a/packages/typegen/tests/__snapshots__/zod-layout-client.snap.ts
+++ b/packages/typegen/tests/__snapshots__/zod-layout-client.snap.ts
@@ -4,7 +4,7 @@
* DO NOT EDIT THIS FILE DIRECTLY. Changes may be overritten
*/
import { z } from "zod";
-import { InferZodPortals } from "@proofkit/fmdapi";
+import type { InferZodPortals } from "@proofkit/fmdapi";
// @generated
// prettier-ignore
diff --git a/packages/typegen/tests/__snapshots__/zod-layout-overrides.snap.ts b/packages/typegen/tests/__snapshots__/zod-layout-overrides.snap.ts
index 4052537e..eeefb91d 100644
--- a/packages/typegen/tests/__snapshots__/zod-layout-overrides.snap.ts
+++ b/packages/typegen/tests/__snapshots__/zod-layout-overrides.snap.ts
@@ -8,7 +8,7 @@ import {
ZVLYesNo as ZVLYesNo_generated,
ZtestLayout as ZtestLayout_generated,
} from "./generated/testLayout";
-import { InferZodPortals } from "@proofkit/fmdapi";
+import type { InferZodPortals } from "@proofkit/fmdapi";
export const Ztest = Ztest_generated;
From 7522e6196ef1d24b6dd425e1fa94a531e250ef2a Mon Sep 17 00:00:00 2001
From: Eric Luce <37158449+eluce2@users.noreply.github.com>
Date: Fri, 26 Sep 2025 10:37:28 -0500
Subject: [PATCH 5/6] Fix typos and improve clarity in documentation and code
comments across various files. Update CLI command references and enhance
error handling in template category management. Ensure consistent formatting
in layout components and improve accessibility attributes.
---
.../content/docs/better-auth/installation.mdx | 6 +-
.../cli/guides/adding-components/index.mdx | 2 +-
.../content/docs/cli/guides/auth/add-on.mdx | 2 +-
.../content/docs/cli/guides/motivation.mdx | 2 +-
apps/docs/content/docs/cli/index.mdx | 6 +-
apps/docs/content/docs/cli/v2.mdx | 6 +-
.../src/app/docs/templates/category-config.ts | 6 +-
apps/docs/src/app/docs/templates/layout.tsx | 1 +
.../app/docs/templates/templates-client.tsx | 21 ++-
apps/docs/src/components/CliCommand.tsx | 2 +-
.../components/layout/docs/page-client.tsx | 141 ++++++++++--------
apps/docs/src/components/layout/page.tsx | 62 ++++----
.../src/components/layout/shared/index.tsx | 30 ++--
apps/docs/src/components/root-toggle.tsx | 2 +-
apps/docs/src/components/ui/scroll-area.tsx | 18 +--
apps/docs/src/lib/templates.ts | 12 +-
16 files changed, 170 insertions(+), 149 deletions(-)
diff --git a/apps/docs/content/docs/better-auth/installation.mdx b/apps/docs/content/docs/better-auth/installation.mdx
index a5891415..fa078ff6 100644
--- a/apps/docs/content/docs/better-auth/installation.mdx
+++ b/apps/docs/content/docs/better-auth/installation.mdx
@@ -18,10 +18,10 @@ This package is currently in beta. Please report any issues you find to the [Git
# Step 1a: Automated Setup with the ProofKit CLI
-This automated setup expects you to have Next.js and shadcn/ui setup in your project. It will also setup various auth pages for you, but these may not work if you have a prefix configured for tailwindcss. You can use this opinionated setup to get you started, or if you need more control you should refer to the manual setup.
+This automated setup expects you to have Next.js and shadcn/ui set up in your project. It will also setup various auth pages for you, but these may not work if you have a prefix configured for tailwindcss. You can use this opinionated setup to get you started, or if you need more control you should refer to the manual setup.
-Run the following command to add the neccesary packages and config files to your project. You will not need to follow the better-auth installation guide.
+Run the following command to add the necessary packages and config files to your project. You will not need to follow the better-auth installation guide.
# Step 1b: Manual Setup
@@ -64,7 +64,7 @@ export const auth = betterAuth({
Run the following command to create the necessary tables and fields in your FileMaker file. It will show you a confirmation before any changes are applied, so you can review them.
-[Full Access] credentials are required for the schema changes to be applied automatically, but you may want to use a more restricted account for the rest of better-auth usage. If your credentials that you entered eariler in the `auth.ts` file do not have the [Full Access] permissions, you can override them in the CLI.
+[Full Access] credentials are required for the schema changes to be applied automatically, but you may want to use a more restricted account for the rest of better-auth usage. If your credentials that you entered earlier in the `auth.ts` file do not have the [Full Access] permissions, you can override them in the CLI.
These changes affect database schema only. No layouts or relationships are created or modified during this process.
diff --git a/apps/docs/content/docs/cli/guides/adding-components/index.mdx b/apps/docs/content/docs/cli/guides/adding-components/index.mdx
index 7ecae47a..44d3f943 100644
--- a/apps/docs/content/docs/cli/guides/adding-components/index.mdx
+++ b/apps/docs/content/docs/cli/guides/adding-components/index.mdx
@@ -7,7 +7,7 @@ icon: puzzle
import { CliCommand } from "@/components/CliCommand";
-After initilizing a new ProofKit project, you can use the CLI to add new components and features.
+After initializing a new ProofKit project, you can use the CLI to add new components and features.
The `add` is now more dynamic and may change over time. To see all available items you can add via this command, see the [full list of templates available here](/docs/templates)
diff --git a/apps/docs/content/docs/cli/guides/auth/add-on.mdx b/apps/docs/content/docs/cli/guides/auth/add-on.mdx
index c1fbef45..28f80484 100644
--- a/apps/docs/content/docs/cli/guides/auth/add-on.mdx
+++ b/apps/docs/content/docs/cli/guides/auth/add-on.mdx
@@ -7,7 +7,7 @@ import { CliCommand } from "@/components/CliCommand";
-This component is no longer the reccomended approach for self-hosting your web app's authentication in FileMaker. Instead, check out the [Better-Auth installation guide](/docs/better-auth/installation) for a more flexible and customizable solution.
+This component is no longer the recommended approach for self-hosting your web app's authentication in FileMaker. Instead, check out the [Better-Auth installation guide](/docs/better-auth/installation) for a more flexible and customizable solution.
ProofKit includes a self-hosted authentication solution that is built to be flexible and easy to customize. Rather than using a third-party library or authentication service, the ProofKit CLI installs all of the necessary functions into your project and then you just have to install the FileMaker add-on in your FileMaker file to get the necessary tables in your database.
diff --git a/apps/docs/content/docs/cli/guides/motivation.mdx b/apps/docs/content/docs/cli/guides/motivation.mdx
index af60fefc..21f1fe1e 100644
--- a/apps/docs/content/docs/cli/guides/motivation.mdx
+++ b/apps/docs/content/docs/cli/guides/motivation.mdx
@@ -72,4 +72,4 @@ A hosted authentication service that is extremely easy to set up and use. It's a
#### [Better-Auth](https://better-auth.com/) (self-hosted)
-For when you need a bit more flexibility or if you want to self-host the authentication layer within your existing FileMaker solution. Better-auth is a great choice for this, and the [proofkit/better-auth](/docs/better-auth) adapter allows you to use FileMaker as your backend database, including automated schema migrations to easily add any neccesary tables and fields to your FileMaker file.
+For when you need a bit more flexibility or if you want to self-host the authentication layer within your existing FileMaker solution. Better-auth is a great choice for this, and the [proofkit/better-auth](/docs/better-auth) adapter allows you to use FileMaker as your backend database, including automated schema migrations to easily add any necessary tables and fields to your FileMaker file.
diff --git a/apps/docs/content/docs/cli/index.mdx b/apps/docs/content/docs/cli/index.mdx
index c38e49da..ac105347 100644
--- a/apps/docs/content/docs/cli/index.mdx
+++ b/apps/docs/content/docs/cli/index.mdx
@@ -10,15 +10,13 @@ import { Card } from "fumadocs-ui/components/card";
## What is ProofKit?
ProofKit is a collection of TypeScript tools and libraries for building modern web applications, with a focus on seamless integration with Claris FileMaker.
-The ProofKit CLI aims to make web development easier for beginners and more efficient for experienced devs. It’s opinionated structure allows for more than just a starter template or bootstrapping tool, but code-mod scripts that can modify a project after the initial setup.
+The ProofKit CLI aims to make web development easier for beginners and more efficient for experienced devs. Its opinionated structure allows for more than just a starter template or bootstrapping tool, but code-mod scripts that can modify a project after the initial setup.
Think of it as our experience building web apps encapsulated into a CLI tool to help you structure your project and add to it over time. Each template is just a starting point, and you are free to modify any part of it as you see fit.
## Core Libraries
-The ProofKit CLI will automatically install these other packages for you (depending on what you choose to build), but they are published seperately if you want to use them in your own projects, without the opinionated structure provided by the CLI.
-
-
+The ProofKit CLI will automatically install these other packages for you (depending on what you choose to build), but they are published separately if you want to use them in your own projects, without the opinionated structure provided by the CLI.
A library for interacting with the FileMaker Data API.
diff --git a/apps/docs/content/docs/cli/v2.mdx b/apps/docs/content/docs/cli/v2.mdx
index 374df578..a0e4bc33 100644
--- a/apps/docs/content/docs/cli/v2.mdx
+++ b/apps/docs/content/docs/cli/v2.mdx
@@ -7,7 +7,7 @@ description: In this major release, the ProofKit CLI has been reimagined as a mo
### A new starting point
-When you start a new app using the ProofKit CLI, the new template is based on shadcn and tailwindcss instead of Mantine. This new simple template still includes the best practices from the Proof+Geist team, but with now with even more flexibility.
+When you start a new app using the ProofKit CLI, the new template is based on shadcn and tailwindcss instead of Mantine. This new simple template still includes the best practices from the Proof+Geist team, but now with even more flexibility.
### A new way to add [anything]
@@ -15,11 +15,11 @@ The `proofkit add` command leverages the shadcn CLI to install any component or
### A new level of compatibility
-You can now use the ProofKit CLI in an existing Next.js app, even if it wasn’t bootstraped with the CLI, as long as it's already using shadcn. This unlocks the ability for more advanced developers to leverage the power of ProofKit, while still trying out the latest and greatest in the JavaScript ecosystem.
+You can now use the ProofKit CLI in an existing Next.js app, even if it wasn’t bootstrapped with the CLI, as long as it's already using shadcn. This unlocks the ability for more advanced developers to leverage the power of ProofKit, while still trying out the latest and greatest in the JavaScript ecosystem.
# Why the change?
-Adding new templates to the ProofKit CLI was always a challenge, and arugably the most lacking of the whole system. The templates are meant to be just a starting place, so they needed to be generic to fit any project, yet useful enough to warrant inclusion in the binary everyone downloads to run the CLI. That wasn’t scalable. But shadcn has taken the JavaScript world by storm of the past few year, especially with the rise of AI and especially tools like v0. We needed to unlock the ability to easily add anything to your JavaScript projects, whether it was a template from Proof, shadcn, v0 (AI-generated), or from any of the other emerging UI libraries built on the shadcn CLI.
+Adding new templates to the ProofKit CLI was always a challenge, and arguably the most lacking of the whole system. The templates are meant to be just a starting place, so they needed to be generic to fit any project, yet useful enough to warrant inclusion in the binary everyone downloads to run the CLI. That wasn’t scalable. But shadcn has taken the JavaScript world by storm over the past few years, especially with the rise of AI and especially tools like v0. We needed to unlock the ability to easily add anything to your JavaScript projects, whether it was a template from Proof, shadcn, v0 (AI-generated), or from any of the other emerging UI libraries built on the shadcn CLI.
But this required a new starting point. While mantine and tailwind can be used together in the same project, they get in each other’s way. At Proof+Geist, we’ve been building new projects without ProofKit for a few months now, so it was time to bring those learnings back to the framework so we could all move more quickly. New projects will start with a new foundation based on tailwindcss. It’s easier for AI to understand, and more compatible with any UI component built for shadcn to install for you.
diff --git a/apps/docs/src/app/docs/templates/category-config.ts b/apps/docs/src/app/docs/templates/category-config.ts
index b620de25..2836a992 100644
--- a/apps/docs/src/app/docs/templates/category-config.ts
+++ b/apps/docs/src/app/docs/templates/category-config.ts
@@ -49,5 +49,9 @@ export const categoryConfigMap = categoryConfigs.reduce(
// Helper function to get category configuration
export const getCategoryConfig = (category: Category): CategoryConfig => {
- return categoryConfigMap[category];
+ const config = categoryConfigMap[category];
+ if (!config) {
+ throw new Error(`Unknown template category: ${category as string}`);
+ }
+ return config;
};
diff --git a/apps/docs/src/app/docs/templates/layout.tsx b/apps/docs/src/app/docs/templates/layout.tsx
index 2c707f0a..f8305607 100644
--- a/apps/docs/src/app/docs/templates/layout.tsx
+++ b/apps/docs/src/app/docs/templates/layout.tsx
@@ -88,6 +88,7 @@ export default async function Layout({ children }: { children: ReactNode }) {
Proof+Geist
diff --git a/apps/docs/src/app/docs/templates/templates-client.tsx b/apps/docs/src/app/docs/templates/templates-client.tsx
index 005b9b26..5fa97da7 100644
--- a/apps/docs/src/app/docs/templates/templates-client.tsx
+++ b/apps/docs/src/app/docs/templates/templates-client.tsx
@@ -4,11 +4,18 @@ import { useState, useMemo } from "react";
import Link from "next/link";
import { Search, Package } from "lucide-react";
import type { TemplateWithPath } from "@/lib/templates";
-import { getCategoryConfig, categoryConfigs } from "./category-config";
+import {
+ getCategoryConfig,
+ categoryConfigs,
+ type CategoryConfig,
+} from "./category-config";
+import type { TemplateMetadata } from "@proofkit/registry";
+
+type Category = TemplateMetadata["category"];
interface TemplatesPageClientProps {
templates: TemplateWithPath[];
- templatesByCategory: Record;
+ templatesByCategory: Record;
}
export function TemplatesPageClient({
@@ -16,7 +23,9 @@ export function TemplatesPageClient({
templatesByCategory,
}: TemplatesPageClientProps) {
const [searchQuery, setSearchQuery] = useState("");
- const [selectedCategory, setSelectedCategory] = useState(null);
+ const [selectedCategory, setSelectedCategory] = useState(
+ null,
+ );
const filteredTemplates = useMemo(() => {
let filtered = templates;
@@ -79,7 +88,7 @@ export function TemplatesPageClient({
All ({templates.length})
{categories.map((category) => {
- const config = getCategoryConfig(category as any);
+ const config = getCategoryConfig(category);
const CategoryIcon = config.icon;
return (