AI Prompt: Set up a backend

This prompt can help you set up several backend services for a web app.

  • Cloud Firestore database for your app's structured data.
    The prompt provisions a database instance, writes the code in your app to interact with the database, and writes and deploys Firebase Security Rules to help protect user data.

  • Firebase Authentication to secure your app and user data.
    The prompt guides you to enable your chosen sign-in providers and writes the code in your app to interact with that provider (like adding sign-up and login pages).

You can use this prompt with an existing Firebase project; however, if you don't have a Firebase project, the prompt will guide you through setting up everything for Firebase.


For supported AI coding agents, you can run this prompt using the command: /firebase:init

Below, you can find important prerequisites and limitations for this prompt, as well as usage instructions for supported AI coding agents.


Prerequisites and Limitations

We're working hard to improve the experience, so this list of prerequisites and imitations may change frequently. So check back often to see if more capabilities are supported!

  • This prompt sets up backend services within the existing codebase of a web app. The app doesn't need to be deployed yet.

  • This prompt is not yet optimized for: iOS apps, Android apps, Flutter apps, or Unity games

Use the prompt

  1. If you haven't already, install the Firebase MCP server.
    Once installed your agentive MCP-capable AI assistant can access our MCP tools and prompts.

  2. Many AI coding agents provide a way to conveniently run this prompt. For example, as a slash command:

    /firebase:init
    

You can also adapt any of the Firebase pre-written prompts for your specific environment or requirements.

Review the prompt's content

You can review the contents of the firebase:init prompt in the Firebase GitHub repository.

This firebase:init prompt orchestrates several service-specific prompts for each constituent task or Firebase service.