Back to blog
January 28, 2025
Tech

Advanced Web components for Bravo Studio apps using Cursor AI and Xano backend.

Streamline your app development with this step-by-step guide to creating custom web components using Cursor AI, integrating them into Bravo Studio, and connecting them to Xano for dynamic backend functionality.
Pedro Codina
By
Pedro Codina

How to Create a Custom Web Component with Cursor AI, Integrate it into Bravo Studio, and Connect to Xano

Creating custom web components for your mobile app has never been easier. By combining the power of Cursor AI, Bravo Studio, and Xano, you can build dynamic and feature-rich components that enhance your app's functionality. In this guide, we’ll walk you through:

  1. Creating a custom web component with Cursor AI.
  2. Adding the web component to a Bravo Studio project using the webview Bravo tag.
  3. Connecting the web component to a Xano backend using GET and DELETE API requests.

Let’s dive in!

Step 1: Create a Custom Web Component Using Cursor AI

Cursor AI is an excellent tool for developing custom web components with minimal coding effort, in fact you don't need to know anything about code at all! Here’s how to create your web component:

  1. Set up Cursor AI:


    • Install Cursor AI.
    • Open Cursor AI and start a new project or directly use the chat window to start communicating with Cursor AI. (You can press “Command + L” to open the chat window.

  2. Define Your Web Component:

The web component will be composed of three different files: HTML, CSS, and JavaScript. For the web component to work with Bravo Studio, these three files must be compiled into one single code therefore you must ask Cursor AI in your prompt to do so. If you realize you have forgotten this in your prompt, don't worry. You can ask again to compile it into one full piece of code.

(If you missed our first blog post about creating web components, you can read it now before continuing or watch the video tutorial here.

Once you have your web component code generated, you can test it in Bravo Studio and visualise it in our web component previewer.

Important: Although most AI platforms are great at coding, they are often not providing exactly what we are looking for so expect to have to ask Cursor AI to make changes after you have tested the web component in Bravo Studio web component previewer.

Important note: When asking for changes to your web component, make sure to remind Cursor to return an updated full code version. Otherwise, it might just return the pieces of code that you have asked to change. If you have code experience then you should be able to know where to update the code inside Bravo Studio code editor.

Step 2: Add the Web Component to a Bravo Studio Project

Bravo Studio enables you to build no-code mobile apps with ease. To integrate your custom web component:

  1. Create Figma design with at least one screen that includes a webview Bravo Tag:
  1. Add the unique URL to your web component link to the webview tag in Figma.
  1. Preview in Bravo Vision:


    • Use the Bravo Vision app to test how your web component appears and interacts within your app. Remember to always sync your Bravo Studio project with the latest changes in Figma so that it picks up the latest URL you have added to the webview Tag. 

Note: If you update the code of your web component inside Bravo Studio code editor, always click save and copy the link again to update the URL of your webview Tag in your Figma design.

Step 3: Connect the Web Component to a Xano Backend

Xano offers a powerful backend-as-a-service solution that integrates seamlessly with your web component. 

Once our web component looks and feels exactly how we want it, we can now connect it to our backend of choice (in this case we have used Xano). Our web component example is a subscription tracker which stores subscriptions we sign up to. We have added a few advanced actions that require setting up two API end points. To connect your component to Xano:

  1. Set Up a Xano Database:


    • Create a new project in Xano.
    • Define a table to store your data, such as Items with fields like id and name.

Id AND Created at columns you will find them automatically added. In our case we have added exactly what we need. You can always ask Cursor AI what you need to add in your database too if you are not sure. It's important that they match exactly what we have in our code. In our case we have added: 

(Make sure to go to each column settings and specify the type of record)

  • Name. (Type: Text)
  • Amount. (Type: # decimal)
  • Frequency. (Type: Text)
  • Logo. (Type: Text)

  1. Create API Endpoints:

First, you will need to create an API group. This isn't strictly necessary but keeps your project clean and organized. 

In your new API Group, you can add the necessary end points:

In our case we needed to create two end points:

  1. GET Endpoint: To fetch data.
  1. DELETE Endpoint: To delete specific records.
  1. Connect the Component to Xano:

Once you have created both end points, we can ask Cursor AI to update our code with the end points we have created. You can do this by asking Cursor to simply update the code with both end points. Inside each API end point you can click to copy the end points:

Below example how we asked Cursor to update our code with our GET request:

  1. Ask Cursor to provide you with the full updated code which you must update in Bravo Studio. Save and copy your updated web component web component link and update your web view Tag in your figma design. Sync your Bravo Studio project to pick up the latest changes in Figma.


Test the API Integration:

  • Open your app in Bravo Vision.
  • Interact with the web component to ensure the GET and DELETE requests are working correctly.

Watch the tutorial here.

Conclusion

By combining Cursor AI, Bravo Studio, and Xano, you can create, integrate, and connect custom web components seamlessly. This workflow empowers you to build robust mobile apps with dynamic features and backend support.

Start building your next innovative app today and unlock the potential of no-code and custom development!

More like this

Join 100,000+ Bravistas today

Turn your Figma designs into powerful, design-first mobile apps
Get the best of Bravo straight to your inbox.
Subscribe to receive new updates, offers and resources.
Thank you! Your submission has been received!
😖 Oops! Something went wrong while submitting the form.