llms.txt vs robots.txt vs ai.txt: The Developer’s Cheat Sheet

llms.txt vs robots.txt vs ai.txt: The Developer’s Cheat Sheet

Every Next.js developer building a public site in the last 18 months has hit the same wall: you Google “how to control what AI crawlers read” and get three different answers pointing at three different files — robots.txt, llms.txt, and ai.txt. They are not the same thing. They do not talk to the same audience. And using the wrong one (or none at all) means AI search engines are either ignoring your content entirely or indexing pages you never intended them to.

This is the one-stop breakdown I wish existed when I was figuring this out.

The three files at a glance

robots.txt llms.txt ai.txt
Proposed by Martijn Koster (1994) Anthropic + community AI-txt.com initiative
Primary audience Web crawlers (Googlebot, Bingbot, etc.) LLM training & AI search crawlers AI assistants (ChatGPT, Claude, Gemini)
Format Key-value directives Markdown / structured text Key-value + JSON blocks
Spec status RFC standard, universally supported Emerging, growing adoption Early proposal, limited adoption
Enforced by All major search engines Anthropic, Perplexity, some others No major enforcer yet
Location yourdomain.com/robots.txt yourdomain.com/llms.txt yourdomain.com/ai.txt

The short mental model: robots.txt is for Googlebot. llms.txt is for ClaudeBot and GPTBot when they are building knowledge, not just indexing. ai.txt is a newer proposal that tries to cover AI assistants reading your site in real time. Use all three if you want complete coverage — but robots.txt + llms.txt is where you get 90% of the value today.

robots.txt — the original gatekeeper

robots.txt has been around since 1994. Every crawler on the internet — Googlebot, Bingbot, DuckDuckBot, GPTBot, ClaudeBot, PerplexityBot — checks it before crawling. If you block GPTBot in robots.txt, it will not crawl your site for training data or AI-search indexing.

Basic syntax:

User-agent: *
Disallow: /admin/
Disallow: /private/

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Allow: /blog/
Disallow: /

User-agent: * applies to all crawlers. Named user-agents override * for that specific bot. Allow and Disallow are path-based — no wildcards by default in the original spec, though most modern crawlers support them.

In Next.js App Router — generate it dynamically from app/robots.ts:

// app/robots.ts
import { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      {
        userAgent: '*',
        allow: '/',
        disallow: ['/admin/', '/api/private/'],
      },
      {
        userAgent: 'GPTBot',
        allow: ['/blog/', '/services/'],
        disallow: ['/'],
      },
    ],
    sitemap: 'https://yourdomain.com/sitemap.xml',
  }
}

Next.js renders this as text/plain at /robots.txt automatically. No separate file needed.

What robots.txt does NOT do: it does not stop a crawler from reading pages it already knows about from other sources (backlinks, sitemaps). It only stops it from actively crawling those paths. If GPTBot found your /admin/ page linked from a public page, it may already have cached it.

llms.txt — built for the AI era

llms.txt was proposed by Answer.AI and picked up by Anthropic, Perplexity, and others as a structured way to tell LLMs what your site is actually about — not just what they can crawl, but what context they should carry when reasoning about your content.

Unlike robots.txt which is access control, llms.txt is documentation. Think of it as a README for your site aimed at language models.

Basic structure:

# YourSite

> One-line description of what this site is and who it's for.

A few sentences of context. What does this site do? Who is the author?
What should an LLM understand before citing any page from this domain?

## Blog

- [Post title one](https://yourdomain.com/blog/post-one): One-line summary.
- [Post title two](https://yourdomain.com/blog/post-two): One-line summary.

## Services

- [Service name](https://yourdomain.com/services/name): What this service does in one line.

## Contact

- Author: Your Name
- Email: [email protected]
- LinkedIn: linkedin.com/in/yourhandle

The format is intentionally plain Markdown. No special parser needed — any LLM can read it. The /llms.txt path is the convention; some sites also serve /llms-full.txt with deeper content for models that want more context.

In Next.js — generate dynamically from app/llms.txt/route.ts:

// app/llms.txt/route.ts
import { blogPosts } from '@/data/blog-posts'

export async function GET() {
  const lines = [
    '# YourSite',
    '',
    '> AI-search-ready Next.js development and SEO consulting.',
    '',
    'This site covers AI engineering, GEO/AEO, and production Next.js patterns.',
    '',
    '## Blog',
    '',
    ...blogPosts.map(p => `- [${p.title}](https://yourdomain.com/blog/${p.slug}): ${p.excerpt}`),
    '',
    '## Services',
    '',
    '- [AI-Search Consulting](https://yourdomain.com/services): End-to-end GEO and AEO for Next.js sites.',
  ]

  return new Response(lines.join('n'), {
    headers: { 'Content-Type': 'text/plain; charset=utf-8' },
  })
}

This keeps llms.txt in sync with your actual content automatically — no manual updates.

Who reads llms.txt today: ClaudeBot (Anthropic’s crawler), PerplexityBot, some versions of GPTBot. Adoption is growing fast. If you are publishing content you want AI search engines to cite accurately, this file is non-negotiable.

ai.txt — the wildcard

ai.txt is a newer proposal from a different working group. Where llms.txt focuses on what an LLM should know about your site, ai.txt focuses on granting or denying permission for AI assistants to use your content in responses.

Basic syntax:

# ai.txt
Version: 1.0

[permissions]
allow: true
commercial-use: false
training: false
real-time-access: true

[attribution]
require: true
format: "Source: {title} ({url})"

[contact]
email: you@yourdomain.com

Honest assessment: ai.txt has minimal enforcer support right now. No major AI company officially reads it. The spec is still evolving. That said, if the initiative gains traction (similar to how robots.txt went from informal convention to de-facto standard), having it early costs nothing and signals intent.

For most developers today: add it, keep it simple, and do not spend more than 10 minutes on it.

How a crawler actually decides what to read

The flow for a modern AI crawler like GPTBot or ClaudeBot hitting your domain:

  1. Fetch robots.txt — am I allowed to crawl this path?
  2. If allowed, fetch the page HTML
  3. Fetch llms.txt (periodically, not per-request) — what is this site actually about?
  4. Check ai.txt if the implementation supports it
  5. Index the content with the context from steps 2–4 combined

The key insight: robots.txt is checked per crawl request. llms.txt is fetched periodically and cached — it shapes how the model understands your whole site over time, not just whether it can read one page.

Putting it all together in Next.js App Router

Here is the complete implementation for a Next.js 15 App Router site:

app/
├── robots.ts          ← generates /robots.txt
├── sitemap.ts         ← generates /sitemap.xml
├── llms.txt/
│   └── route.ts       ← generates /llms.txt (dynamic, always in sync)
public/
└── ai.txt             ← static file, update manually

robots.ts (full version with AI crawler rules):

// app/robots.ts
import { MetadataRoute } from 'next'

const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://yourdomain.com'

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      // Default: allow everything
      { userAgent: '*', allow: '/' },

      // GPTBot: allow blog and services, block everything else
      {
        userAgent: 'GPTBot',
        allow: ['/blog/', '/services/', '/tools/'],
        disallow: ['/admin/', '/api/'],
      },

      // ClaudeBot: same rules
      {
        userAgent: 'ClaudeBot',
        allow: ['/blog/', '/services/', '/tools/'],
        disallow: ['/admin/', '/api/'],
      },

      // PerplexityBot: full access (it drives meaningful referral traffic)
      { userAgent: 'PerplexityBot', allow: '/' },

      // Google-Extended (used for Gemini training): restrict to blog only
      {
        userAgent: 'Google-Extended',
        allow: ['/blog/'],
        disallow: ['/'],
      },
    ],
    sitemap: `${BASE_URL}/sitemap.xml`,
  }
}

llms.txt/route.ts (dynamic, pulls from your data layer):

// app/llms.txt/route.ts
import { blogPosts } from '@/data/blog-posts'
import { servicePosts } from '@/data/services'

const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://yourdomain.com'

