Adding Components
How to add new components to your ProofKit project
After initializing a new ProofKit project, you can use the CLI to add new components and features.
Major changes in v2!
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
The ProofKit package is installed in your project, and as a script in your package.json
, so you can run the following command (as long as your current directory is your project root):
npm run proofkit
pnpm proofkit
yarn proofkit
bun proofkit
This will prompt you with a list of available components and features to add to your project.
Adding a Page
ProofKit includes many page templates to help you build out your web app. Use this command to select one.
npm run proofkit add page
pnpm proofkit add page
yarn proofkit add page
bun proofkit add page
If the template you select requires data, you may be prompted to select which data source and schema to use. (If there is only one, it will be selected by default without prompting)
Adding a Data Source
If you need to connect to a new database or FileMaker file, use this command.
npm run proofkit add data
pnpm proofkit add data
yarn proofkit add data
bun proofkit add data
For FileMaker data sources, a single "Data Source" consists of:
- A FileMaker Server
- A FileMaker File
- An OttoFMS API Key (representing a single account name with permission to the file)
If you need to change any one of these (i.e. to connect to a different file on the same server), you'll want to add a new data source.
Adding Schema
When you want to interact with data from a new table or layout, you'll need to add a schema
.
npm run proofkit add schema
pnpm proofkit add schema
yarn proofkit add schema
bun proofkit add schema