Generating Content Types

Automatically generate Content Types from your existing Firestore data using Firepanel's generator.

Firepanel offers two ways to create content types automatically instead of building them by hand:

  • Generate from data — analyses your existing Firestore collections and proposes matching content types. Best when you already have a populated database.
  • Generate with AI — describe the content type you want in plain language and AI designs its fields for you. Best when you're starting from scratch. See Generate with AI below.

Generate from Data

If your Firebase project already has data in Firestore, you can use the Content Type Generator to automatically create content types and components based on your existing collections. This is the fastest way to get started when you already have a populated database.

How It Works

The generator analyses your Firestore collections by scanning document structures, identifying field types, and detecting relationships between collections. It then proposes a set of content types and reusable components that match your data.

Generating from Data

1

Open Content Types

Navigate to Content Types in the left sidebar. If no content types exist yet, you will see an empty state with options to get started.

2

Click Generate from data

Click the Generate from data button. If you already have content types, this button appears at the top of the page. If your project has no content types yet, you'll find it as one of the options on the empty state screen.

3

Wait for analysis

Firepanel scans your Firestore collections and analyses the document structures. This may take a moment depending on the size of your database.

4

Review the preview

A preview screen shows all the content types and components that will be created. Each item lists:

  • Name — the collection or component name
  • Fields — the detected fields and their types
  • Dependencies — components or related content types required by this item

Note:

Some field types are only available on certain subscription plans. If a detected field type is not included in your current plan, it will fall back to a basic field type. You can upgrade your plan later and update the fields manually.

5

Select what to import

By default, all detected items are selected. You can uncheck individual collections or components you don't want to import.

Note:

Some items depend on others. For example, if a collection uses a component, unchecking that component will require unchecking the dependent collection first.

6

Choose overwrite behavior

If you already have existing content types, you can toggle the Overwrite option to replace them with the newly generated ones.

7

Confirm and import

Click Import to create the selected content types and components. Once complete, a success message confirms the import.

Generate with AI

If you're starting from scratch, you can describe the content type you want and let AI design its fields. This uses Vertex AI (Gemini) running on your own Google Cloud project.

Note:

Generate with AI requires the AI feature (available on the Startup plan and above) and AI to be set up for the project. See AI settings to enable it. The Generate with AI button only appears when your plan includes AI.

1

Open Content Types

Navigate to Content Types in the left sidebar. Click Generate with AI at the top of the page, or on the New content-type screen.

2

Describe your content type

In the dialog, describe the content type you want — for example, "a blog with posts, authors and categories". Prompts can be up to 2000 characters.

3

Generate

Click Generate content-type. AI proposes the fields and Firepanel creates the content type. Depending on your prompt, it may create a top-level collection, a sub-collection, or a reusable component.

4

Review and edit

Firepanel opens the generated content type in the editor so you can review and adjust its fields before using it.

Note:

If AI has not been set up for the project, clicking Generate with AI takes you to Project SettingsAI to complete setup first.

After Generating

Once the content types are imported, navigate to Content to start browsing and editing your Firestore data using the generated schemas. You can further customise the generated content types by editing their fields, adding components, or configuring actions.

Note:

The generator does its best to infer field types from your data, but you may need to adjust some fields manually. For example, a string field that contains URLs might be better configured as a specific field type.