inflearn logo

Vibe Coding Security, Deployment, and Incident Response in Practice: Securing and Completing an AI Subscription Service with Claude Code

The screens and payments work—but is it really ready to run like this? In a subscription service combining payments and AI fortune-telling, I deliberately cause secret-key leaks, expose other users’ information, trigger double charges, botch deployments, and cause outages, then fix them with Claude Code. In each chapter, we compare the service screens before and after the fixes, polish everything before launch, and wrap up with a finished product that runs on both desktop and mobile.

1 learners are taking this course

Level Basic

Course period Unlimited

Node.js
Node.js
PostgreSQL
PostgreSQL
CI/CD
CI/CD
devops
devops
security training
security training
Node.js
Node.js
PostgreSQL
PostgreSQL
CI/CD
CI/CD
devops
devops
security training
security training

What you will gain after the course

  • Iteratively improve a subscription service with sign-ups, payments, morning emails, and AI fortune-telling, deploy it to Railway, and build a polished version that works on desktop and mobile.

  • 'Show me the settings': Stopping secret keys from leaking with four devices (leaked 3 out of 4 times with the same instruction → 0 times); revoke leaked keys before deleting them

  • Preventing access to others’ fortunes by changing a number in the URL (4 cases → 0) through server-side ownership checks and authorization tests, and preventing others’ passwords from being changed with a single re-registration through email verification.

  • A server that stays up even when the DB connection drops, a “today” that’s correct even in the morning in Korean time, and safeguards against data- and time-related mishaps involving withdrawn members and past results.

  • Eliminating duplicate payments caused by double-clicks (2 charges at 3,800 won → 1 charge at 1,900 won), ensuring scheduled jobs run only once across two servers, and catching “silent zero-result” cases in test emails and external APIs

  • Constrain free-tier users’ AI calls with a usage ledger and daily limit, reduce the member information sent to external AI from three items to one, and prevent AI agents from making operational writes through rules and code.

  • Pre-deployment gates and rollbacks, external monitoring that alerts you before your customers do, backups proven by restoring them, and a pre-release checklist you can run with a single command.

  • Before launch, use it and refine it as if you were a first-time customer. Have Claude Code operate it with a demo account to find issues people missed, provide evidence from the screens, and verify the issues again.

The page loads, users can sign up, and even the payment button works. Is it safe to run this as is?

In this course, you take a subscription service built with vibe coding that includes payments and AI fortune-telling, deliberately trigger the kinds of incidents that actually happen in production, chapter by chapter, and fix them with Claude Code. You rerun each scenario under the same conditions to verify with numbers whether the issue is resolved, then open the service and compare how it looks before and after the fix.

15 videos | 2 hours 47 minutes | 152-page course PDF | Hands-on repository with tags for each chapter and completed versions

Recommended for people like these

Those who lack criteria for determining whether their service is ready to operate

Those who have built a web service using an AI coding tool like Claude Code but have no criteria for determining whether it’s ready to operate as-is.

People running services with payment, email, and AI integrations

Those who need to run a service with sign-ups, payments, email, and external AI, either alone or as part of a small team.

For those curious about what comes after 'Fix it'

Those who want to know how to check on screen and in the numbers whether something is really fixed after asking, 'Fix it for me.' Those who want to fix one service all the way through and reach a finished version, rather than just learn the concepts.

After completing the course, you will be able to

These are the figures, measured again under the same conditions in every chapter.

  • Secret keys leaked 3 out of 4 times with the same prompt → 0 times out of 4 with the same prompt on the device side

  • Other people’s fortunes visible by changing only the number in the address: 4 cases → 0; other people’s passwords that changed after a single re-registration → unchanged

  • Storage that used to be 0 records when one member encountered an error → 4 records; a screen that used to freeze when the DB connection was lost → fortunes still displayed as usual

  • One payment of ₩3,800 from two button clicks → one payment of ₩1,900

  • With 10 simultaneous requests from free members, AI calls dropped from 10 to 1, and member information sent to external AI dropped from 3 items to 1.

  • 'It's urgent' alone used to trigger 6 emails going out in production → 0 emails

  • Downtime during the failure deployment drill went from 124 seconds to 0. Outages that used to be discovered through customer reports are now detected by external monitoring, which sends an alert within 3 minutes and 23 seconds.

  • Zero backups → a backup that’s actually been restored, and a finished product that works on desktop and mobile

