Building a Serverless Image Processor with AI Assistance – Part 5 of 6 – The Debugging Gauntlet

Part 5: The Debugging Gauntlet – When AI Assistants (and Humans) Make Mistakes This is the most important part of our story. No project, especially one involving new technologies, works perfectly on the first try. The process of debugging—of hitting a wall, diagnosing the problem, and finding a solution—is where the deepest learning happens. This section is a journal of the bugs we encountered and the breakthroughs we achieved. A Collaborative Approach to Debugging Throughout this process, I treated my AI assistants not as infallible oracles but as collaborative partners. While Gemini was my primary tool, there were moments we hit a loop, with the AI providing repetitive, unhelpful suggestions. In these cases, turning to a different model was key. I used Claude Sonnet to re-explain the problem from a different angle and GitHub Copilot to analyze specific code snippets. This multi-tool approach was invaluable for getting “unstuck” and highlights Read more

Building a Serverless Image Processor with AI Assistance – Part 4 of 6 – The Build

Part 4: The Build – Pair Programming with an AI With our Google Cloud infrastructure ready and our Product Requirements Document (PRD) in hand, it’s time to start building. This is where the power of AI-assisted development truly shines. Using our detailed PRD as the “master prompt,” we can now ask the AI to generate the initial code for both our backend and frontend. Generating the Backend The first prompt was straightforward: “Using the PRD, generate the Python Flask code for the backend (main.py) and the dependencies file (requirements.txt).” Because our PRD was so specific about the technology and features, the AI was able to produce a highly relevant and nearly complete starting point. Our First Deployment With the initial code files in our Cloud Shell Editor, we were ready for our first deployment. The goal of serverless is simplicity, and this is reflected in the deployment command. This single Read more

Building a Serverless Image Processor with AI Assistance – Part 3 of 6 – The Foundation

Part 3: Laying the Foundation – A Step-by-Step Guide to GCP Setup With our Product Requirements Document (PRD) as our guide, it’s time to move from planning to practice. Before we can write or deploy any code, we need to set up the foundational infrastructure on Google Cloud Platform (GCP). This is a one-time setup process that, once completed, will allow us to deploy and update our application with simple commands. This guide will walk you through the essential steps to prepare your GCP project for a serverless web application. Step 1: Create Your GCP Project Everything in GCP lives inside a project. This is the top-level container that holds all your resources. Step 2: Enable the Necessary APIs By default, most GCP services are turned off. You need to explicitly enable the APIs for the services you intend to use. For our project, this meant enabling four key APIs: Read more

Building a Serverless Image Processor with AI Assistance – Part 2 of 6 – The Blueprint

Part 2: From Idea to Blueprint – Why the PRD is Your Most Important Prompt In any development project, the temptation to jump straight into coding is strong. You have an idea, you’re excited, and you want to see results. However, my primary goal was to learn how to collaborate effectively with an AI assistant, and I knew that vague, iterative prompts would lead to a frustrating, circular process. That’s why the first real step of this project wasn’t writing code; it was writing a plan. I created a Product Requirements Document (PRD) to serve as the single source of truth—the “master prompt”—for the entire build. The Power of a Detailed “Master Prompt” Instead of asking the AI, “Build me an image resizer,” which would yield a generic and likely useless result, the PRD allowed me to provide a rich, detailed context. It forced me to think through the user’s Read more