I Built a FULL Web App with n8n, Lovable & Supabase (NO CODE!)

AI WorkshopAbout 5 min readMar 17, 2025Watch original
THE SUMMARYAI-generated

Key Concepts:

  • n8n: A free and open-source workflow automation platform.
  • Supabase: An open-source Firebase alternative providing backend-as-a-service (database, authentication, storage).
  • Lovable: A low-code platform for building user interfaces.
  • Workflow Automation: Automating repetitive tasks and processes using software.
  • API (Application Programming Interface): A set of rules and specifications that software programs can follow to communicate with each other.
  • HTTP Request: A request made by a client to a server using the Hypertext Transfer Protocol.
  • JSON (JavaScript Object Notation): A lightweight data-interchange format.
  • Cron Trigger: A time-based job scheduler in n8n.
  • Webhooks: Automated HTTP callbacks triggered by specific events.

Building a Web Application with n8n, Lovable, and Supabase

This video demonstrates how to build a complete web application without writing code, using n8n for backend logic, Lovable for the user interface, and Supabase for the database and authentication. The application is a simple "link shortener" that allows users to create shortened URLs.

1. Setting up Supabase

  • The video starts by setting up a Supabase project. This involves creating a new project in the Supabase dashboard and obtaining the API URL and API key.
  • A database table named "links" is created within Supabase. This table has columns for "id" (primary key), "original_url" (the URL to be shortened), "short_code" (the shortened URL code), and "created_at" (timestamp).
  • Row Level Security (RLS) is initially disabled for simplicity, but the video emphasizes the importance of enabling and configuring RLS for production applications to ensure data security.

2. Designing the User Interface with Lovable

  • Lovable is used to create the front-end interface. The interface consists of an input field for the user to enter the original URL, a button to trigger the shortening process, and a display area to show the shortened URL.
  • Lovable's drag-and-drop interface is used to arrange the UI elements.
  • The video highlights Lovable's ability to connect UI elements to backend workflows via APIs.

3. Creating the n8n Workflow

  • The core logic of the application is built within n8n. The workflow is triggered by an HTTP Request node, which listens for POST requests from the Lovable front-end.
  • HTTP Request Trigger: The HTTP Request node is configured to listen for POST requests at a specific endpoint (e.g., /shorten). It expects the request body to contain the "original_url" in JSON format.
  • Data Validation: A Function node is used to validate the "original_url" to ensure it's a valid URL format. This step is crucial for preventing errors and security vulnerabilities.
  • Generating a Short Code: Another Function node generates a unique short code (e.g., a random string of characters). This code will be used as the shortened URL.
  • Supabase Integration: A Supabase node is used to insert the "original_url" and "short_code" into the "links" table in the Supabase database. The node requires the Supabase URL and API key.
  • Error Handling: The video briefly touches upon error handling, suggesting the use of "IF" nodes to check for errors and handle them gracefully.
  • Response to Lovable: Finally, an HTTP Response node sends a JSON response back to Lovable, containing the generated "short_code" and the full shortened URL.

4. Connecting Lovable to n8n

  • In Lovable, the button's "onClick" event is configured to trigger an API call to the n8n endpoint.
  • The "original_url" entered by the user in the input field is sent as the request body in JSON format.
  • Lovable receives the JSON response from n8n and displays the shortened URL in the designated display area.

5. Creating the Redirect Endpoint

  • A second n8n workflow is created to handle the redirection from the shortened URL to the original URL.
  • HTTP Request Trigger: This workflow is triggered by an HTTP Request node that listens for GET requests at a dynamic endpoint (e.g., /s/:short_code). The :short_code is a parameter that captures the short code from the URL.
  • Supabase Query: A Supabase node is used to query the "links" table in the Supabase database, searching for a record with a matching "short_code".
  • Redirection: An HTTP Response node is used to send a 302 redirect response to the browser, redirecting the user to the "original_url" retrieved from the database.

6. Deployment and Considerations

  • The video doesn't go into detail about deployment, but it mentions that n8n can be deployed on various platforms, including cloud servers and Docker containers.
  • The importance of security best practices, such as enabling RLS in Supabase and validating user input, is emphasized.
  • The video suggests using environment variables to store sensitive information like API keys.

Notable Quotes:

  • (Implied) "No code is required to build this application."
  • (Implied) "n8n allows you to automate complex workflows without writing code."

Technical Terms:

  • Node: A building block in n8n workflows, representing a specific task or operation.
  • Credential: Stored authentication information (e.g., API keys) used to connect to external services.
  • Environment Variable: A variable whose value is set outside the program, typically through the operating system environment.

Logical Connections:

The video logically connects the three platforms: Lovable provides the user interface, n8n handles the backend logic and database interaction, and Supabase provides the database and authentication services. The HTTP Request nodes in n8n act as the bridge between Lovable and Supabase.

Data/Statistics:

The video doesn't present specific data or statistics.

Synthesis/Conclusion:

The video successfully demonstrates how to build a functional web application (a link shortener) without writing code, using n8n, Lovable, and Supabase. It highlights the power of these platforms for rapid application development and workflow automation. The key takeaway is that complex applications can be built by connecting pre-built components and configuring workflows, rather than writing code from scratch. The video emphasizes the importance of security considerations, such as data validation and access control, even in no-code environments.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.