GEMINI LABJP
NANOLITE — Nano Banana 2 Lite is here: Google's fastest and most cost-efficient Gemini Image model, made for running lightweight image generation cheaplyOMNIFLASH — Gemini Omni Flash is in public preview, a natively multimodal model that lets enterprises and developers build custom, dynamic video workflowsAGENTS — Managed Agents expand with background: true for async server-side runs and polling, remote MCP server integration, and refreshing credentials across interactionsMEMORY — The Memory Bank IngestEvents API is generally available, decoupling event ingestion from memory generation so you can stream content continuouslyTHROUGHPUT — Provisioned Throughput now lets you submit up to seven pending orders for the same model and regionDEPRECATE — Image generation models shut down on August 17, and the Grok 4.1 family on the Gemini Enterprise Agent Platform on August 20NANOLITE — Nano Banana 2 Lite is here: Google's fastest and most cost-efficient Gemini Image model, made for running lightweight image generation cheaplyOMNIFLASH — Gemini Omni Flash is in public preview, a natively multimodal model that lets enterprises and developers build custom, dynamic video workflowsAGENTS — Managed Agents expand with background: true for async server-side runs and polling, remote MCP server integration, and refreshing credentials across interactionsMEMORY — The Memory Bank IngestEvents API is generally available, decoupling event ingestion from memory generation so you can stream content continuouslyTHROUGHPUT — Provisioned Throughput now lets you submit up to seven pending orders for the same model and regionDEPRECATE — Image generation models shut down on August 17, and the Grok 4.1 family on the Gemini Enterprise Agent Platform on August 20
Articles/Dev Tools
Dev Tools/2026-06-15Beginner

Building Web Apps with Gemini — Prompt Design and Pitfalls in Google AI Studio

How to structure your prompts when asking Gemini to build web apps in Google AI Studio — and the pitfalls I actually ran into as an indie developer.

gemini102webdevweb-app2ai-studio3coding4

Why I Open AI Studio First

Whenever I need a landing page for one of my apps, or a small internal dashboard for myself, the first thing I open is Google AI Studio.

The reason is simple: I can see the idea in my head as a working screen within minutes. Describe what you want, and you get something you can click on right away — less a finished product than an instant starting point for the conversation.

Gemini earned its reputation for web app generation when 2.5 Pro topped the WebDev Arena leaderboard — a benchmark where people compare and vote on the look and feel of generated web apps. The models have since moved on to the 3.x line, but the workflow here — prototype in AI Studio, then harden the result — works regardless of which model you use.

Development Flow from Google AI Studio

Step 1: Prototype in AI Studio

Open AI Studio and pick a coding-oriented model. Then hand it a prompt like this:

Build a simple Pomodoro timer web app.
Requirements:
- 25-minute work / 5-minute break countdown
- Display remaining time with a large circular progress bar
- Sound notification on session completion
- Dark theme
- Responsive design (desktop and mobile)
- Single HTML file

From this prompt alone, you get HTML that runs in the browser immediately.

Step 2: Iterate

Click around the result and fill in what's missing through chat:

Add the option to choose between 25-minute and 50-minute work sessions.
Also show today's completed Pomodoro count at the bottom of the screen.

The key here is not to ask for too much at once. Request one or two changes at a time, and you'll cut down on the accidents where some unrelated part gets rewritten.

Step 3: Deploy

Once the code settles, hand it to Antigravity for finishing touches, or drop it straight onto Cloudflare Pages or Vercel. A single HTML file can be published with a simple drag and drop.

How to Structure Your Prompts

Be Specific, Use Bullet Points

❌ "Build a weather app"
✅ "Build a web app that shows the weather for my current location.
   Use OpenWeather API.
   Display temperature, humidity, weather icon, and 3-day forecast.
   Use glassmorphism card design.
   Single HTML file."

Vague requests produce forgettable output. What to show, how it should look, and how much fits into one file — write those three things out up front and you'll see the rework shrink noticeably.

Hand Over the Design Direction in Words

Gemini responds well to design vocabulary:

  • "Glassmorphism," "Neumorphism," "Minimalist"
  • "Apple-style," "Material Design"
  • A color palette (e.g., "Use #667EEA as the primary color")
  • Motion (e.g., "Fade in," "Slide transitions")

