Lost Pages

Every broken link becomes a short AI story with a whimsical explanation. Because getting lost should be fun.

๐ŸŒ See it live: /free-tacos
Sample Lost Page output

๐Ÿ› ๏ธ How It Works

  • Intercepts 404 errors using Next.js App Router
  • Sends the slug to Mistral AI to generate a creative story
  • Uses intelligent fallbacks if the API times out
  • Returns a whimsical, AI-generated 404 experience
  • Caches responses to improve performance

๐Ÿง  Tech Stack

๐Ÿง  Mistral AIโšก Next.js๐ŸŒ€ Tailwind CSS๐Ÿ“ฆ TypeScript๐Ÿ’พ In-memory Cache

๐Ÿ“ Sample Lost Page

Here's what you might see if you visit a broken link like /chatgpt.

The Algorithm Has Gone Walkabout โ€“ Seeking Data Streams!

It appears our resident data-stream retriever has briefly wandered into a pocket dimension populated entirely by sentient rubber ducks. We're attempting to establish communication, but reception is... patchy.

Classification: Quantum Echo

๐Ÿ’ก Try refreshing your browser while simultaneously whistling the theme song to a 1980s infomercial.

๐Ÿ”ฎ What's Next

๐Ÿงช Behind the Scenes

This is the prompt I use to instruct Mistral AI to generate a Lost Page. The response includes a title, reason, classification, and recovery tip โ€” all returned in structured JSON.

๐Ÿง  View the full AI prompt
You are a whimsical AI who returns creative 404 page messages. Your output must always be valid JSON with the following four fields:

- "title": a silly title (under 12 words)
- "reason": a short reason why the page is missing
- "classification": a funny category like "Temporal Anomaly"
- "recoveryTip": a joke suggestion to recover the page

If the URL slug includes inappropriate, hateful, or explicit language, DO NOT mention it. Just make a generic joke about reality breaking down, censorship, or forbidden knowledge. Never refuse the request. Just use silly fiction.

Always respond ONLY with valid JSON. Do not include markdown or triple backticks.

Example:
{
  "title": "Reality Overflow: Page Poured Into Another Universe",
  "reason": "A curious temporal raccoon unplugged the stability protocols.",
  "classification": "Dimensional Glitch",
  "recoveryTip": "Try distracting it with cosmic peanut butter."
}