Skip to content

Commit 7522e61

Browse files
committed
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.
1 parent 4d9d0e9 commit 7522e61

File tree

16 files changed

+170
-149
lines changed

16 files changed

+170
-149
lines changed

apps/docs/content/docs/better-auth/installation.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ This package is currently in beta. Please report any issues you find to the [Git
1818

1919
# Step 1a: Automated Setup with the ProofKit CLI
2020
<Callout type="warning">
21-
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.
21+
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.
2222
</Callout>
2323

24-
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.
24+
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.
2525
<CliCommand command="add better-auth" exec />
2626

2727
# Step 1b: Manual Setup
@@ -64,7 +64,7 @@ export const auth = betterAuth({
6464
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.
6565
<CliCommand command="migrate" exec execPackage="@proofkit/better-auth@latest" />
6666

67-
[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.
67+
[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.
6868
<CliCommand command={`migrate --username "full_access_username" --password "full_access_password"`} exec execPackage="@proofkit/better-auth@latest" />
6969

7070
These changes affect database schema only. No layouts or relationships are created or modified during this process.

apps/docs/content/docs/cli/guides/adding-components/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ icon: puzzle
77
import { CliCommand } from "@/components/CliCommand";
88

99

10-
After initilizing a new ProofKit project, you can use the CLI to add new components and features.
10+
After initializing a new ProofKit project, you can use the CLI to add new components and features.
1111

1212
<Callout title="Major changes in v2!">
1313
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)

apps/docs/content/docs/cli/guides/auth/add-on.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CliCommand } from "@/components/CliCommand";
77

88

99
<Callout type="warning" title="Deprecated">
10-
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.
10+
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.
1111
</Callout>
1212

1313
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.

apps/docs/content/docs/cli/guides/motivation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ A hosted authentication service that is extremely easy to set up and use. It's a
7272

7373
#### [Better-Auth](https://better-auth.com/) (self-hosted)
7474

75-
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.
75+
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.

apps/docs/content/docs/cli/index.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ import { Card } from "fumadocs-ui/components/card";
1010
## What is ProofKit?
1111
ProofKit is a collection of TypeScript tools and libraries for building modern web applications, with a focus on seamless integration with Claris FileMaker.
1212

13-
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.
13+
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.
1414

1515
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.
1616

1717
## Core Libraries
1818

19-
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.
20-
21-
19+
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.
2220
<Cards>
2321
<Card href="/docs/fmdapi" title="@proofkit/fmdapi">
2422
A library for interacting with the FileMaker Data API.

apps/docs/content/docs/cli/v2.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ description: In this major release, the ProofKit CLI has been reimagined as a mo
77

88
### A new starting point
99

10-
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.
10+
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.
1111

1212
### A new way to add [anything]
1313

1414
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.
1515

1616
### A new level of compatibility
1717

18-
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.
18+
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.
1919

2020
# Why the change?
2121

22-
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.
22+
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.
2323

2424
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.
2525

apps/docs/src/app/docs/templates/category-config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,9 @@ export const categoryConfigMap = categoryConfigs.reduce(
4949

5050
// Helper function to get category configuration
5151
export const getCategoryConfig = (category: Category): CategoryConfig => {
52-
return categoryConfigMap[category];
52+
const config = categoryConfigMap[category];
53+
if (!config) {
54+
throw new Error(`Unknown template category: ${category as string}`);
55+
}
56+
return config;
5357
};

apps/docs/src/app/docs/templates/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export default async function Layout({ children }: { children: ReactNode }) {
8888
<a
8989
href="https://proofgeist.com"
9090
target="_blank"
91+
rel="noopener noreferrer"
9192
className="underline"
9293
>
9394
Proof+Geist

apps/docs/src/app/docs/templates/templates-client.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,28 @@ import { useState, useMemo } from "react";
44
import Link from "next/link";
55
import { Search, Package } from "lucide-react";
66
import type { TemplateWithPath } from "@/lib/templates";
7-
import { getCategoryConfig, categoryConfigs } from "./category-config";
7+
import {
8+
getCategoryConfig,
9+
categoryConfigs,
10+
type CategoryConfig,
11+
} from "./category-config";
12+
import type { TemplateMetadata } from "@proofkit/registry";
13+
14+
type Category = TemplateMetadata["category"];
815

916
interface TemplatesPageClientProps {
1017
templates: TemplateWithPath[];
11-
templatesByCategory: Record<string, TemplateWithPath[]>;
18+
templatesByCategory: Record<Category, TemplateWithPath[]>;
1219
}
1320

1421
export function TemplatesPageClient({
1522
templates,
1623
templatesByCategory,
1724
}: TemplatesPageClientProps) {
1825
const [searchQuery, setSearchQuery] = useState("");
19-
const [selectedCategory, setSelectedCategory] = useState<string | null>(null);
26+
const [selectedCategory, setSelectedCategory] = useState<Category | null>(
27+
null,
28+
);
2029

2130
const filteredTemplates = useMemo(() => {
2231
let filtered = templates;
@@ -79,7 +88,7 @@ export function TemplatesPageClient({
7988
All ({templates.length})
8089
</button>
8190
{categories.map((category) => {
82-
const config = getCategoryConfig(category as any);
91+
const config = getCategoryConfig(category);
8392
const CategoryIcon = config.icon;
8493
return (
8594
<button
@@ -111,7 +120,7 @@ export function TemplatesPageClient({
111120
{" "}
112121
in{" "}
113122
<span className="font-medium">
114-
{getCategoryConfig(selectedCategory as any).name}
123+
{getCategoryConfig(selectedCategory).name}
115124
</span>
116125
</span>
117126
)}
@@ -137,7 +146,7 @@ export function TemplatesPageClient({
137146
<div className="shrink-0 mt-1">
138147
{(() => {
139148
const CategoryIcon = getCategoryConfig(
140-
template.category as any,
149+
template.category,
141150
).icon;
142151
return <CategoryIcon className="h-5 w-5 text-primary" />;
143152
})()}

apps/docs/src/components/CliCommand.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const MANAGERS = [
2020
key: "yarn",
2121
label: "yarn",
2222
prefix: "yarn",
23-
execPrefix: "npx",
23+
execPrefix: "yarn dlx",
2424
},
2525
{
2626
key: "bun",

0 commit comments

Comments
 (0)