export async function GET() {
  const content = `# YourSite

> [One-sentence description of your site and its purpose.]

[Two or three sentences giving an LLM the context it needs to cite your site accurately.
What topics do you cover? Who is the author? What makes this site's perspective unique?]

## Blog

${blogPosts.map(p => `- [${p.title}](${BASE_URL}/blog/${p.slug}): ${p.excerpt}`).join('n')}

## Services

${servicePosts.map(s => `- [${s.title}](${BASE_URL}/services/${s.slug}): ${s.summary}`).join('n')}

## Author

- Name: Your Name
- Site: ${BASE_URL}
- Expertise: [Your primary expertise areas]
`

  return new Response(content, {
    headers: {
      'Content-Type': 'text/plain; charset=utf-8',
      'Cache-Control': 'public, max-age=3600, stale-while-revalidate=86400',
    },
  })
}

public/ai.txt (static, update when the spec stabilizes):

# ai.txt
Version: 1.0

[permissions]
allow: true
commercial-use: false
training: false
real-time-access: true

[attribution]
require: true

[contact]
site: https://yourdomain.com

Which file do you actually need?

Start here:

  • Building a public Next.js site? → Add robots.txt first. Always.
  • Want AI search engines (ChatGPT, Perplexity, Claude) to cite your content accurately? → Add llms.txt. This is the highest-leverage file for AI-search visibility right now.
  • Want to future-proof against the ai.txt spec gaining enforcement? → Add a simple public/ai.txt. It costs 10 lines.
  • Want to block AI crawlers from training on your content? → Set Disallow: / for GPTBot, ClaudeBot, and Google-Extended in robots.txt. This is the only file that actually enforces it today.

The one mistake I see most often: developers add robots.txt but skip llms.txt, then wonder why ChatGPT gives wrong answers about their site even though Googlebot indexes it fine. Googlebot and GPTBot-for-knowledge are completely different crawlers with different purposes.

Three things to verify right now

Open your terminal and check these three URLs on your live site:

curl https://yourdomain.com/robots.txt
curl https://yourdomain.com/llms.txt
curl https://yourdomain.com/ai.txt

If any returns a 404 or HTML error page, that file is missing. For robots.txt, a missing file means all crawlers assume full access — usually fine for public sites, but you lose granular control. For llms.txt, missing means LLMs are forming their understanding of your site from raw page HTML with no structured context — which almost always leads to inaccurate citations.

If you want a deeper look at how AI crawlers read Next.js sites specifically — what RSC payloads they fetch, how streaming affects what they see, and which metadata fields they actually use — I have a longer writeup on the AI-search architecture patterns I use in production that goes further than this cheat sheet.

And if you want this wired up on your own site end-to-end, that is exactly the kind of work I take on.

If your own llms.txt or robots.txt setup looks different from what I showed here — especially if you are on an older Next.js version or using the Pages Router — drop it in the comments. Curious what variations people are running in production.

Intigriti Challenge 0526 Writeup

Well this is a typical XSS challenge, you find an injection point and pop and alert. Pretty straightforward, just have to find that injection point.

This month’s challenge is a community feed website with register, login page, Testimonials page where you can post and a profile page where you can edit your profile, that’s a bunch of potential injection points to test, surely its one of them. and the footer mentions something called SCA Shield v1.0, is it Side Channel Attack?

Upon inspecting the source, all the page content is generated dynamically using a single app.js script. and innerHTML is heavily used throughout the script to inject content, but surprisingly DOMPurify is only used to sanitize the user comment and not their name?

nameDiv.innerHTML = t.user_name;

I thought its the moment, we found an injection point, went and changed name to a typical XSS script and… it didn’t work, its the same SCA Shield which was mentioned in the footer, which is preventing us, its a server side check.

we get a message

SCA Shield: Malicious characters detected! Quotes, parenthesis, dots, commas, and semicolons are strictly forbidden.

and this when using script tags

SCA Shield: Malicious payload signature detected!

Well, at least now we have a list of things to remove from our payload and it should just work. it seems it only detects few tags like script and other related words. tags like style, svg just work fine.

I had read about this XSS payload using CSS keyframes, so I thought to give it a try. and it worked.

After a bit of back and forth, I came across this

<style>@keyframes x{}</style><b style=animation-name:x onanimationstart=window[atob`YWxlcnQ=`]`pwned`>

window is blocked, so we use top which points to topmost frame, and in a normal page, its the page itself
alert is blocked, we just base64 it lol, atob isn’t blocked
and tagged literals instead of quotes

and it works! 🎉

now for the origin version for domain check, we need to due few modifications.
I released we can just use character hex code equivalents to mask the words since it does exact match, we can use parenthesis now!
replacing a with its equivalent x61, ( to x28 and ) to x29 we have the following:

