DEV Community

Cover image for How I Used Astro 5 + React + Inngest to Build an AI Ebook Creator (700+ Users, $0 Ad Spend)
Sam May
Sam May

Posted on

How I Used Astro 5 + React + Inngest to Build an AI Ebook Creator (700+ Users, $0 Ad Spend)

I've been building Inkfluence AI since October 2025 - an AI-powered ebook creator that takes you from idea to finished PDF/EPUB in minutes. 700+ users so far, entirely organic. No funding, no ads, just code and content.

This post is the technical deep dive. I'll focus on the architecture decisions, the SEO system that drives growth, and a relatively new channel; AI citation optimisation - that's been surprisingly effective!

The Architecture

The product has two distinct halves that serve very different purposes:

The App (React + Vite)

The ebook editor is a full React SPA. Users pick a content blueprint (23 types: novels, cookbooks, study guides, workbooks, lead magnets), generate outlines and chapters with AI, design covers on a canvas editor, and export to PDF/EPUB/DOCX.

Stack:

  • React + Vite + Tailwind CSS v4 on Vercel
  • Firebase Auth + Firestore for data
  • Stripe Checkout + Customer Portal for payments
  • OpenAI GPT-4.1 (mini on free/Creator tier, full on Premium)

The Marketing Site (Astro 5)

This was the pivotal architecture decision. I started with everything as a React SPA. Terrible for SEO because Google saw a blank page with a loading spinner. Moving to Astro 5 for the marketing site, blog, and landing pages was the single biggest growth unlock.

Blog posts are TypeScript files in src/lib/blog-posts/ that export metadata + HTML content. Astro auto-discovers them with import.meta.glob and generates static HTML at build time. No CMS, no database for content. Just TypeScript files and git.

// src/lib/blog-posts/my-post-slug.ts
export const metadata = {
  title: 'My Post Title',
  slug: 'my-post-slug',
  publishDate: '2026-02-12',
  // ... more metadata
};
export const content = `<article>...</article>`;
Enter fullscreen mode Exit fullscreen mode

This approach gives me:

  • Zero runtime cost for content pages
  • Type-safe metadata - TypeScript catches broken links and missing fields at build time
  • Git history on every content change
  • No CMS lock-in - it's just files

I now have 84 blog posts, 15+ comparison pages, and 200+ total indexed pages. All static HTML. Lighthouse scores are consistently 95+.

Background Jobs (Inngest)

Book generation is the tricky part. A single chapter takes 60-90 seconds with GPT-4.1. A full 10-chapter book can take 5-10 minutes. Vercel serverless functions timeout at 30 seconds.

I evaluated several options:

  • Direct API calls with chunking - fragile, user has to keep the tab open
  • AWS SQS/Lambda - works but adds infrastructure complexity
  • Inngest - serverless durable functions with built-in retries, timeouts up to 300s, and step functions

Went with Inngest and it's been rock solid. The flow:

  1. User clicks "Generate Book"
  2. API endpoint fires inngest.send({ name: 'book/generate.requested', data: { projectId } })
  3. Inngest function picks it up, generates chapters sequentially (each as a step with its own retry logic)
  4. Firestore updates in real-time, frontend shows progress via snapshot listeners
// Simplified - actual function is ~200 lines with error handling
export const generateBook = inngest.createFunction(
  { id: 'generate-book', retries: 2 },
  { event: 'book/generate.requested' },
  async ({ event, step }) => {
    const { projectId, chapters } = event.data;

    for (const chapter of chapters) {
      await step.run(`generate-${chapter.id}`, async () => {
        const content = await generateChapterWithAI(chapter);
        await updateFirestore(projectId, chapter.id, content);
      });
    }
  }
);
Enter fullscreen mode Exit fullscreen mode

The step-based approach means if chapter 7 fails, Inngest retries just that step instead of regenerating the whole book. Saves tokens and time.

The SEO System That Actually Works

I don't guess at content. Every piece starts with Google Search Console data.