Features of This Course

The service you’ll build in this course

It’s a subscription service where AI writes a daily fortune based on your date of birth. Free members get one fortune a day, while subscribers paying 4,900 won per month get unlimited access. For 1,900 won, users can also view detailed readings about love, work, money, and health. It includes an overnight scheduled job, morning fortune emails, and an admin dashboard. Below is the actual hands-on project screen you’ll see at the end of the course.

We start with it exactly as first received.

At the very start of the first session, we’ll look at the finished version, then get an overview of its three-layer architecture—frontend, Express server, and Postgres—and how the service improves chapter by chapter. Then we’ll start with the service exactly as originally provided. Sign-up, fortunes, and the payment window all work, but the birth date for past fortunes is displayed one day early. Starting in Chapter 7, we’ll deploy the service to Railway and run it in production.

What will go wrong once we start operating it?

Secret keys get printed in the wrong places, security holes expose other people’s information, files disappear with a single deployment, and without monitoring, customers are the first to report an outage. Most of the incidents in this course are things the author actually experienced while running services or discovered during inspections. The service names are not disclosed. For things that leave no record, such as a payment being charged twice, we measure them directly on the service used in the course.

Why can’t you just say, “Fix it” and be done?

In Chapter 0, Claude Code identified ten problems just by reading the code. But secret-key leaks only became visible when it was run, AI agent mishaps when it was given operational responsibilities, deployment failures during deployment, and gaps in monitoring and backups only in the production environment. Even with the problems it identified, simply saying “it’s fixed” doesn’t tell us whether they’ve been prevented. So this course triggers incidents, prevents them, and tests again.

Claude Code doesn’t hide its mistakes either.

Given the same instruction, it hid the key the first time, then printed it verbatim the next three times. It also had a habit of making up example.com addresses for test users, and while reproducing an issue, it overwrote three development card files before restoring them on its own. In the first deployment, it reported, 'I confirmed that the table exists,' but there was no table in the production database. The course shows this scene as it happened and also covers how to verify results with numbers and on-screen evidence, rather than relying on reports.

What You'll Learn

There are 10 sections, 15 lessons, and a total of 2 hours and 47 minutes. Each chapter follows the same sequence.

Deploy a Node.js and PostgreSQL service built with vibe coding to Railway, and build the tools needed to operate it yourself, including pre-deployment checks and rollback (CI/CD), monitoring, and backups (DevOps).

  1. We’ll briefly look at an incident that actually happened.

  2. We recreate the same incident in the fortune-telling service.

  3. Find the cause.

  4. We build safeguards with Claude Code.

  5. We run it again under the same conditions and check the numbers to see if it was blocked.

  6. We display the service screen before and after the fix side by side, then check the fixed version on a mobile screen as well.

All of the following are actual screen captures from demonstrations in the lecture videos. The numbers are measurements taken from the videos.

Chapter 1: Secret Keys — Leaked Three Times out of Four with the Same Instruction, Now Zero Times

With the same instruction, “Hide only the DB password,” sent four times, five keys appeared on screen three times (fake keys for recording). After the device was built, the same instruction was sent four times, and no keys appeared. In the service interface, the member table that had opened with a blank admin key now returns a rejection.

Chapter 2: Login and Permissions: Protecting Other People’s Fortunes and Passwords

The four fortunes belonging to someone else that appeared just by changing the number in the URL are now reduced to zero. Opening the same URL now only shows “This fortune does not exist,” and shared URLs use a 43-character value instead of a number. The account owner’s password, which used to change with a single re-registration using the same email address, now stays the same.

Chapter 3 Data and Time: Staying Resilient When the DB Disconnects, and Defining “Today” in Korean Time

For one user's error, saves went from 0 to 4. If the DB connection was cut while the screen was open, the service used to get stuck on 'Reading your fortune', but after the fix, it displays the fortune as usual. A fortune that used to show the date as two days ago at 7:30 a.m. server time now shows today's date.

Chapter 4: Payments and External Services—Making Double Charges Happen Only Once