Naming the style you want to reference, or a specific color code, gets you closer to your intent than a generic "make it look nice."

The Strength and the Limits of a Single HTML File

What Gemini builds most reliably is a self-contained app — HTML, CSS, and JavaScript in one file. Calculators, dashboards, simple games, settings tools: the less it depends on external services, the higher the accuracy.

The limits are just as clear. As the file grows, generation may cut off near the end, or part of the previous code may quietly drop out. In my experience, these glitches start to appear once a single file passes roughly 600 lines.

When that happens, I either split the app by feature, or accept that the AI Studio prototype ends here and move the finishing work into an editor. Take speed in the prototype, take certainty in the finish. Keeping that line drawn saves you from getting stuck endlessly patching things in chat.

Pitfalls I Actually Hit

API Keys Get Hardcoded Into the Code

Ask for an app that uses an external API — weather, maps — and Gemini will embed a sample key right into the HTML. Handy during prototyping, but ship it as-is and your key is in plain sight. For production, always move the key to the server side (for example, Cloudflare Workers). Add a line like "rewrite this assuming no key lives on the client" and it will propose a whole restructured setup.

Every Fix Changes Something Else

You ask to "just change the button color," and the whole layout comes back rearranged. This happens because the model reinterprets the long conversation context. There are two ways around it: narrow each request to a single change, and save a copy of any version you like so you can revert when things go sideways.

Accuracy Drops as the Conversation Grows

Keep one session going forever and the model starts forgetting the original requirements. At a clean breakpoint, paste the latest code back in and say "continue from this as the base" to restore accuracy.

One more subtle but effective habit: lead every message with a one-line statement of purpose. Fixing something like "this is a lightweight Pomodoro app for an indie developer" at the top keeps the direction from drifting even in long conversations. I rely on this most when building the more intricate screens.

Practical Example: Sales Dashboard

Build a sales dashboard web app.

Requirements:
- Dark theme, sidebar navigation
- KPI cards: total revenue, order count, average order value, month-over-month change
- Monthly revenue line chart (using Chart.js)
- Regional sales pie chart
- Recent orders table
- Include demo data
- Single HTML file

Naming the chart library (Chart.js here) gets you a clean result with the loader tags already included. Asking it to include demo data lets you check the look on the spot, which makes it a solid base for a client proposal too.

Which Model to Choose

As of mid-2026, the workhorse for coding and agent tasks is Gemini 3.5 Flash. Prototype loops benefit from speed, so I start on the Flash tier and switch to a higher model only for screens with heavy design polish or complex logic.

For things where visual quality drives the outcome — like a promo landing page for an App Store app — it can be less work overall to assign the higher model from the start. Choose by asking whether the task is "look-first" or "speed-first," and the decision becomes easy.

Start with a small tool of your own — that conversion utility or calculator you've kept wishing existed in your daily work — and build it as a single HTML file in AI Studio. Once you feel how prompts land, every prototype after that gets faster.

Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Dev Tools2026-07-02
After the One-Click Deploy — Hardening an AI Studio Gemini App on Cloud Run for Real Production Use
AI Studio's one-click deploy to Cloud Run gives you a working URL in minutes — but not a production service. A practical checklist for API key storage, authentication, cost ceilings, and observability, with copy-paste gcloud commands.
Dev Tools2026-06-30
Tracing Which Prompt Revision Moved Your Quality — Prompt Versioning for a Gemini Pipeline
Editing prompts in place erases the trail: when quality shifts you can't tell whether the model moved or your wording did. Here's a small system that pins prompts by content hash, stamps every generation with the model ID and revision, and bisects a quality drop down to the exact revision boundary, with copy-paste Python.
Dev Tools2026-06-17
Running Gemini Chat History on Redis — Field Notes on Not Losing Conversation State in Production
Keep a Gemini ChatSession in process memory and it evaporates on every redeploy or scale event. Here is how I back it with Redis in production, covering token budgets, concurrent sends, SDK coupling, and graceful degradation, with the code I actually run.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →