-
Notifications
You must be signed in to change notification settings - Fork 2
template docs #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
template docs #74
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a15fbb3
template docs
eluce2 2485b51
Update documentation for ProofKit CLI v2, highlighting new features s…
eluce2 d88124c
Update CLI to version 2.0.0-beta.3, changing default UI to shadcn/ui …
eluce2 4d9d0e9
Refactor template page and CLI command components for improved clarit…
eluce2 7522e61
Fix typos and improve clarity in documentation and code comments acro…
eluce2 e86e9f5
fix(docs): resolve TypeScript error in templates.ts
eluce2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@proofkit/typegen": patch | ||
| --- | ||
|
|
||
| Add type import to the `InferZodPortals` import |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| --- | ||
| "@proofkit/cli": minor | ||
| "@proofkit/cli": major | ||
| --- | ||
|
|
||
| CLI defaults to shadcn/ui for new projects. Legacy Mantine templates are still available via a hidden `--ui mantine` flag during `init`. The selected UI is persisted in `proofkit.json` as `ui`. Existing projects using Mantine are auto-detected and remain fully supported. For shadcn-based projects, adding new pages or auth via `proofkit add` requires passing the name of the component you want to add, such as `proofkit add table/basic`. Interactive selection of templates will come back soon! | ||
| Learn more about v2 in the docs: [https://proofkit.com/docs/cli/v2](https://proofkit.com/docs/cli/v2) | ||
|
|
||
| This release also deprecates the `mantine` UI templates. In the next major release of the CLI, the `mantine` UI templates will no longer be supported for new projects. | ||
| CLI now defaults to shadcn/ui for new projects. Legacy Mantine templates are still available via a hidden `--ui mantine` flag during `init`. The selected UI is persisted in `proofkit.json` as `ui`. Existing projects using Mantine may not be fully supported. | ||
|
|
||
| For adding new pages or auth via `proofkit add`, you will need to pass the name of the component you want to add, such as `proofkit add table/basic`. See new templates in the [docs](/docs/templates). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "aliases": { | ||
| "uiDir": "./components/ui", | ||
| "componentsDir": "./components", | ||
| "blockDir": "./components", | ||
| "cssDir": "./styles", | ||
| "libDir": "./lib" | ||
| }, | ||
| "baseDir": "src", | ||
| "commands": {} | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
apps/docs/content/docs/cli/guides/adding-components/meta.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "title": "Adding Components", | ||
| "icon": "puzzle", | ||
| "pages": ["templates"], | ||
| "defaultOpen": true | ||
| } |
9 changes: 9 additions & 0 deletions
9
apps/docs/content/docs/cli/guides/adding-components/templates.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| title: All Templates | ||
| icon: ExternalLink | ||
| --- | ||
|
|
||
| import Redirect from "@/components/redirect"; | ||
|
|
||
| # ProofKit Templates | ||
| <Redirect href="/docs/templates" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ sidebar: | |
|
|
||
| import { Card } from "fumadocs-ui/components/card"; | ||
| import { Callout } from "fumadocs-ui/components/callout"; | ||
| import { Badge } from "@/components/ui/badge"; | ||
|
|
||
| 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. | ||
|
|
||
|
|
@@ -36,11 +37,20 @@ Here is a list of the frameworks and packages that you'll come across in a Proof | |
|
|
||
| A well-supported open-source React framework for full-stack web applications. This means it runs code on your frontend (in the client's web browser) and backend (on the web server, or API routes). It makes it easy to get a web app up and running with all the features that we expect from a modern web app and is used by companies of all sizes to power their online presence. | ||
|
|
||
| #### [Mantine](https://mantine.dev/) | ||
| #### [Shadcn/ui](https://ui.shadcn.com/) <Badge className="bg-blue-200 text-blue-700 dark:bg-blue-500 dark:text-blue-50 ">NEW</Badge> | ||
|
|
||
| A vast, themeable component library for React. We use their default components and styles to build apps very quickly, but with the option of adding custom styles or themes later if needed. Mantine also includes many helpful React hooks, and they provide a Modal and Notification system to ProofKit apps. | ||
| A themeable component library for React. We use their default components and styles to build apps very quickly, but with the option of adding custom styles or themes later if needed. Shadcn/ui also includes many helpful React hooks, and they provide a Modal and Notification system to ProofKit apps. | ||
|
|
||
| Why not tailwind css and/or shadcn/ui? We've chosen to focus on Mantine because it has allowed our team to work much faster for the kinds of web apps that we build for our clients. When you're working on multiple projects at once, it's actually a benefit to **not** own the component code within an individual codebase, so that it can be more easily upgraded when the time comes. However, we have not ruled out other components and style systems and may add support for them in the future. | ||
| Using the shadcn CLI, you can install any component or utility from any compatible library. This makes shadcn the best choice for the most flexible and customizable apps. Some of our favorite shadcn-compatible libraries are: | ||
| - [Kibu Ui](https://www.kibo-ui.com/) | ||
| - [reui](https://reui.io/) | ||
| - [Magic UI](https://magicui.design/) | ||
| - [tweakcn (easily theme your components)](https://tweakcn.com/) | ||
| - [A longer list of more...](https://github.com/birobirobiro/awesome-shadcn-ui) | ||
|
|
||
| #### [Tailwind CSS](https://tailwindcss.com/) <Badge className="bg-blue-200 text-blue-700 dark:bg-blue-500 dark:text-blue-50 ">NEW</Badge> | ||
|
Comment on lines
+40
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typos/brand casing and a factual correction for TanStack Query.
Apply this diff: -#### [Shadcn/ui](https://ui.shadcn.com/) <Badge className="bg-blue-200 text-blue-700 dark:bg-blue-500 dark:text-blue-50 ">NEW</Badge>
+#### [shadcn/ui](https://ui.shadcn.com/) <Badge className="bg-blue-200 text-blue-700 dark:bg-blue-500 dark:text-blue-50 ">NEW</Badge>
…
-Some of our favorite shadcn-compatible libraries are:
-- [Kibu Ui](https://www.kibo-ui.com/)
+Some of our favorite shadcn-compatible libraries are:
+- [Kibo UI](https://www.kibo-ui.com/)
- [reui](https://reui.io/)
- [Magic UI](https://magicui.design/)
- [tweakcn (easily theme your components)](https://tweakcn.com/)
- [A longer list of more...](https://github.com/birobirobiro/awesome-shadcn-ui)
…
-#### [Tanstack Query](https://tanstack.com/query)
+#### [TanStack Query](https://tanstack.com/query)
…
-Sometimes also known as "React Query"; a library for managing server state in React. It's used by ProofKit to fetch data from external sources, such as REST APIs, so we can be certain that the "shape" of our data matches what we expected during development.
+Sometimes also known as "React Query"; a library for managing server state in React. It's used by ProofKit for fetching, caching, deduping, background updates, and invalidation of server data.
…
-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.Also applies to: 55-62, 73-76 🤖 Prompt for AI Agents |
||
|
|
||
| A utility-first CSS framework for rapidly building custom user interfaces. It's used by shadcn (and related libraries) to style the components and pages in your app. | ||
|
|
||
| #### [Tanstack Query](https://tanstack.com/query) | ||
|
|
||
|
|
@@ -60,17 +70,6 @@ A wrapper around Next.js actions that include middleware (for easily checking th | |
|
|
||
| A hosted authentication service that is extremely easy to set up and use. It's a great choice to secure most customer-facing web apps, including built-in features such as Social logins, magic link, multi-factor authentication, and more. | ||
|
|
||
| #### Self-Hosted Auth | ||
|
|
||
| For when you need a bit more flexibility or if you want to self-host the authentication layer, ProofKit can also scaffold out all the security functions required for you to manage your own authentication. Learn more in this guide: [FileMaker Add-on Auth](/docs/cli/guides/auth/add-on) | ||
|
|
||
|
|
||
| ### Data Sources | ||
|
|
||
| #### [Supabase](https://supabase.com/) | ||
|
|
||
| An open-source set of tools that are centered around a Postgres database. They also offer an authentication layer to handle user logins all under one roof. | ||
|
|
||
| #### [FileMaker](https://www.claris.com/) | ||
| #### [Better-Auth](https://better-auth.com/) (self-hosted) | ||
|
|
||
| A database and application development platform that allows users to create custom apps and automate processes. | ||
| 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| 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 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 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 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. | ||
|
|
||
| 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 | ||
|
|
||
| <Callout title="We want your feedback!"> | ||
| 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) | ||
| </Callout> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| "pages": ["cli", "fmdapi", "webviewer", "typegen", "better-auth"] | ||
| "pages": ["cli", "templates", "fmdapi", "webviewer", "typegen", "better-auth"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| --- | ||
| title: ProofKit Templates | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "title": "Templates", | ||
| "description": "Quickly install via CLI", | ||
| "icon": "Puzzle", | ||
| "root": true | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos/wording: “is setup” → “is set up”.
Also simplify phrasing.
Apply this diff:
📝 Committable suggestion
🤖 Prompt for AI Agents