Imagine With Craft

Usa l’API di Craft per creare con Bolt.new

Con l’API attiva, i tuoi documenti Craft sono pronti ad alimentare le app che crei. Da lì puoi passare a Bolt.new e costruire qualcosa di nuovo con i dati del tuo documento.

Craft
Bolt

Enabling the API for Documents

First, you have to enable the API in order for Craft to setup an API endpoint for your documents. Then, you use the API endpoint URL to connect to the server from Bolt.

Click the “Imagine” tab in the sidebar

Step 1

Open the “Imagine” tab
Click “Add Your First API Connection” button

Step 2

Click “Add Your First API Connection”
Configure API connection settings

Step 3

Configure your API connection with a name.
Click “Add Document” button

Step 4

Click “Add Document” to select which documents this API connection has access to.
API URL displayed at the top

Step 5

The API URL that will be used to interact with your document is now displayed at the top
Click the “Download AI Bundle” button

Step 6

Click the “Download AI Bundle” button. This will download a folder containing the API documentation and the content of your doc.

Using the API in a Bolt Prompt

Once the API is enabled for your Craft docs, you can now focus on writing a prompt that Bolt will use to generate your project.

In order for Bolt to see how to use the API and understand the structure of your document, you attach the AI bundle to your prompt. This bundle is a markdown document that contains the current content of your Craft doc as well as the API documentation.

Go to Bolt.new

Step 1

Go to Bolt.new. You can create a new project right from the prompt box on the homepage
Upload the instructions

Step 2

Click “Attach file” in the prompt box and upload the AI bundle you downloaded from Craft.
Build your app

Step 3

The attachment should appear in the top left corner of the prompt box.

Ora puoi aggiungere un prompt per descrivere l’app che vuoi creare. Ecco un esempio molto generico che puoi usare per fare dei test:

Crea un sito web che visualizzi il contenuto dei miei documenti Craft collegati, perfavore. Trovi le istruzioni su come accedere a questi dati e alla loro struttura nel file allegato.

Build your app

Step 4

Ora Bolt.new analizzerà il documento e userà l’API per recuperare i dati e creare il sito.

Some Ideas to Get You Started

Browse Examples