← AIAP Topic CoursesAll programsHomeSearch
AIAP Topic Courses·AI for Product Building·2:13:32

Building a Web App with Replit: Vibe Coding Explained, the Tool Landscape, and a Live Build of a Business Site with an AI Sales Chatbot

Dídac Fernández Vibe-coding trainer - builds AI agents (AutoSolutions.ai), lives in n8n and Make, master's in applied AI; background in IT security and networks, not software development

The short version

  1. Vibe coding: describe what you want in natural language and an agent writes, edits and runs the code - rich first prompt, review, refine, repeat; human in the loop to stop the agent doing things you did not ask. Compared with traditional coding (full control, months to MVP), no-code (Make, Zapier, n8n - 80% of his own work), low-code (Bubble). Mindset: 'a contact form that collects valid emails', not 'write a validation function' (0:10-0:33).
  2. Tool landscape: Lovable easiest with the best output but needs an external backend; Copilot is an assistant; Claude Code on Opus 4 the best coder but console-based; Windsurf and Cursor are IDEs; Replit chosen because backend, database, auth, secrets, hosting and deploy sit in one product (0:34-0:42).
  3. Live build, Premiere Pro Painters (Austin, TX): ChatGPT writes the starter prompt, system prompt and knowledge base; Replit plans, you decline extras to save credits (1 per checkpoint); iterate with screenshots; OpenAI key into Secrets; merge the system prompt and knowledge base and verify in server/routes.ts (the agent summarised - re-prompt for the full text); 'design only' guardrail for the chat bubble; test the agent as a customer; lead capture to PostgreSQL (unfinished); Open in a tab is temporary, Deploy is permanent (0:42-2:12).

At a glance, three clicks deep

Skim here first: the closed row is the glance, open is the study card with the key points and timestamps, and the ↓ link drops to that concept's full write-up below.

01Vibe coding: definition, loop, mindset, and how it comparesRich prompt -> review -> refine;›

Rich prompt -> review -> refine; outcomes not syntax.

Definition and loop (0:10-0:17)

Four approaches (0:18-0:26)

Mindset (0:27-0:33)

↓ Full write-up of this concept

02The vibe-coding tool landscape and why ReplitLovable for front ends;›

Lovable for front ends; Replit for all-in-one; Claude Code for coders.

Landscape (0:34-0:39)

Why Replit (0:39-0:42)

Learning path (2:06-2:08)

↓ Full write-up of this concept

03Three prepared documents, generated by ChatGPT, and launching the Replit projectChatGPT writes the prompt;›

ChatGPT writes the prompt; decline extras; approve the plan.

Documents (0:40-0:47)

Launch (0:55-1:08)

↓ Full write-up of this concept

04Iterating on the UI with screenshots, and scoping fixes with a 'design only' guardrailScreenshot feedback;›

Screenshot feedback; one fix at a time; scope guardrails.

Colour loops (1:09-1:31)

Bubble redesign (1:41-1:48)

↓ Full write-up of this concept

05Getting an OpenAI API key and storing it in Replit SecretsProject-scoped key -> Secrets -> tell the agent the variable name.›

Project-scoped key -> Secrets -> tell the agent the variable name.

Key and secret (1:18-1:24)

↓ Full write-up of this concept

06System prompt plus knowledge base: merge, verify in the code, and the RAG ideaMerge -> find the file -> read it -> re-prompt;›

Merge -> find the file -> read it -> re-prompt; test as a customer.

Documents and RAG (1:11-1:17)

Merge and verify (1:32-1:41)

Customer test (1:48-1:54)

↓ Full write-up of this concept

07Lead capture to PostgreSQL, the n8n alternative, and temporary vs permanent hostingBackend for stored data;›

Backend for stored data; webhook to n8n as the alternative; Deploy for permanence.

Lead capture (1:54-2:03)

Deploy (1:46-1:48, 2:03-2:05)

↓ Full write-up of this concept

The concepts in full

01

Vibe coding: definition, loop, mindset, and how it compares

Say 'I need a contact form that collects valid email addresses and stores them' - not 'write a function that validates an email and connects to the database'.