<style>@keyframes x{}</style><b style=animation-name:x onanimationstart=Function\x61lertx28originx29```>

and there you go, we’re done!

I submitted it to Intigriti, and they told it was an unintended solution. while i haven’t yet gone to an intended solution, i feel its something related to the PixelAnalyticsConfig residing in the app.js and seeing their first hint makes it more probable, but haven’t yet explored it.

Business Logic Flaws: How Attackers Skip Steps in Your App to Get What They Should Never Have

Business logic flaws are vulnerabilities that exist not because of a coding mistake, but because the application trusts its own workflow too much. Instead of exploiting a buffer overflow or injecting code, attackers simply skip steps, repeat actions, or change the order of requests to get outcomes the app never intended. This kind of flaw is common in multi-step processes like account upgrades, order flows, approval chains, and access control checks. Payment bypass is one well-known example, but the same root cause appears across many different features.

Ethical Considerations

  • Only test systems you own or have written permission to test
  • Use local labs or bug bounty programs with clear scope
  • Do not use these techniques against production systems without authorization
  • Report findings responsibly to the application owner

Understanding Logic Flaw Workflows

Logic flaws happen when applications trust the order of steps instead of verifying each action on the server side. Attackers can skip, repeat, or reorder requests to reach states the application assumed were impossible to reach.

Common scenarios where this shows up:

  • Payment bypass: skip a payment step to get paid features for free
  • Privilege escalation: access an admin endpoint by navigating to it directly
  • Order manipulation: change item quantities or prices in a multi-step checkout
  • Approval skipping: jump past a review or verification step in a workflow

The example below uses a payment bypass to show how this works. The application has a three-step upgrade process: select a plan, submit payment, then confirm activation. The confirmation endpoint does not verify that payment was actually completed before granting Pro status.

The diagram shows how an attacker can skip step 2 by requesting the confirmation endpoint directly.

Exploiting the Missing Payment Check

The vulnerable code assumes that if a user reaches the confirmation page, they must have paid. It grants Pro status without checking for a valid transaction.

// /upgrade/confirmed.php

// Logic flaw: The code assumes if you are here, you must have paid.
$user_id = $_SESSION['user_id'];

// Directly updating the database to 'pro' status
$sql = "UPDATE users SET membership = 'pro' WHERE id = '$user_id'";
$db->query($sql);

echo "Congratulations! You are now a Pro member.";

An attacker can bypass the payment step by sending a direct request to the confirmation endpoint:

curl http://<target-ip>/upgrade/confirmed

The server processes the request and updates the user’s membership to pro without any payment verification. The database now shows the user has Pro status even though no transaction occurred.

Remediation

Verify payment completion on the server side before granting access. Check for a valid transaction ID or payment status in the database before updating membership.

// /upgrade/confirmed.php (fixed)

$user_id = $_SESSION['user_id'];

// Check for a completed payment transaction using a prepared statement
$stmt = $db->prepare(
    "SELECT id FROM transactions WHERE user_id = ? AND status = 'completed' ORDER BY created_at DESC LIMIT 1"
);
$stmt->bind_param('i', $user_id);
$stmt->execute();
$transaction = $stmt->get_result()->fetch_assoc();

if (!$transaction) {
    http_response_code(403);
    echo "Payment required.";
    exit;
}

// Only grant Pro status after verifying payment
$update = $db->prepare("UPDATE users SET membership = 'pro' WHERE id = ?");
$update->bind_param('i', $user_id);
$update->execute();

echo "Congratulations! You are now a Pro member.";

The fixed version checks for a completed transaction before updating membership. Direct requests without payment now return a 403 error.

Summary

Business logic flaws are hard to catch with automated scanners because they require understanding what the application is supposed to do. The attacker does not break the code, they just use it in an unintended order. Always validate state on the server side for every critical action, not just at the final step. Test your systems by trying to skip steps, replay requests out of order, or change values between steps to find these gaps before attackers do.

If you found this helpful, drop a like and share it with someone learning security. If you have questions, ran into something different in your own lab, or want to share your results, leave a comment below. Always happy to connect and talk about security, recon techniques, or anything AppSec related.

Feel free to connect with me on LinkedIn

Always open to connecting with people in security, development, or both. Whether you are building something, breaking something, or just getting started, feel free to reach out.

Why Vibe Coders Need Boilerplates to Save Time, Tokens, and Build More Secure SaaS Projects

Vibe coding changed how software products are built.

A founder can now open an AI coding assistant, describe an idea, generate files, fix bugs, create screens, connect APIs, and launch a working prototype faster than ever before. What used to require weeks of planning and development can now be started in a single afternoon.

That is powerful.

But there is a problem most vibe coders discover very quickly.

AI can help you build faster, but it does not magically remove the boring foundation every real SaaS product needs. You still need authentication. You still need payments. You still need user dashboards. You still need admin controls. You still need email setup. You still need SEO settings. You still need legal pages. You still need subscription management. You still need clean structure. You still need security.

And if you start every project from a blank Laravel install, you force yourself and your AI coding assistant to rebuild the same foundation again and again.

That is where a boilerplate becomes one of the smartest investments a vibe coder can make.

A good boilerplate is not just a shortcut. It is a production foundation. It gives your AI coding workflow structure. It reduces token waste. It helps avoid messy architecture. It gives your project working features from day one. Most importantly, it allows you to spend your time and AI budget on the unique part of your SaaS, not on rebuilding login pages, Stripe webhooks, dashboards, and settings panels for the hundredth time.

This is exactly why Laravel SaaS Store exists. It gives Laravel developers and vibe coders a ready-to-use SaaS starter kit with admin, customer dashboard, Stripe billing, affiliate tools, whitelist management, email setup, SEO, landing page, legal pages, design components, AI Designer, full source code, documentation, and commercial license. (Laravel SaaS)

The real problem with vibe coding from scratch

Starting from scratch feels clean.

There is an empty repository. No legacy code. No old decisions. No inherited mistakes. You tell the AI what you want, and it starts generating.

At first, this feels productive. The first few screens appear quickly. A login form is generated. A dashboard is created. A pricing page is added. A few models appear. The first version looks promising.

Then the hidden cost starts.

The AI creates one version of authentication. Then you ask for subscriptions, and it adds another layer of logic. Then you ask for admin access, and it adds role checks in different places. Then you ask for Stripe webhooks, and the webhook logic does not fully match your plan model. Then you ask for email templates, and the system creates hardcoded content. Then you ask for SEO fields, and the structure becomes inconsistent.

The project starts to work, but the foundation becomes fragile.

This is one of the biggest risks of vibe coding. The AI is very good at generating code, but if you do not give it a strong foundation, it will often invent one piece at a time. That means every new feature becomes another architectural decision. Every prompt becomes another chance to create inconsistency. Every generated file can push the project in a slightly different direction.

A boilerplate solves this by giving the AI an existing system to extend instead of asking it to invent the system from zero.

That difference is huge.

When the AI works inside a ready SaaS structure, it can follow existing patterns. It can reuse existing models, controllers, services, components, layouts, settings pages, billing flows, and admin resources. Instead of asking the AI to design the foundation, you ask it to build your product on top of a foundation that already works.

Boilerplates save more than development time

Most developers think about boilerplates only as a time saver.

That is true, but it is only the first layer.

Laravel SaaS Store positions its starter as a way to stop rebuilding the same SaaS basics, including auth, payments, admin, emails, dashboards, SEO, pages, and legal foundations. The site estimates that repetitive setup tasks such as Stripe, admin dashboards, customer auth, blog, pages, SEO, and email templates can easily consume many days of work before you even touch the real product. (Laravel SaaS)

But for vibe coders, the benefit is even bigger.

A boilerplate saves time, tokens, debugging cycles, context window space, and architectural focus.

When you start from scratch, you spend prompts on things that should already exist. You ask the AI to create authentication. You ask it to create user profiles. You ask it to create a dashboard layout. You ask it to create a billing flow. You ask it to create admin pages. You ask it to create email settings. You ask it to create subscription tables. You ask it to create legal pages. You ask it to create SEO meta fields.

Every one of those requests costs tokens.

Every generated response adds code.

Every code change increases the chance of bugs.

Every bug creates more prompts.

Every extra prompt consumes more context.

This is how a simple vibe coded SaaS can become expensive before the product is even validated.

A boilerplate changes the economics. Instead of using AI tokens to create common infrastructure, you use AI tokens to create business value.

That means your prompts become more focused.

You are no longer saying:

“Build me a SaaS with login, billing, dashboard, admin, subscription plans, and settings.”

You are saying:

“Add a lead scoring module to the existing dashboard.”

“Create an analytics page using the current admin layout.”

“Add a new plan limit to the existing billing system.”

“Create a feature that uses the current user subscription state.”

This is a much better way to use AI.

AI coding agents perform better with existing patterns

AI coding tools are strongest when they can follow a clear pattern.

If your project already has a working dashboard, the AI can copy the style. If your project already has a settings system, the AI can add another settings page. If your project already has billing models, the AI can extend them. If your project already has admin resources, the AI can create new ones in the same structure.

This is one of the most underrated advantages of a boilerplate.

A blank project gives the AI too much freedom.

A strong boilerplate gives the AI constraints.

Constraints are good. They reduce bad decisions. They reduce random structure. They reduce inconsistent naming. They reduce the chance that your project becomes a pile of generated code with no clear architecture.

Laravel itself is valuable for this reason. The official Laravel documentation describes Laravel as a framework that gives structure and a starting point for building web applications, with features like dependency injection, database abstraction, queues, scheduled jobs, and testing. (Laravel)

That same idea applies to SaaS boilerplates.

Laravel gives your application a framework.

A SaaS boilerplate gives your product a business foundation.

For vibe coders, this matters because AI coding is not just about generating code. It is about guiding code generation toward a maintainable product. A boilerplate becomes the map. The AI can move faster because it does not need to guess the roads.

The biggest token leak in vibe coding is repeated foundation work

Many vibe coders think their token usage is high because their app is complex.

Often, that is not the real reason.

The real reason is that they are asking AI to repeatedly solve problems that have already been solved thousands of times.

Authentication is solved.

Password reset is solved.

Stripe checkout is solved.

Stripe webhooks are solved.

Plan management is solved.

Admin dashboards are solved.

User settings are solved.

Email templates are solved.

SEO fields are solved.

Legal page management is solved.

Landing page sections are solved.

Yet many vibe coded projects spend a large amount of tokens rebuilding all of this from scratch.

That is waste.

Not because the features are unimportant, but because they are not the unique value of the product.

Your SaaS does not win because it has a login page.

It wins because it solves a painful problem for a specific market.

Your SaaS does not win because it has a billing table.

It wins because users are willing to pay for the outcome.

Your SaaS does not win because it has an admin panel.

It wins because the product delivers value consistently.

So why spend the first days of development and thousands of AI tokens recreating the foundation?

Use a boilerplate. Start where the boring work is already done. Then use your AI assistant to build the thing that makes your product different.

Security is not something you add later

One of the most dangerous habits in vibe coding is treating security as a later task.

Founders often say:

“I just need an MVP first.”

“I will clean it up after validation.”

“I only need something that works.”

That mindset is understandable, but risky.

Security problems often come from early architectural decisions. User roles. Route protection. Subscription access. Webhook validation. File uploads. Admin permissions. Environment variables. Session behavior. Email flows. Billing access. These are not small finishing touches. They are part of the foundation.

If you build them randomly with AI prompts, you can easily create security holes without noticing.

For example, maybe a dashboard route checks if the user is logged in, but not whether they own the resource. Maybe an admin route is hidden in the UI, but not protected on the backend. Maybe a webhook accepts data without proper verification. Maybe a user can access a plan feature without an active subscription. Maybe a generated controller trusts request data too much.

These mistakes are not always obvious when the app looks like it works.

A boilerplate reduces this risk by starting with a known structure. It does not mean you never need to review security. You still do. But it gives you a better baseline than a random set of AI-generated files.

Laravel SaaS Store is built around production SaaS needs, including super admin controls, customer dashboards, Stripe billing, email configuration, SEO settings, affiliate and whitelist modules, AI features with edit history, health checks, backups, and rollback behavior for AI view changes according to its documentation. (Laravel SaaS)

That kind of foundation matters.

Vibe coding should be fast, but it should not be careless.

A boilerplate helps you move from prototype to product

There is a big difference between a demo and a product.

A demo shows the idea.

A product supports users.

A demo can have hardcoded data.

A product needs accounts, billing, emails, settings, support, limits, dashboards, admin tools, and maintenance.

A demo can break quietly.

A product needs predictable behavior.

This is where many vibe coded projects fail. The founder gets excited because the AI created a nice prototype. The screens look good. The main feature works. The landing page exists. The demo is convincing.

But then real product requirements appear.

How do users subscribe?

How do users cancel?

How do you manage plans?

How do you edit homepage content?

How do you send transactional emails?

How do you manage early access?

How do you update SEO metadata?

How do you give a client admin access?

How do you manage legal pages?

How do you track affiliate referrals?

How do you let non-technical users edit the product?

How do you safely update generated views?

These are the details that turn a prototype into a SaaS business.

Laravel SaaS Store focuses exactly on this layer. It includes Stripe payment integration, plans management, webhooks, customer dashboard, super admin, email setup, SEO optimization, landing page, design system, legal pages, affiliate and whitelist features, and full source code with commercial license. (Laravel SaaS)

That means the vibe coder can start closer to a real product instead of stopping at a pretty demo.

Why Laravel is a strong choice for vibe coded SaaS projects

Vibe coding does not remove the need for good technology choices.

In fact, it makes the stack more important.

When AI generates code, you want it to work inside a framework with strong conventions. Laravel is a strong fit because it already gives developers a clean structure for routing, controllers, models, migrations, queues, validation, middleware, testing, jobs, events, notifications, and more.

Laravel is also widely documented, which helps AI coding assistants generate more predictable code. The more common and well-documented the framework is, the easier it is for AI tools to follow standard patterns.

Laravel’s official site now also speaks directly to the AI development era, describing Laravel as a clean stack for artisans and agents, with opinions around routing, queues, authentication, and other decisions that an agent does not need to reinvent. (Laravel)

That is exactly the point.

Good frameworks reduce decision fatigue.

Good boilerplates reduce product setup fatigue.

Together, they make vibe coding more practical.

Laravel SaaS Store builds on this idea by using a modern Laravel stack with Tailwind CSS, Livewire, Alpine.js, Folio, Volt, and Laravel AI, according to the site. (Laravel SaaS)

For a vibe coder, that means you are not starting with random code. You are starting with a Laravel-native foundation that already understands common SaaS needs.

The best boilerplate is not just code, it is a workflow

A weak boilerplate is just a zip file with some screens.

A strong boilerplate gives you a workflow.

You install it. You configure it. You log into the admin. You set your plans. You connect Stripe. You update your branding. You edit your pages. You configure email. You set SEO defaults. You enable the modules you need. You start building your unique product features.

Laravel SaaS Store documentation describes a quick setup path with commands like make setup, a first-run web installer, local and Docker install paths, admin and super admin areas, billing setup, social login setup, AI provider setup, route checks, tests, and troubleshooting guidance. (Laravel SaaS)

That matters because vibe coding is not only about generating code. It is about moving fast without getting lost.

A workflow gives you direction.

Instead of asking, “What do I need to build next?”, you already have the product skeleton.

Now your task is clearer:

Replace the demo content.

Add your market-specific features.

Connect your production services.

Customize the design.

Launch.

Get feedback.

Improve.

This is how indie hackers, agencies, and AI-assisted developers should think. The boilerplate is not the product. The boilerplate is the launchpad.

Why boilerplates are especially valuable for agencies

Agencies rebuild the same foundation over and over.

Client wants a SaaS dashboard.

Client wants paid accounts.

Client wants an admin panel.

Client wants editable landing pages.

Client wants legal pages.

Client wants email settings.

Client wants a customer area.

Client wants a simple referral or affiliate system.

Client wants fast delivery.

If you build all of that from zero every time, you lose margin. You also increase risk because every project gets a slightly different foundation.

A boilerplate lets an agency standardize delivery.

This is especially useful for small Laravel agencies that want to sell SaaS builds, MVPs, internal tools, dashboards, subscription portals, client portals, and AI-powered web apps.

Instead of quoting weeks for foundation work, the agency can start with a ready SaaS base and spend the project budget on client-specific features.

Laravel SaaS Store is useful here because it includes a commercial license and full source code, and the site states it can be used for client projects, your own SaaS products, or commercial applications. (Laravel SaaS)

That makes it practical for real business use, not only personal experiments.

For agencies, this can become a delivery advantage. You can ship faster. You can keep your codebase more consistent. You can train your team on one foundation. You can give AI coding agents a familiar structure across multiple projects.

That is how you turn vibe coding from experimentation into a repeatable business process.

AI Designer makes iteration faster for non-technical teams

One of the most interesting features in Laravel SaaS Store is the AI Designer.

The site describes it as a built-in tool that lets founders, marketers, clients, or non-technical team members change colors, layouts, copy, and components by describing what they want, without touching code. (Laravel SaaS)

This is important because product iteration is not only a developer task.

A founder may want to test a new hero message.

A marketer may want to change the CTA.

A client may want a different color scheme.

A team may want to update pricing copy.

Normally, these changes create small development tasks. Small tasks create delays. Delays slow down experimentation.

If non-technical users can safely make design and copy changes from an admin interface, the product can move faster.

The documentation also mentions safety controls around AI view changes, including backup creation before write, health checks after apply, auto-rollback if checks fail, edit history, and manual rollback. (Laravel SaaS)

That is the right direction for AI-assisted SaaS building.

AI should not just generate code. It should help teams iterate safely.

A boilerplate helps you focus on distribution

Most SaaS products do not fail because the login page was bad.

They fail because nobody cared.

They fail because the founder spent too much time building infrastructure and not enough time talking to customers, writing content, testing positioning, creating demos, launching campaigns, and improving onboarding.

This is another reason boilerplates matter.

When the foundation is already done, you can spend more time on distribution.

You can write landing page copy.

You can create SEO articles.

You can test pricing.

You can record product demos.

You can launch on communities.

You can talk to customers.

You can improve onboarding.

You can build the one feature users actually want.

A vibe coder should not measure progress only by how many files were generated. The real question is whether the product is closer to revenue.

A boilerplate moves you closer because it starts with the parts every paid SaaS needs.

Payments are already part of the foundation.

Admin is already part of the foundation.

Dashboard is already part of the foundation.

SEO is already part of the foundation.

Legal pages are already part of the foundation.

Email setup is already part of the foundation.

That means your first real development sprint can focus on your unique value proposition.

This is how you save weeks.

This is how you save tokens.

This is how you save energy.

Why “from scratch” is often ego, not strategy

Developers love building from scratch.

It feels pure. It feels controlled. It feels like craftsmanship.

But in SaaS, building from scratch is often not the best strategy.

If your product is an authentication system, then yes, build authentication deeply.

If your product is a billing platform, then yes, build billing deeply.

If your product is an admin builder, then yes, build admin deeply.

But if your product is a marketing automation tool, a CRM, an AI writing app, a booking platform, a client portal, a reporting dashboard, or a niche business SaaS, then authentication and billing are not your innovation.

They are infrastructure.

Infrastructure should be reliable, boring, and already working.

Your creativity should go into the product experience, the market insight, the workflow, the automation, the data, the integrations, and the outcome you deliver to users.

A boilerplate does not make you less technical.

It makes you more strategic.

It lets you build where it matters.

What to look for in a SaaS boilerplate

Not every boilerplate is worth using.

Some are too simple. Some are outdated. Some are beautiful but shallow. Some give you a nice landing page but no real business logic. Some include payments but no admin. Some include admin but no customer dashboard. Some include code but no documentation.

A useful SaaS boilerplate should include the things that actually block launch.

It should have authentication, dashboards, billing, admin controls, email setup, page management, SEO settings, legal pages, reusable components, documentation, and clear installation steps. It should be built on a stack you understand. It should give you source code, not lock you into someone else’s hosted system. It should be flexible enough for your own SaaS and client work.

Laravel SaaS Store checks these boxes for Laravel developers. It offers full source code, documentation, commercial license, admin dashboard, Stripe integration, affiliate management, user subscription and whitelist features, email management, dynamic pages, Tailwind components, and a professional landing page depending on plan. (Laravel SaaS)

That makes it a practical starting point for vibe coded SaaS projects.

The best way to use a boilerplate with AI

A boilerplate becomes even more powerful when you combine it with a disciplined AI workflow.

Do not ask the AI to randomly rewrite the whole project.

Do not ask it to replace the architecture.

Do not ask it to generate huge features without reading the existing structure.

Instead, use the boilerplate as the source of truth.

Ask the AI to inspect the current models before adding new ones.

Ask it to follow the existing admin patterns.

Ask it to reuse the current dashboard layout.

Ask it to add settings using the existing settings system.

Ask it to connect new features to the current subscription logic.

Ask it to create tests for new behavior.

Ask it to keep changes small and reviewable.

This is how professional vibe coding should work.

The boilerplate gives the structure.

The AI adds speed.

The developer gives direction.

The product gets shipped.

A practical example

Imagine you want to build a SaaS that helps small businesses generate social media posts.

If you start from scratch, your first tasks might look like this:

Create Laravel project.

Install frontend stack.

Build landing page.

Build login and registration.

Build customer dashboard.

Build admin panel.

Set up Stripe.

Create plans.

Create webhooks.

Add email settings.

Add SEO.

Create legal pages.

Create user profile.

Create subscription checks.

Add prompt templates.

Add AI provider settings.

Create usage limits.

Build the actual social media tool.

That is too much foundation before reaching the product.

With Laravel SaaS Store, many of these foundation parts already exist. The documentation includes AI settings, AI Studio, AI prompt templates, AI requests, AI view designer, billing, teams, social login, content management, affiliate, whitelist, reviews, and operations checklist. (Laravel SaaS)

Now your first real tasks become different.

You can add the social post generator as a product module.

You can connect it to existing AI settings.

You can show generated content inside the customer dashboard.

You can limit usage based on the existing subscription plan.

You can manage plans in the admin.

You can update landing page copy from the admin.

You can launch faster.

That is the difference between building infrastructure and building a business.

Boilerplates reduce abandoned projects

Many vibe coded projects die in the middle.

Not because the idea was bad.

They die because the project becomes messy.

The founder asks for too many changes. The AI generates too much inconsistent code. Bugs appear. The context window gets too large. The structure becomes unclear. The developer loses confidence. The project feels heavy before launch.

A boilerplate reduces this risk because it gives the project a stable center.

Even if you add features quickly, the core remains understandable.

You know where billing lives.

You know where settings live.

You know where admin lives.

You know where pages live.

You know where email configuration lives.

You know where AI settings live.

That makes the project easier to continue.

For vibe coders, continuity is everything. The first day is easy. The fifth day is harder. The third week is where structure matters. A boilerplate helps you survive the third week.

Boilerplates help with client trust

If you are building for clients, a boilerplate can also improve trust.

Clients do not care that you hand-coded every login screen.

They care that the system works.

They care that it is secure.

They care that it has billing.

They care that they can manage content.

They care that they can update settings.

They care that users can register and pay.

They care that the product can launch.

When you use a proven SaaS foundation, you can explain the value clearly:

“We are not starting from zero. We are starting from a Laravel SaaS foundation with admin, billing, dashboard, email, SEO, and content management already included. That means your budget goes into the custom business features, not repeated setup work.”

That is a strong sales argument.

It also protects your margin as a developer or agency.

The future of vibe coding is not blank prompts

The future of vibe coding is not just opening a chat and asking it to build an app from nothing.

That is the beginner version.

The professional version is different.

The professional version uses boilerplates.

It uses specifications.

It uses existing architecture.

It uses reusable modules.

It uses tests.

It uses clear prompts.

It uses source control.

It uses admin systems.

It uses deployment workflows.

It uses AI as an accelerator, not as a replacement for foundation.

This is where the market is going.

The people who get the best results from AI coding will not be the people who ask for the most code. They will be the people who give AI the best starting point.

A Laravel SaaS boilerplate is one of those starting points.

Why Laravel SaaS Store is built for this moment

Laravel SaaS Store is built around a simple idea:

Stop vibe coding every new project from scratch.

Start with a production-ready Laravel SaaS foundation and build the unique product on top.

The product includes the common SaaS pieces most founders and developers need: Stripe, plans, webhooks, customer dashboard, super admin, email setup, SEO, landing page, design system, legal pages, affiliate and whitelist tools, full source code, documentation, and commercial license. (Laravel SaaS)

It also goes further with AI-focused features like AI Designer, AI settings, AI Studio, AI prompt templates, AI request tracking, and AI view designer workflows described in the documentation. (Laravel SaaS)

That makes it especially relevant for vibe coders.

Because vibe coders do not just need code.

They need a launch system.

They need a foundation that works with AI, not against it.

They need structure that helps them move fast without creating a mess.

Laravel SaaS Store gives them that foundation.

Conclusion: stop spending AI tokens on boring work

Vibe coding is powerful, but it becomes much more powerful when you stop using it to rebuild the same foundation over and over.

Every SaaS needs auth.

Every SaaS needs billing.

Every SaaS needs dashboards.

Every SaaS needs admin.

Every SaaS needs email.

Every SaaS needs SEO.

Every SaaS needs legal pages.

Every SaaS needs settings.

Every SaaS needs structure.

These are not the features that make your startup special. They are the foundation that lets your startup exist.

A boilerplate lets you skip the repeated setup and focus on the product.

It saves time.

It saves tokens.

It reduces bugs.

It gives AI better patterns to follow.

It gives your project a stronger security foundation.

It helps you move from prototype to product faster.

If you are a Laravel developer, indie hacker, agency owner, or vibe coder building SaaS products, starting from a blank project every time is no longer the smartest move.

Start with a real foundation.

Build the unique part.

Launch faster.

That is the practical advantage of using Laravel SaaS Store.

FAQ

Is a boilerplate only useful for beginners?

No. A boilerplate is often more valuable for experienced developers because they understand how much time is wasted rebuilding the same foundation. Senior developers know that speed does not come from writing everything manually. Speed comes from knowing what should be reused.

Will a boilerplate make my SaaS less unique?

No. Your SaaS is not unique because of its login screen or billing flow. It is unique because of the problem it solves, the workflow it improves, the market it serves, and the result it creates for users. A boilerplate handles the standard foundation so you can focus on uniqueness.

Why is a boilerplate useful for AI coding?

AI coding assistants work better when they have existing patterns to follow. A boilerplate gives the AI structure, naming conventions, layouts, models, settings, and workflows. This reduces random code generation and helps keep the project maintainable.

Does a boilerplate reduce AI token usage?

Yes. Instead of spending prompts and tokens generating standard SaaS infrastructure, you can spend them building product-specific features. This is especially important when using AI tools with limited context windows or token-based pricing.

Is Laravel a good framework for vibe coded SaaS products?

Yes. Laravel gives developers and AI agents a structured, well-documented framework with strong conventions. This makes it easier to build, extend, and maintain SaaS applications compared to starting with a less opinionated or random structure.

Who should use Laravel SaaS Store?

Laravel SaaS Store is a strong fit for Laravel developers, indie hackers, agencies, startup founders, and vibe coders who want to launch SaaS products faster without rebuilding the same foundation each time.

Idle Cloud Cost Is the New Egress Cost

Field Notes — Engineering Notes from the Complexity Gap | Rack2Cloud

Field Notes — Engineering Notes from the Complexity Gap | Rack2Cloud

Idle cloud cost is now the bill surprise egress used to be — except it’s structurally worse. Egress escaped the architecture. Idle cost is required by it. The entire optimization playbook built around idle assumes you can eliminate it by correcting a provisioning decision. Idle cloud cost is now the bill surprise egress used to be — except it’s structurally worse. Egress escaped the architecture. Idle cost is required by it. The entire optimization playbook built around idle assumes you can eliminate it by correcting a provisioning decision. Increasingly, you can’t.

Most modern cloud environments are no longer optimized for utilization efficiency. They’re optimized for response-time predictability. That shift happened gradually — first with pre-warmed Kubernetes nodes, then with always-on service meshes, then with reserved GPU capacity for inference workloads that run in bursts but can’t tolerate cold-start. The bill reflects an architecture that was designed to hold resources, not consume them.

idle cloud cost — architectural idle patterns vs operational waste

How the Egress Problem Got Solved — And What Replaced It

Egress became a known variable. Teams started modeling it at design time, pricing it into architecture proposals, and running it through calculators before workloads went live. The cloud bill analysis framework turned egress into a legible signal rather than a monthly surprise. The pattern became recognizable: high egress meant a placement problem, not a usage problem. Fix the topology, fix the cost.

Idle cost never got that treatment. The assumption was always that idle capacity was temporary — a forecasting error that autoscaling would eventually correct, a reserved instance that would reach utilization once the workload matured. Finance teams built forecasting models on that assumption. Platform teams built optimization runbooks on it. Neither assumption holds for the architecture patterns running most enterprise cloud environments in 2026.

>_ Tool: Cloud Idle Resource Analyzer

Idle cost never got the tooling treatment egress did.

The Cloud Idle Resource Analyzer maps your environment profile and idle patterns to the architectural behaviors that produced them — not a savings estimate, an operating model diagnostic.

Run the Diagnostic →

Why Idle Cloud Cost Is Now Structurally Embedded

The shift is architectural, not operational. Three distinct patterns produce idle cost that doesn’t respond to rightsizing, reserved instance matching, or autoscaling policy tuning — because the idle capacity is intentional. It exists to satisfy a requirement the workload has, not to cover a demand forecast that turned out to be wrong.

idle cloud cost three architectural patterns — latency reservation, control plane residency, elasticity floor debt

THE THREE ARCHITECTURAL IDLE PATTERNS

01 — Latency Reservation: Capacity held online to avoid cold-start latency or queue depth. GPU pools, inference headroom, pre-warmed Kubernetes nodes. The infrastructure is intentionally idle because the workload requires deterministic response time — not because demand was forecasted incorrectly.

02 — Control Plane Residency: Infrastructure that cannot scale to zero because the management layer must remain active. EKS, AKS, and GKE control plane dependencies, service meshes, observability pipelines, security brokers. Their cost is continuous by design, independent of workload utilization.

03 — Elasticity Floor Debt: Autoscaling exists on paper, but operational constraints prevent scale-down below a floor. Minimum node counts, licensing minimums, replication quorum requirements, reserved instance commitments. The elastic layer operates above a structural baseline that never moves.

The Idle Cloud Cost That Doesn’t Respond to Rightsizing

The canonical example is reserved GPU capacity: an H100 at 5% utilization costs the same as one at 95%. Traditional FinOps says right-size down. AI infrastructure says you can’t — the reservation exists to guarantee availability for burst inference, not to cover steady-state demand. The idle cost is the cost of readiness. Rightsizing logic doesn’t apply when the resource is reserved for availability rather than consumed for throughput.

The same pattern runs across non-AI workloads. A pre-warmed node pool for a latency-sensitive API isn’t waste — it’s a deliberate trade against cold-start risk that the platform team made during design. The FinOps dashboard sees idle nodes. The architecture review saw a p99 latency requirement that couldn’t tolerate a 30-second scale-up event.

The distinction that matters:

  • Operational idle — a provisioning decision that turned out to be wrong. Correctable with rightsizing, autoscaling, or instance type changes.
  • Architectural idle — capacity held by design to satisfy a latency, availability, or governance requirement. Not correctable without changing the requirement that produced it.

The optimization lever doesn’t exist for this class of idle cost. You can’t autoscale below the minimum. You can’t right-size below the quorum. You can’t eliminate the control plane residency without eliminating the management capability it provides. The only way to reduce this cost is to change the architectural requirement that produced it.

Forecasting Debt and the Idle Cost You Inherited

Finance teams inherit cloud forecasting models that assume idle capacity is temporary. Modern AI and platform architectures make it permanent. That gap — between what the forecast assumes and what the architecture requires — is where budget variance lives, and it compounds as the environment matures.

The forecasting model breaks in a specific way: it treats latency reservation and elasticity floor debt as if they were demand forecasting errors. They aren’t. They’re architectural commitments that happened to look like waste on a utilization dashboard. Correcting them as if they were waste doesn’t reduce cost — it degrades the service property the idle capacity was purchased to protect.

idle cloud cost forecasting debt — FinOps model assumption vs architectural reality

Architect’s Verdict

Idle cost is not what it used to be. The optimization playbook built for idle capacity — right-size, auto-scale, eliminate waste — was designed for an era when idle meant wrong. A demand forecast that missed. A reserved instance that never matured. Capacity that could be reclaimed without consequence.

The three architectural idle patterns don’t work that way. Latency reservation, control plane residency, and elasticity floor debt are costs you bought deliberately, even if the purchase wasn’t framed that way. They exist because the workload required deterministic response time, because the management layer needed to stay active, because the minimum couldn’t go to zero. The utilization dashboard shows idle. The architecture review would show intent.

The industry still treats idle cost as operational waste. Increasingly, it is architectural rent.

Originally published at rack2cloud.com

Quark’s Outlines: Python Traceback Objects

Quark’s Outlines: Python Traceback Objects

Overview, Historical Timeline, Problems & Solutions

An Overview of Python Traceback Objects

What is a Python traceback object?

When you run a Python program and an error happens, Python shows you a stack trace. A stack trace shows where the error came from. It tells you what function failed and which line caused it. A Python traceback object holds that information.

Each traceback object shows one step in the chain of function calls that led to the error. Python builds this chain as it unwinds the stack. The traceback includes the function’s frame, the line number, and the bytecode instruction that failed.

Python lets you examine what went wrong using traceback objects.

import traceback

try:
    1 / 0
except ZeroDivisionError as e:
    tb = e.__traceback__
    print("Line:", tb.tb_lineno)

This traceback shows the line where the error happened. You can follow it to see how Python reached that point.

What does a Python traceback object contain?

A traceback object stores the frame that was active at the time of the error. It also stores the line number and the last instruction run in that frame. If there were more calls before the error, the traceback links to the next earlier traceback using tb_next.

You can think of a traceback as a trail of breadcrumbs that shows how the program moved from one function to the next before it failed.

Python traceback objects form a chain of frames leading to the error.

def a():
    b()

def b():
    1 / 0

try:
    a()
except ZeroDivisionError as e:
    tb = e.__traceback__
    print("Error in:", tb.tb_frame.f_code.co_name)

This prints the name of the function where the error happened. You can also walk backward using tb_next.

A Historical Timeline of Python Traceback Objects

Where do Python’s traceback objects come from?

Python traceback objects follow the idea of stack traces from earlier programming tools. They allow you to see what went wrong and where. This timeline shows how traceback support in Python grew over time.

People invented ways to trace error locations

1960 — Stack trace messages first appeared in debugging tools for compiled languages.

1970s — Structured error reporting became common in tools for ALGOL and Pascal.

People designed traceback support in Python

1991 — Python added exceptions and built-in stack traces for all uncaught errors.

1994 — Traceback module added to let users walk through exceptions by hand.

2000 — __traceback__ attribute added to exceptions to hold traceback objects.

2010 — Chained exceptions allowed Python to preserve traceback links across raise from.

2020 — Traceback access improved in tools like traceback.TracebackException for structured error analysis.

Problems & Solutions with Python Traceback Objects

How do you use Python traceback objects the right way?

Python traceback objects help you see where an error started, where it happened, and what Python was doing. When an error happens, Python builds a traceback. This traceback helps you trace the flow of execution and fix the problem. Each of these problems shows how to use traceback objects in real code.

Problem: How do you get the line where an error occurred in Python?

You are running some code that raises an error. You want to find the exact line number where the problem happened. You want to get that number from Python, not by reading the stack trace on screen.

Problem: You need to get the line number of the error programmatically.

Solution: Python traceback objects give the line number using tb_lineno.

Python lets you read the error line number from a traceback object.

try:
    int("nope")
except ValueError as e:
    tb = e.__traceback__
    print("Line number:", tb.tb_lineno)
# prints:
# Line number: 2

The tb_lineno attribute gives you the exact line where Python stopped with an error.

Problem: How do you find the function where the error happened in Python?

You are debugging a complex program. You want to know which function caused the error without reading the full traceback printout.

Problem: You want the name of the function where the error occurred.

Solution: Python traceback objects include the frame, which has the code object and its name.

Python lets you get the function name from the traceback’s frame.

def crash():
    return 1 / 0

try:
    crash()
except ZeroDivisionError as e:
    tb = e.__traceback__
    print("Function:", tb.tb_frame.f_code.co_name)
# prints:
# Function: crash

The frame tells you which function was running when the error happened.

Problem: How do you follow all the steps that led to an error in Python?

You are debugging a failure that goes through several functions. You want to walk back through all of them and see which path Python took.

Problem: You need to trace the full call stack leading to an error.

Solution: Python traceback objects form a chain using tb_next.

Python lets you walk the full traceback using tb_next.

def a():
    b()

def b():
    c()

def c():
    1 / 0

try:
    a()
except ZeroDivisionError as e:
    tb = e.__traceback__
    while tb:
        print("Function:", tb.tb_frame.f_code.co_name)
        tb = tb.tb_next
# prints:
# Function: c
# Function: b
# Function: a

You can walk the call chain backwards from the point of error using the tb_next link.

Problem: How do you print a traceback yourself in Python?

You are writing a tool that logs errors to a file. You want to include the full stack trace, not just the error message.

Problem: You want to format and print the traceback manually.

Solution: Python has a traceback module that can format tracebacks from objects.

Python lets you print full tracebacks using the traceback module.

import traceback

try:
    open("/this/does/not/exist.txt")
except Exception as e:
    traceback.print_tb(e.__traceback__)
# prints:
#   File "example.py", line 3, in <module>
#     open("/this/does/not/exist.txt")

This gives you a clean traceback without exiting the program.

Problem: How do you access traceback information from outside an except block in Python?

You are running code in a notebook or tool. You want to access the last traceback after the program stops. You did not save the error at the time.

Problem: You want to read the last exception traceback after the program ends.

Solution: Python keeps the last traceback in sys.last_traceback when run interactively.

Python lets you access the last traceback using the sys module.

import sys

# Only works in interactive mode:
# sys.last_traceback

This lets you recover traceback details even if the program already stopped. It only works if Python is running in interactive mode and the error was uncaught.

Like, Comment, Share, and Subscribe

Did you find this helpful? Let me know by clicking the like button below. I’d love to hear your thoughts in the comments, too! If you want to see more content like this, don’t forget to subscribe. Thanks for reading!

Mike Vincent is an American software engineer and app developer from Los Angeles, California. More about Mike Vincent

Ghost in the Stack (Part 1): Why uninitialized variables remember old data

Have you ever written a C program, run it, and watched it print values you never assigned?
At first glance, it feels almost as if old data is haunting your program from beyond a function call, but what is happening under the hood is far more interesting:

  • stack frame reuse

  • compiler behaviour

  • memory persistence

  • and the performance tradeoffs built into modern systems

In this series, we’ll go from high-level C code into stack frames, assembly instructions, and eventually real-world security implications.
Today, in Part 1, we investigate one of the most common low-level surprises in C: uninitialized local variables appearing to “remember” old values.
Consider the following program:

#include <stdio.h>
void Subtraction()
{
    int a = 100;
    int b = 35;
    int c = a - b;
}
void PrintValues()
{
    int i, j, k;
    printf("First value is %dnSecond value is %dnThird value is %dnThese are the values for PrintValues functionn", i, j, k);
}
int main()
{
    Subtraction();
    PrintValues();
    return 0;
}

If we compile without optimization: gcc -O0 main.c, we may observe output similar to this:

First value is 100
Second value is 35
Third value is 65
These are the values for PrintValues function

At first glance, this looks impossible. PrintValues never initializes its variables. So why does it print the exact same values previously used by Subtraction()? Important Warning: This is undefined behaviour
Before going deeper, we need to clarify something important.
Reading uninitialized local variables in C is undefined behaviour.
That means:

  • the C standard does not guarantee what happens

  • different compilers might behave differently

  • optimization levels may change the result

  • future executions may produce different outputs
    The behaviour shown above is simply one possible outcome observed under a particular compiler configuration.

The Dirty Whiteboard Analogy

To understand what’s happening, forget the code for a moment. Imagine RAM as a whiteboard in a shared classroom. First teacher (Subtraction()). A math teacher walks into the room and writes: 100, 35, 65 on the whiteboard. After class ends, she leaves without erasing anything, because erasing takes time. For a brief moment, the room is empty. The writing is still visible. Nothing has overwritten it yet. Second teacher (PrintValues()). A history teacher enters the room immediately afterward. Instead of writing anything new, he simply reads whatever is already on the board. At a high level, this resembles what happens with stack memory. When a function returns, typical compiled code does not automatically erase the stack bytes previously used for local variables. Instead:

  • the stack space becomes available for reuse

  • old data often remains there temporarily

  • another function may reuse the same stack offsets
    If the new function reads memory before writing new values, it may accidentally observe leftover bytes from an earlier stack frame.

INSPECT THE ASSEMBLY FOR SUBTRACTION()

Let’s inspect the assembly generated for Subtraction(). Below is the disassembly produced by GDB on x86-64:

push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
movl $0x64,-0x4(%rbp)
movl $0x23,-0x8(%rbp)
mov -0x4(%rbp),%eax
sub -0x8(%rb),%eax
mov %eax,-0xc(%rbp)
mov -0xc(%rbp),%ecx
mov -0x8(%rbp),%edx
mov -0x4(%rbp),%eax
add $0x30,%rsp
pop %rbp
ret

push %rbp – Save the base pointer onto the stack
mov %rsp,%rbp – Set the stack pointer as the base pointer.
sub $0x30,%rsp – Allocate 48 bytes of space on the stack
movl $0x64,-0x4(%rbp) – Store 100 into the first 4 bytes on the stack
movl $0x23,-0x8(%rbp) – Store 35 into the second slot
mov -0x4(%rbp),%eax – Load 100 into the eax register
sub -0x8(%rbp),%eax – Subtract 35 from eax, the result remains in eax
mov %eax,-0xc(%rbp) – Move the result from the register to memory
mov -0xc(%rbp),%ecx – Move to register
mov -0x8(%rbp),%edx – Move to register
mov -0x4(%rbp),%eax – Move to register
add $0x30,%rsp – Clean up allocated stack space
pop %rbp – Restore the previous stack frame
ret – Return control to the caller
After the function returns, the stack frame is released. The stack pointer simply moves back, making that region available for reuse. The previous values often remain there temporarily until another operation overwrites them. Typically compiled code does not automatically clear old stack contents because doing so would introduce additional instructions and reduce performance.

ENTER PrintValues()

Now let us examine the beginning assembly code generated for PrintValues()

push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov -0xc(%rbp),%eax
mov -0x4(%rbp),%edx
mov -0x8(%rbp),%ecx

Notice something very important. PrintValues() allocates a very similar stack layout. So this instruction:
mov -0x4(%rbp),%eax means read whatever bytes that exists here. If those bytes still contain leftover data from Subtraction(), then PrintValues() may appear to “remember” the earlier values.
This teaches something deeper than uninitialized variables are dangerous. It reveals an important systems principle: memory is reused, not automatically cleaned.

Building a High-Performance Local Chess Assistant Extension with WebAssembly Stockfish and Manifest V3

Hey everyone! 👋

I wanted to share a project I’ve been working on recently: Knight – Chess Helper. It’s an advanced browser extension designed to assist and analyze chess games on Chess.com entirely locally and in real-time.

Building a tool like this within the constraints of modern browser security policies (Manifest V3) was a massive technical challenge, and I’d love to walk you through how I solved it.

👉 Check out the full repository here: https://github.com/physicalaff/Knight-Chess-Helper

🛠️ The Technical Challenge: Bypassing CSP & Sandboxing

Modern platforms like Chess.com use very strict Content Security Policies (CSP). You cannot simply inject an external engine script or make third-party server calls to evaluate a board position without triggering security blocks.
To solve this, Knight runs entirely offline and locally using a multi-layered Manifest V3 messaging system:

The Core Logic: Powered by an optimized local Stockfish WebAssembly (WASM) engine.
The Bridge: Since Manifest V3 background service workers don’t support heavy WASM environments directly in some configurations, the extension utilizes Chrome’s Offscreen Document API (and native background workers in Firefox) to run the engine inside an isolated, secure offline process.
The UI Layer: A premium, custom glassmorphic dashboard panel injected directly into the active tab that updates hints instantly on click with zero cooldown.

🧠 Emulating Human-Like Behavior

One of the most interesting parts of this project was moving away from “robotic” engine play. To make the assistant truly feel like a human companion, I implemented mathematical models to simulate organic human flaws and constraints:
Mouse Movement 2.0: Generates smooth Bezier curves with simulated physical hand micro-tremors.
Emulated Fatigue: Thinking times automatically scale and slow down by 2.5% per turn as the game progresses past move 15, mimicking natural mental exhaustion.
Calculated Misclicks: A built-in small percentage chance to click a neighboring square first, pause in hesitation, cancel, and then correct the move.
Opening Book Integration: Automatically fetches and executes the first 14 half-moves smoothly using the Lichess Masters Database.
🎨 Advanced Presets & ELO Scaling

The extension features a mathematically calibrated preset matrix. Users can manually scale the assistant from 1000 to 1500 ELO, which dynamically adjusts engine depth, mistake chances, blunder rates, and average thinking variance in real-time.
There is even a hidden ZXC / Shadow Fiend Mode that overhauls the entire UI into a dark-matte neon-red design, complete with an active animated avatar and audio synchronization.

📂 Source Code & Feedback
The project is completely open-source and licensed under the MIT License. If you are interested in Chrome Extension development, WebAssembly integration, or advanced content script messaging, feel free to check out the codebase!
⭐ Repository: https://github.com/physicalaff/Knight-Chess-Helper
I would highly appreciate your feedback, code reviews, or a ⭐ on GitHub if you find the architecture interesting! What do you think about running heavy WASM engines directly inside browser extensions? Let’s discuss in the comments!

Breaking the Trade-off Between Self-Custody and Intelligent Automation on the Stellar Network

choose between two fundamentally flawed options. On one hand, centralized, custodial platforms offer convenient automation tools, trading bots, and 24/7 market monitoring—but they require users to surrender their private keys, exposing them to catastrophic counterparty risk. On the other hand, non-custodial solutions provide true financial sovereignty, but they demand constant manual oversight, leaving capital idle and vulnerable to emotional, heat-of-the-moment decision-making.

To eliminate this friction and optimize capital efficiency specifically within the Stellar (XLM) ecosystem, we created Krisfi: a secure, non-custodial wallet tightly integrated with a server-side automated execution engine built for data analysis and capital protection.

The Core Problem: Idle Capital and Emotional Friction

Most decentralized finance (DeFi) users face the same recurring pain points every day:

Capital Inefficiency: Assets sit dormant in wallets without any active yield or optimization strategy.

Emotional Trading: Buying and selling driven by short-term market noise, fear of missing out (FOMO), or panic selling (FUD).

Time Constraints: The physical impossibility of monitoring spreads, liquidity pools, order books, and price action 24/7.

The Custody Trap: Forcing users to trust third-party multi-sig or custodial bots just to execute basic automated strategies.

The Krisfi Approach: Total User Sovereignty, 24/7 Server-Side Execution

Krisfi bridges the gap by ensuring users never have to compromise on security for efficiency. The architecture decouples key ownership from trade execution. While the user retains absolute control of their cryptographic keys, the automated engine runs on a dedicated cloud infrastructure (VPS) 24/7—executing strategy parameters even when the user’s device or browser is completely offline.

  1. True Non-Custodial Architecture

Sovereignty is mathematically guaranteed. Krisfi wallets are generated or recovered using a standard 12-word seed phrase. The system leverages enterprise-grade encryption within the server vault to securely sign authorized transactions, but the seed phrase never belongs to Krisfi. Users can import their 12 words into any other Stellar-compatible interface at any second to access their funds independently.

  1. Data-Driven Execution Engine

Moving away from speculative “black-box” trading algorithms or fake guaranteed returns, Krisfi operates on strict statistical advantages. Before executing any network operation, the engine analyzes live Stellar network metrics:

Recent price corrections combined with historical recovery velocity.

Real-time volume and order book depth to mitigate low-liquidity traps.

Bid-ask spreads across selected assets.

Micro-transaction costs (the bot simulates Stellar network fees and slippage, triggering an execution only when net expected profit outweighs the friction overhead).

  1. Dynamic Liquidity Management

Capital preservation is the ultimate goal. When market conditions lack a clear statistical edge, capital remains unexposed or is routed to stable, compatible yield strategies. The engine dynamically calculates pool risks, entry/exit fees, and the threat of impermanent loss, ensuring liquid capital is always ready to deploy when market corrections present optimal entry points.

Security Engineering and Risk Transparency

What sets Krisfi apart is its commitment to radical transparency. In an industry flooded with deceptive marketing, Krisfi explicitly states its boundaries: there are no promises of guaranteed profits. The crypto market is volatile; therefore, the software focuses on algorithmic discipline, fractional purchasing, strict asset limits, and the automatic pruning of underperforming tokens.

From a technical perspective, the platform implements a strict Defense in Depth security model:

Absolute separation between the user interface (frontend) and the execution logic (backend).

Hardened server vaults for encrypted session management.

Rigorous Stellar address, Memo, and smart contract validation layers.

Infrastructure fortified with advanced security headers, strict CORS controls, rate limiting, and comprehensive technical logging.

The Development Roadmap

Krisfi is being deployed in clear, methodical phases, prioritizing infrastructure maturity and security audits before scaling:

Phase 1 (Foundation): Core Stellar wallet infrastructure, featuring secure seed-phrase generation/recovery, live balance tracking, and native withdrawals.

Phase 2 (Automation): Deployment of the 24/7 VPS execution engine, transaction ledger history, and a mobile-optimized management dashboard.

Phase 3 (Optimization): Internal per-asset performance reports, automated asset pruning, and dynamic weight allocation strategies.

Phase 4 (Scale): Multi-wallet infrastructure support and distributed cloud architecture for maximum uptime.

Phase 5 (Hardening): Comprehensive external security audits, full systems hardening, and public ecosystem expansion.

Conclusion

Krisfi was engineered to serve as a clean, reliable, and transparent infrastructure layer for the next generation of DeFi users. By combining the unyielding security of self-custody with the relentless discipline of automated code, Krisfi gives Stellar network investors the ultimate tool: peace of mind over their keys, and machine efficiency over their capital.

Review the complete technical specification and read the full whitepaper at: whitepaper.krisfi.com

I Open-Sourced a Practical Fullstack Interview Preparation Repository (React + Node + System Design)

I’ve taken and conducted software engineering interviews over the years, and one thing became obvious:

Most interview prep resources don’t reflect real-world engineering.

You’ll find textbook definitions, toy examples, and outdated patterns—but very little around production debugging, architecture tradeoffs, scalability, and practical interview thinking.

So I started building an open-source Fullstack Interview Prep repository:

https://github.com/akshayit/fullstack-interview-prep

The goal:
Create something useful for interns, freshers, mid-level engineers, and senior developers.

Topics include:

JavaScript / TypeScript
React / Next.js
Node.js
SQL / MongoDB
DevOps basics
System Design
DSA
Production engineering concepts

This is a living project, and I’d love community feedback.