Hello! Welcome to the first lesson in our module on rapid prototyping.
In the previous modules, you've done the essential strategic work for a startup: defining a business idea, creating financial models, and planning for operations and marketing. Now, we shift from planning to building. This module is where you'll leverage your Python skills to transform an idea into a tangible product, with AI as your co-developer.
This lesson focuses on the crucial first step of that process. Our goal is to plan a simple web app prototype by defining its core features and structure in a detailed prompt. Think of this as creating an architectural blueprint. Instead of handing it to a team of engineers, you'll be giving it to Gemini to generate the initial code. This process of developing software through conversational prompts is often called "vibe coding."
1. The Foundation: Strategy Before Code
Even when moving at the speed of AI, the old rule of "measure twice, cut once" still applies. A few minutes of strategic planning upfront saves hours of debugging and refactoring later. Before we even think about code, we need to be clear on the app's fundamental purpose.
To get into this mindset, let's watch a short clip that explains the importance of defining your strategy—the "why"—before jumping into the "how."
How I Build $8,000+ AI Websites in 33 Mins (Gemini 3 FULL Guide)
In this segment from 'How I Build $8,000+ AI Websites in 33 Mins,' Jack Roberts introduces the 'Strategy' phase of his framework. While he's talking about websites, the principles of defining purpose, audience, and the problem you're solving are universal to any software project.
Watch the section from 01:14 to 02:56. Pay attention to the key questions he asks: What is the purpose? Who is the viewer (user)? What are their problems and beliefs?
For our prototype, let's keep it simple. We could build a tool that:
- Solves a problem: Quickly visualizing financial data from a PDF or text without complex spreadsheet work.
- For a user: A financial analyst (like yourself) or an investor.
- With a core purpose: To turn raw numbers into an instant, shareable chart.
With this strategic foundation, we can now define the specifics.
2. Structuring Your Plan: The Product Requirements Document (PRD)
The best way to communicate a detailed plan to an AI is to use a format that developers have used for decades: a Product Requirements Document (PRD). A PRD is a single source of truth that outlines a product's purpose, features, functionality, and behavior. By creating a PRD, you force yourself to think through the details, and you provide the AI with a rich, structured context that will lead to much better results.
The following video is an excellent walkthrough of how to create a PRD with an AI, turning the process into an interactive conversation.
Build Better Apps with AI Using This One Simple Document (PRD Guide)
In 'Build Better Apps with AI Using This One Simple Document (PRD Guide),' Jordan Urbs demonstrates creating a PRD for a blog application. This is a perfect example of how to think through your app's requirements.
Watch from the beginning to 10:23. As you watch, focus on: The Initial Prompt: How he provides the initial idea, tech stack (Astro, PocketBase), and desired features. Iterative Refinement: How the AI asks clarifying questions, and he refines the requirements (e.g., user roles, SEO details). Key PRD Sections: Notice the structure of the final document: Executive Summary, Goals, Tech Stack, Architecture, Core Features, and critically, the Data Models / Database Schema.
The key insight here is that creating a plan for your AI isn't a one-shot command. It's a dialogue where you provide a vision and the AI helps you flesh out the technical details, which you then confirm or refine.
3. From PRD to "Master Prompt": The Art of Vibe Coding
Now that we understand the content of our plan (the PRD), let's focus on the format of the prompt itself. A well-structured prompt makes it easier for the AI to understand and execute your plan.
A great framework for this comes from breaking the prompt down into a few key elements.
How to write AI prompts for app building: complete guide
This guide from Base44, 'How to write AI prompts for app building,' provides a clear, actionable framework for structuring development-focused prompts. It formalizes the concepts we've been discussing.
Please read the following sections: 'AI prompt writing essentials at a glance': This table introduces the core elements: Persona, Task, Context, and Format. 'How to write AI prompts for app development': This 5-step process is a great checklist for our planning. 'Understanding AI prompt basics' and 'Example of AI prompt structure': These sections expand on the core elements, adding Role, Goal, and Tone. 'Examples of effective AI prompts': Pay attention to the examples for 'Database schema planning' and 'User authentication' as they are very relevant to backend development.
To synthesize this, a powerful "master prompt" for app development should include:
- Persona/Role: "You are an expert Python developer specializing in the Flask web framework."
- Goal/Task: "Your task is to generate the code for a simple web application based on the following requirements."
- Context (The PRD): This is the bulk of your prompt, including the app's purpose, features, tech stack, and data models.
- Format: "Provide the complete code for each file, including a
requirements.txtfile. Structure the project in the standard Flask layout."
4. A Case Study: Building a Prototype with Prompts
Theory is useful, but seeing a complete example from start to finish is the best way to understand the workflow. The following article details the creation of a "Vibe Running" app, a data visualization tool built entirely through AI prompts. It's a fantastic real-world demonstration of this lesson's concepts.
Vibe Coding in Practice: Patterns, Pitfalls, and Prompting Strategies
In 'Vibe Coding in Practice,' the author provides a detailed appendix walking through the step-by-step creation of a web app prototype. This demonstrates how a complex application can be built by breaking it down into a series of smaller, feature-focused prompts.
First, read the sections 'Patterns for Successful Vibe Coding' and 'Prompting Strategies for High-Quality Outputs' to understand the concepts of iterative and modular prompting. Then, read the entire 'Appendix: Building a ‘Vibe Running’ Prototype'. This is the most important part. Follow how the developer goes from setting up the environment (Step 1) to implementing data uploads (Step 2) and generating complex visualizations (Steps 4 & 5), all through a series of focused prompts.
The key takeaway from the Vibe Running example is modular prompting. Instead of one giant prompt to "build the app," the developer guides the AI feature by feature. This is the most effective way to work: start with a master plan, but implement it in manageable, verifiable chunks.
5. Your Turn: Plan Your Prototype
It's time to create your own blueprint. Your task is to write a detailed "master prompt" that defines a simple web application. In our next lesson, you will use this exact prompt to generate the backend code.
Here is a typical file structure for a Flask application. When you write your prompt, you'll be asking the AI to generate the code for these files.