Vibe coding is a conversation with an AI agent that writes, edits and runs code. Loop: a rich initial prompt (as much information as possible), the agent produces code and structure, you review the live result, you refine by chatting. Keep a human in the loop against 'hallucination' - the agent doing unasked things - and expect rabbit-hole loops that sometimes force a restart. Focus on outcomes and flows, not syntax. Comparison: traditional coding (full control, deep skills, months to MVP); no-code (Make, Zapier, n8n - visual, fast, can't see inside nodes; 80% of his work); low-code (Bubble - blocks plus code, still steep); vibe coding (little technical knowledge, fast, flexible, but prompt skill matters and saleable quality takes longer). Uses: PM prototypes, portfolios, training sites, support chatbots, lead enrichment, private team tools with auth.

Why it matters

The frame for every prompt in the build that follows.

02

The vibe-coding tool landscape and why Replit

Lovable makes the prettiest front end and then sends you to a second service for the backend. Replit keeps the database, secrets and deploy in the same window.

His ranking (mid-2025): Lovable - easiest, best output, fewest wasted tokens, but a third-party backend; GitHub Copilot - an assistant inside VS Code, not full vibe coding; Claude Code on Opus 4 - best coding agent on benchmarks, hallucinates least, but runs in a console beside an IDE; Windsurf and Cursor - local IDEs with an agent pane, Cursor slightly ahead (he repeats the then-current report that OpenAI bought Windsurf, which did not close). Replit chosen: backend, database, auth, file storage, secrets, live infrastructure view, hosting and one-click deploy in one product, scalable by compute as traffic grows. Learning path from the Q&A: try the free tiers (Lovable, Replit, Windsurf, Cursor), pick one, follow that vendor's official channel rather than YouTube generalists.

Why it matters

A map for choosing the first tool, with the reason behind the choice.

03

Three prepared documents, generated by ChatGPT, and launching the Replit project

The agent offered a booking system, a customer portal and photo estimates. He said no to all three. Every extra is credits and hallucination surface.

Three documents (shared via a Drive folder): the Replit starter prompt (company, Austin TX, stack - HTML/CSS/JS front end, Node.js + Express, OpenAI API; business details; services; front-end and design requirements; chatbot bubble bottom-right; backend; file structure; extras), the agent system prompt, the knowledge base. Recipe: ask ChatGPT 'I want to build a website on Replit for my shop X that sells Y, with products and prices, responsive on phones - write the first system prompt to use in Replit or Lovable'. PROCEDURE, Replit: paste the prompt (long prompts attach as a file) > stack selector Auto or a template > public/private (public can be remixed) > optional Enhance prompt and image attachments (a wireframe of coloured blocks) > Start building. The agent writes a plan and suggests extra features - decline them, keep scope small. Approve; watch the preview pane, the purple status bar and the file tree. Each checkpoint costs a credit, even when broken. You can queue a fix while it builds.

Why it matters

Prompt generation and project launch as a repeatable procedure.

04

Iterating on the UI with screenshots, and scoping fixes with a 'design only' guardrail

Agents can see images. Paste the screenshot instead of describing the colour. And tell it not to touch anything else.

The hero text fix got worse before it got better: 'the white text on grey is hard to read' -> more white; screenshot attached, 'redo all text colours to be readable' -> text shadows; 'no white or grey text; the shadow is not enough' -> better; 'make this heading orange' -> accepted. Lessons: screenshots beat descriptions; finish one item before moving on. Chat-bubble redesign prompt: 'the text box is off the margins and the expanded bubble looks squished - improve the design of the chat bubble; be sure you don't modify anything else of the chat agent's functionality; focus only on the front-end design' - the first run removed the input box, the second fixed it. Agents often fix one thing and break another, so constrain scope. A basic business site is under five prompts - his pitch against Wix and GoDaddy.

Why it matters

The two habits that save the most credits.

05

Getting an OpenAI API key and storing it in Replit Secrets

Copy the key the moment it appears - you will never see it again - and put it in Secrets, not in the chat.

The agent stops: the chatbot needs an OpenAI key. PROCEDURE: platform.openai.com > create a project ('live coding lesson') > Dashboard > API keys > create a secret key scoped to the project > copy immediately (view-once). Replit: Secrets in the left sidebar > new secret named OPENAI_API_KEY > paste. Secrets are environment variables for keys and IDs; never share them or others run up your bill. Tell the agent in chat that the key is in that variable. Pasting a key into chat works but is bad practice. Any app that calls ChatGPT, Claude, Gemini or DeepSeek needs a vendor key.

Why it matters

The one security step the session shows, done correctly.

06

System prompt plus knowledge base: merge, verify in the code, and the RAG idea

Ask the agent where it stored the system prompt, open the file, and read it. It had summarised two documents into a paragraph.

System prompt (document 2): role - friendly customer-service representative for Premiere Pro Painters; personality; key behaviours (greet, qualifying questions); pricing guide; booking process; value proposition; response guidelines; scenarios; guardrails; sample responses. Knowledge base (document 3): prices, products, procedures, FAQs, policies. RAG explained: for large knowledge, split documents into chunks in a vector store (an encyclopaedia in 26 volumes) and retrieve as needed; skipped here, knowledge goes inside the system prompt. Prompt: 'combine these two documents into one single system prompt for the agent as system instructions' (files attached). Verify: 'where is the system prompt stored, what file?' -> server/routes.ts; the code used GPT-4o (a comment said not to change it). The agent had shrunk and summarised; fix: 'I don't want you to summarise - use the full content of both documents and merge them as one system prompt.' Re-check the file. Then test as a customer: cabinet-refinishing price -> a range plus a push to book; hourly rate -> square-foot quote and free consultation; 'do you move furniture' -> yes and another consultation push. Two layers: knowledge (what it knows) and instructions (how it behaves) - here sales-focused.

Why it matters

Where the chatbot's behaviour actually lives, and how to prove it is there.

07

Lead capture to PostgreSQL, the n8n alternative, and temporary vs permanent hosting

Open in a tab dies half an hour after you log off. Deploy is the button that keeps the backend running at two in the morning.

Prompt: 'I want the agent to capture leads via the chat and store them in a backend - for example a consultation booking.' Replit added PostgreSQL and generated storage (SQL tables, queries) and routes files; he explains why any stored data needs a backend. His preferred architecture: the agent in n8n, the front end connected by a webhook - a bridge that lets the agent reach calendar, email and databases; kept inside Replit here for simplicity. The build was still running at the end; a test conversation captured name, phone, email and project type, but no database write was confirmed. Hosting: Open in a tab gives a temporary URL that lapses hours or half an hour after leaving; Deploy picks compute (minimal for low traffic), builds the server and gives a permanent URL running 24/7 - he quotes $2-5 a month at the lowest tier; not clicked on screen. Follow-ons: email the lead automatically; a voice AI agent; real-time avatar SDKs for the bubble (advanced).

Why it matters

The step from demo to something that could take a real enquiry.

Tools referenced

ToolCoverageMomentContext
ReplitdemonstratedAgent, Secrets, checkpoints, Open in a tab, Deploy
OpenAI APIdemonstratedProject-scoped API key
ChatGPTexplainedWrites the starter and system prompts
Lovableexplained
Claude Codeexplained
Cursorexplained
Windsurfexplained
n8nexplainedWebhook alternative
PostgreSQLexplained
Bubbleexplained

Action items

    Resources mentioned

    Resources
    • docGoogle Drive folder: Replit starter prompt, agent system prompt, knowledge base (Premiere Pro Painters)

    Extraction notes

    This page was built from an auto-generated transcript, which garbles product and people's names. Those were corrected silently in everything above and logged here for transparency. The warnings flag claims that were true on the recording day but change fast.

    Transcript corrections applied

    The transcript saysThe trainer actually means
    Didak / DaidakDídac
    Lowable / doableLovable
    HorserCursor
    rack systemRAG
    server roots t sserver/routes.ts
    3 to 600$3,000 to $6,000
    wipe coding / pipe coding / by coding / live codingvibe coding
    Replic / Rapid / wrap itReplit
    na 10 / a 10 / any timen8n

    True on recording day — verify before relying