A payment that used to result in two charges totaling 3,800 won with two button clicks is now one charge of 1,900 won. Subscription payments that were being processed twice by two servers are now processed just once. The payment exercises use Toss Payments test keys, and the on-screen demo uses a fake demo payment provider without requiring card details, so no real money is charged.

Chapter 5: AI Costs and Personal Information: Reducing Free Members’ AI Calls from 10 to 1

For 10 simultaneous requests from free members, 10 AI calls became 1. The member information sent to the external AI went from three items—name, date of birth, and email—to just one: date of birth. Today’s AI costs and the daily limit are displayed at the top of the admin screen.

Chapter 6: AI Agents and Operations: From Six Operational Emails Sent with a “It’s Urgent” to None

In the author’s education service, an AI agent tasked with verification clicked an account button and changed another student’s password. The course reproduces the incident using a practice production server on the same computer. Six emails that used to go out to production with a single “It’s urgent” are reduced to zero, and the production screen’s “Create 3 test accounts” action is blocked, leaving only a message. The author also openly states the limitation: the results behind this approach have only been tested once.

Deploying Seven Chapters: The First Deployment Incident, Cards Disappearing After Redeployment, and Rollback

We revisit the first-deployment incident where /health returned 200, but the production database had no tables, so sign-ups returned 500—a failure estimated from the logs to have lasted about 15 minutes. After redeployment, all three fortune cards remain instead of none of them. In a failed-deployment drill, the interruption drops from 124 seconds to zero. When launched with an empty DB, the health check now exposes the failure upfront with a 503 and 'table missing' instead of a 200.

Chapter 8: Monitoring and Backups: Know Before Your Guests Do, and Actually Restore from Backup

External monitoring detects an outage in 3 minutes and 23 seconds, instead of you learning about it from a customer. If the mail key goes missing, you’re alerted in about 8 seconds, and a delivery failure warning appears in the admin summary. Starting with zero backups, we restore the database, run the service, and log in as the same member to confirm their previous fortune is still there. Finally, we run a one-page set of operating rules and a pre-launch checklist (33 items) with a single command.

Chapter 9: Pre-Launch Polish—Have Claude Code Try It Out and Turn It Into a Finished Product

When I tried it as a first-time visitor, the sign-up fields were scattered, today’s fortune disappeared when I logged back in, and there was no guidance after returning from the payment screen. I pointed out seven rough edges like these to Claude Code, and it fixed the design system, sign-up tab, profile screen, and subscription cancellation flow. Along the way, the number of tests grew from 76 to 132.

In the final hour, Claude Code uses two demo accounts to try the live service directly on desktop and mobile. Along with screenshots, it identifies seven issues, including the first fortune-reading failure for free members, partial birth dates appearing on the sharing screen, and Markdown asterisks in detailed readings. After fixing them, it tries the service again the same way to verify the fixes. It notes what it couldn’t observe in production, and fixes two more issues found during the recheck. The test count reaches 148. Finally, it compares the service as it was first received with the finished version.

All payments are made using Toss Payments test keys from start to finish. On the production server (Railway), the Toss payment API was rejected with a 403, while the same key worked normally on the work computer in Korea. We determined that the cause was the overseas outbound IP address, and demonstrate that in production, it connects to Toss and opens the card registration window. This limitation is noted in Chapters 7 and 9 of the course materials.

The Creator of This Course

JC Lab

We use firsthand incidents and inspection records from operating services as course material. Most of the real incidents covered in this course are things the author experienced while running services or uncovered during inspections, and the service names are not disclosed.

Even services built with AI run into incidents once they go live. The habit of deliberately triggering incidents, preventing them, and measuring again under the same conditions protects your service. In the first session, start by looking at the finished product.

Do you have any questions?

We’ve gathered answers to questions you may have before enrolling.

Q. Is it okay if I don’t know much about coding?

Claude Code writes the code. Students send instructions and review the results table, a few key lines of code, and the service screens along with the videos. If you can follow terminal commands and have used Claude Code even once, you can keep up.

Q. Will I be charged real money during the payment exercise?

No money is charged. We use only Toss Payments test keys to register cards and make payments. The service demo in Lesson 4-1 (clicking the pass twice) is shown on a demo server with a fake test payment provider, without entering a card. In the latter part of Lesson 4-2, you’ll also see how to cancel and clean up the test payment in Toss. On the production server (Railway), the Toss payment API was rejected with a 403, while the same key worked normally on the work computer in Korea. We believe this was because the outgoing IP address was overseas, so in production we only show up to the point where the card registration window appears.