Your Task:
Choose one of the following app ideas (or one of your own) and write a detailed prompt to plan it.
- Option A (Finance Focus): A "Financial Data Visualizer." The app should have a single webpage with a text box. A user can paste in several lines of data (e.g.,
2020, 100M, 10Mfor Year, Revenue, Profit). When they click "Generate Chart," the app creates and displays a simple bar chart visualizing the data. - Option B (Gaming Focus): A "Game Session Tracker." The app allows a user to enter the name of a game, the date, and whether they won or lost. The app saves this data and displays a simple table of all sessions, along with a running win/loss ratio for each game.
Use the template below to structure your prompt. Be as specific as possible!
Prompt Template
**PERSONA:**
You are an expert Python developer specializing in building lightweight web applications with the Flask framework.
**GOAL:**
Your goal is to provide the complete file structure and code for a simple web application based on the requirements below.
**CONTEXT:**
1. **Application Overview:**
* **App Name:** [e.g., Financial Data Visualizer]
* **Purpose:** [e.g., To allow a user to quickly generate a bar chart from pasted financial data.]
2. **Core Features (User Stories):**
* As a user, I want to be able to... [e.g., navigate to a homepage with a text input field and a button.]
* As a user, I want to be able to... [e.g., paste comma-separated data into the text field.]
* As a user, I want to be able to... [e.g., click a 'Generate Chart' button to see a bar chart of my data displayed on the same page.]
* [Add any other features you envision.]
3. **Tech Stack:**
* **Backend:** Python 3.11, Flask
* **Data Visualization:** Matplotlib (the chart will be saved as an image and displayed).
* **Data Handling:** [e.g., For Option A, data is processed in-memory. For Option B, you might specify using a simple SQLite database.]
4. **Data Model (if applicable):**
* [For Option B, define the table structure. E.g., `GameSessions` table with columns: `id` (integer), `game_name` (text), `session_date` (date), `result` (text, 'Win' or 'Loss').]
5. **Application Flow:**
* [Describe the step-by-step process. E.g., "1. User lands on `index.html`. 2. User enters data and submits the form via a POST request. 3. The Flask route processes the data, generates a chart using Matplotlib, saves it to the `/static/images` folder. 4. The route re-renders `index.html`, passing the path to the newly created chart image."]
**FORMAT:**
* Provide a list of all necessary files and their folder structure.
* For each file, provide the complete, well-commented Python or HTML code.
* Include a `requirements.txt` file listing all necessary Python libraries.
* Do not use any advanced Flask features like Blueprints for this simple app. Keep the logic within a single main application file.
Take your time with this. The more detail you provide now, the less work you'll have to do in the next lesson.
Conclusion
In this lesson, you've learned how to bridge the gap between a high-level idea and a detailed, actionable technical plan. You now have a systematic process for planning a web app prototype specifically for an AI co-developer.
Key Takeaways:
- Plan Before You Prompt: A clear strategy and a well-defined set of requirements are essential for getting quality results from an AI.
- Use the PRD Framework: Structuring your plan as a Product Requirements Document (Purpose, Features, Tech Stack, Data Models) gives the AI the rich context it needs.
- Master the Prompt Structure: Using elements like Persona, Goal, Context, and Format helps the AI understand its role and your desired output.
- Think Modularity: Complex apps are built feature by feature. Your master plan will guide a series of smaller, iterative prompts.
Next Up:
You have your blueprint. In the next lesson, we will put it to work. You'll use the prompt you just created to have Gemini generate the Python backend code for your prototype using the Flask framework.