The Weekly Loop

  1. Export GSC queries, sort by impressions (descending) with CTR near zero
  2. For high-impression / zero-click queries: rewrite the page title and meta description to be more compelling
  3. For queries with no matching page: create one
  4. Interlink everything - every blog post links to 3-5 related posts and 2-3 product pages
  5. Run generate-sitemaps.mjs and ping IndexNow on every deploy

Real example: I saw "free ai book writer" pulling 136 impressions at position 38 with zero clicks. I didn't have a page for it. Wrote a 7-tool comparison. Within days it was indexed and climbing.

Internal Linking Matters More Than You Think

I spent a full session today adding contextual links between 9 related blog posts. Not a fun afternoon, but the data is clear: my well-interlinked pages (sitting inside topical clusters with 5+ bidirectional links) rank noticeably better than orphan pages with identical domain authority.

If you have a content site and you're not actively managing internal links, you're leaving rankings on the table.

IndexNow for Fast Indexation

I built an IndexNow integration (api/indexnow.js) that pings Bing/Yandex whenever I deploy. New pages get indexed in hours instead of days. The implementation is trivial:

// POST to IndexNow with your key and URLs
const response = await fetch('https://api.indexnow.org/indexnow', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    host: 'www.inkfluenceai.com',
    key: process.env.INDEXNOW_KEY,
    urlList: changedUrls
  })
});
Enter fullscreen mode Exit fullscreen mode

Google doesn't officially support IndexNow, but I submit sitemaps to both GSC and IndexNow endpoints. Belt and suspenders.

AI Citation Optimisation (the Channel Nobody's Talking About)

This one surprised me. Microsoft Copilot has cited my pages 591 times, with the trend accelerating at 53 citations in a single day recently.

I started adding "direct-answer blocks" at the top of key informational pages. These are styled callout boxes with a single, comprehensive paragraph that definitively answers the page's core question. Example for my KDP SEO page:

What is KDP SEO? KDP SEO is the practice of optimising your Amazon Kindle Direct Publishing listing; title, subtitle, description, backend keywords, categories, and A+ content to rank higher in Amazon's search results. Unlike Google SEO which focuses on backlinks and domain authority, KDP SEO is primarily driven by keyword relevance, sales velocity, and review quantity...

AI chatbots love to quote these because they're self-contained, authoritative, and directly answer the user's question without requiring the AI to synthesise from multiple paragraphs.

If you're doing SEO in 2026, this is not optional. AI-driven search is becoming a significant traffic source, and the pages that get cited are structured differently from traditional SEO content.

Mistakes Worth Sharing

Starting with a React SPA for everything. I had zero organic traffic for months. Astro was a revelation - static marketing pages with React islands for interactive components. If your product needs organic traffic, choose your rendering strategy on day one.

Ignoring mobile for internal tools. I've been working 10+ hour days since October and only just made my admin dashboard responsive. Four months of being chained to my laptop to check metrics. Build responsive from the start, even for admin panels only you use.

Underestimating niche use cases. My cookbook/recipe-book blueprint turned out to be surprisingly popular. Users kept finding it organically while I focused all marketing on "ebook creation." Watch your analytics for unexpected use cases, they might be your best growth vector.

The Numbers

Metric Value
Users 700+
Blog posts 84
Indexed pages 200+
AI citations (Copilot) 591, trending up
Ad spend $0
Infra cost ~$20/mo
Time 4 months solo

Wrapping Up

The three biggest levers for growth, in order:

  1. Astro for static pages - turned a React SPA black hole into 200+ indexable pages
  2. GSC-driven content - no guessing, only writing what the data says people are searching for
  3. AI citation blocks - structuring content so AI chatbots cite you (this is the next SEO)

If you're building a content-adjacent SaaS and not doing these three things, you're leaving a lot of organic growth on the table.

Happy to answer questions about any of this; the Astro + React split, Inngest for background jobs, the AI citation strategy, whatever.


Check out Inkfluence AI if you're curious about the product itself.

Top comments (0)