Q. Will I get the same result as in the video?

Claude Code’s answers can vary even with the same instructions. For example, in Lesson 1-1, the same instruction was sent four times: once it concealed the key, and three times it showed it as-is. That’s why this course checks results with numbers rather than relying on reports. If your results differ and you’re having trouble moving on to the next chapter, use the chapter tag in the practice repository to match the author’s results and continue. The completed version is available under the `final` tag.

Notes Before Taking the Course

Practice environment

  • Operating system: The videos and course materials were created on macOS. Running this on Windows has not been tested separately for this course.

  • Tools used: Claude Code (Claude paid plan or API usage fees, separate from the course fee), Node.js 20 or later, PostgreSQL (via Docker or direct installation; the recovery exercise in Lesson 8-2 uses Postgres 18)

  • OpenRouter key (AI fortune): About $0.000085 per reading (measured in Chapter 5). Be sure to set a monthly limit when creating the key.

  • Resend key (morning fortune emails): Free, 3,000 emails per month.

  • Toss Payments test keys (card registration, subscriptions, passes): Free. Since it’s test mode, no real money is charged.

  • Railway (Chapters 7–9): 30-day trial, $5 in credits. After that, the Hobby plan is $5/month and includes $5 of usage. Once everything is finished, delete the project.

  • Prices and features may change.

Learning Materials

  • 15 videos (Chapters 0–9)

  • Textbook PDF, page 152. Each class has that chapter’s PDF attached. It contains the 135 instructions sent during the lectures verbatim, along with 125 screenshots. Chapter 0 covers the service built in this course, and Chapters 1 through 8 each have a 'Verify on the service screen' section.

  • Practice repository: https://github.com/JCLab-coder/fortune-ops (Each chapter has a tag from ch00 to ch08, as well as a final tag for the completed version. You can send the instructions as-is to create your own result, or use a tag to match the author’s result before starting the next chapter.)

Prerequisites and Notes

  • Experience opening Claude Code and sending prompts is sufficient, along with being able to follow along and enter terminal commands.

  • Claude Code writes the code. Students send instructions and watch a few key lines of code, the results table, and the service screen in the video.

  • This isn’t concept-focused security training; it’s hands-on practice recreating and preventing incidents that actually happen in production.

  • We do not cover web fundamentals (HTML, CSS), Kubernetes, large-scale scaling, or specialized security areas such as penetration testing.

  • When asking a question, please include which lesson and scene you’re referring to, which tag in the practice repository you started from, the exact instructions you sent, and any output or error messages from Claude Code. Please redact any screens showing keys, passwords, or personal information before sharing them.

  • The videos, PDF course materials, and screen captures from this course may only be used by the purchaser for personal study. You may not share them with others, post them publicly, or resell them.

Recommended for
these people

Who is this course right for?

  • For those who’ve built a web service using an AI coding tool like Claude Code but aren’t sure whether it’s ready to launch as-is.

  • For those who need to run a service with sign-ups, payments, email, and external AI on their own or with a small team.

  • Those who want to know how to check on screen and with numbers whether it’s really blocked after 'Fix it'

  • For those who want to take one service all the way through to a finished product rather than focus on conceptual explanations.

Need to know before starting?

  • Experience using Claude Code to send instructions, and the ability to follow along with and enter terminal commands.

  • Claude Code writes the code. Students give it instructions and watch the video as it shows a few key lines of code, a results table, and the service interface.

  • Specialized areas such as web fundamentals (HTML, CSS), Kubernetes, large-scale scalability, and penetration testing are not covered.

Hello
This is jclab

Career Verified

51

Learners

6

Reviews

4.0

Rating

5

Courses

I’m a developer who builds and operates services.

I’m sharing what I experienced using Claude Code in real-world work and the rules that emerged from it. I’ll talk through actual incidents and original code rather than theory.

I build and use whatever I need, from development and operations to data and automation.

More

Curriculum

All

15 lectures ∙ (2hr 47min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

jclab's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!

Limited time deal

$75.90

24%

$100.10