Back to Portfolio
Owned ProjectLive

FanficWizard: a production AI writing tool — free tier, paid credits, content safety — live in three days

An AI fanfic generator with streaming output, a free tier that's hard to farm, credit-paid chapters that continue a story, two-layer content safety and three payment providers. Built on my own reusable template with Claude Code, from first commit to live site in three days.

Role
Solo — product, SEO, design, full-stack and AI engineering, payments, operations
Stack
Next.js 16React 19TypeScriptTailwind CSS 4PostgreSQL (Neon)Prisma 7Better AuthZodVitestCloudflare TurnstileWaffo · PayPal · StripeVercelClaude Code

Overview

  • Challenge: ship a real paid AI product, not a demo: free usage that can't be farmed, model spend that can't run away, content rules strict enough for payment providers, and a way to get paid as a solo developer.
  • Solution: FanficWizard, an AI fanfic generator. Free short scenes need no sign-up. Credits buy full chapters that continue a story. It runs on Novalith, my reusable template for AI tool sites.
  • Results: started October 23, 2026 and live at fanficwizard.com on October 25; 327 automated tests passing; three payment providers verified end to end in test mode. Too new for traffic or revenue numbers.

FanficWizard home page: the tool is the pageFanficWizard home page: the tool is the page

The challenge

Fanfic writers get stuck on a scene; readers want the one prompt nobody has written for their favourite pairing. The free tools they find write short, lose the characters' voices, and forget the setup after a couple of continuations.

Making that a product brings the questions every AI feature in production faces:

  • Free usage has to be generous enough to try, but a script mustn't be able to burn the model budget.
  • Model spend needs a hard daily ceiling, based on real token usage rather than an estimate.
  • Content rules have to hold on both the request and the generated text, because payment providers won't accept a tool that writes explicit content. FanficWizard stays at a Teen rating and never writes romantic or sexual content involving minors.
  • Getting paid as a solo developer means no single payment platform can be relied on.
  • Being found by search engines and AI assistants, with near-zero fixed cost until it earns money.

What I built

The home page is the tool. Fandom, characters or pairing, an optional premise, up to three tropes, tone, point of view and length. The story streams in as it is written and ends with an AO3-style title, rating, summary and tags.

FreeWith credits
AccountNoneGoogle sign-in
Allowance3 scenes a day1 credit per chapter
LengthShort scene, ~500 wordsFull chapter, ~1,500 words
Model tierCheaper modelStronger writing model
Continue the story—Chapter by chapter from the story library

Stories that stay consistent. Paid chapters are saved to a story library. "Continue this story" sends the model the author's character notes, a running summary of the story so far and the end of the previous chapter, plus an optional direction for what happens next.

Example fanfics on the home page, written with original characters onlyExample fanfics on the home page, written with original characters only

More tool pages from configuration. Besides the home page there is a reader-insert generator, a fandom directory and fandom landing pages. Each has its own form, prompt, model tier, credit cost and FAQ, and the same engine runs them all.

An admin for running it. Today's spend against the cap, every generation with a plain-English reason when it failed or was blocked, safety blocks, revenue by traffic source, AI provider health and the credit ledger. Payment methods and AI providers can be switched on and off without a deploy.

Technical highlights

FanficWizard architectureFanficWizard architecture

Production concernHow FanficWizard handles it
Adding a toolOne engine, one config per page: fields, prompt template, model tier, credit cost and FAQ. A new tool page is a config entry, validated with Zod at build time
Waiting for outputResults stream as they are written; a visitor can stop; a result cut off by the output limit is detected and labelled
Free-tier abuse3 free generations a day per salted IP hash and per account, behind Cloudflare Turnstile; the IP is read only from the trusted proxy, so it can't be spoofed; failed requests don't count
Unsafe contentTwo layers (OpenAI Moderation and a classifier on the cheap model) check the request before writing and the result about every 400 words while it streams. A hit, an error or a timeout all block. Blocked text isn't saved and credits are refunded. Logs record only the stage, layer and category, never the text
A model provider going downOrdered OpenAI-compatible providers: if one fails before the first token, the next takes over; three failures in a row open a circuit breaker for five minutes, shared across server instances; on/off and order are set in the admin
Runaway costSpend is reserved at the highest candidate price before the call, then recorded from the provider's actual token usage; a site-wide daily cap and a separate cap for free usage
PaymentsWaffo, PayPal and Stripe. Credits are granted only from signature-verified webhooks, and only once per checkout; refunds and chargebacks take credits back; test keys can't grant credits on the live site; each provider has an admin switch; the first traffic source is stored with the order
Search and AI answersServer-rendered pages with SoftwareApplication and FAQPage structured data generated from config; FAQs written as the questions people ask AI assistants ("Is there a free AI fanfic generator with no sign-up?"); robots.txt lets AI search crawlers in; a build check enforces all of it
Leaking secrets or promptsContent-Security-Policy and security headers; the build fails if a secret appears in public files; a stream that starts repeating the system prompt is stopped

Built on my own template. Novalith holds everything above. Sign-in, credits, payments, admin and the story library are modules that can be removed, and a script proves it by deleting each one and rebuilding. Engine changes go into the template. The FanficWizard repository holds the configuration, copy, brand assets and a few small layout tweaks, so the next site starts from the same base.

Shipped in three days, then fixed what only production showed

FanficWizard went from first commit to a live site in three days (October 23–25, 2026). The way of working was the same as on client projects: a short product spec, one written instruction per feature, Claude Code doing the implementation, and one gate, npm run verify (lint, type check, tests, license policy, build with a secret scan, SEO check), that has to pass before anything ships.

DateWhat happened
Oct 23Template imported, site configuration and copy written; template fixes and security hardening
Oct 24End-to-end run against real models: free streaming, the daily limit, an explicit request refused, Google sign-in, a paid chapter saved to the library
Oct 25Live on fanficwizard.com; Waffo and PayPal payments, admin switches, traffic attribution and provider failover added to the template; Stripe the same day
Oct 27–28New admin, reader-insert and fandom pages, Google One Tap; all three payment providers verified in test mode

Four problems only appeared against real services:

  1. A model provider wasn't available for my account. The fix was not to depend on one: the site talks to any OpenAI-compatible provider, and the template gained ordered providers with automatic failover, a circuit breaker and admin switches.
  2. The moderation call was hard-coded to the official endpoint. It became a configurable base URL, checked with a small script before it was switched on.
  3. Paid chapters were cut off by a 2,400-token output limit. I raised the limit to 3,200, told the model to wrap up in time, and added detection: the provider's "stopped at length" signal is recorded, and the reader sees that the text may end mid-sentence.
  4. The template's tests assumed the demo site's content, so a new site failed them. The tests now use their own fixtures and pass on any site.

Quality & testing

CheckResult
Automated tests327 passing (Vitest) — content policy, streaming, provider failover and circuit breaker, free quota, credit ledger, payment webhooks for each provider, security headers, SEO
Release gatenpm run verify: lint, type check, tests, license policy, production build, secret scan, SEO check
Removable modulesA script deletes each optional module and rebuilds the site
Real modelsFree streaming, daily limit, explicit request refused, sign-in, paid chapter saved to the library
PaymentsWaffo, PayPal and Stripe in test / sandbox mode: checkout → webhook → credits granted → refund takes them back

Results & limits

AreaWhere it stands
StatusLive since October 25, 2026; payments are open in production
Traffic and revenueToo early: no traffic, user or revenue figures yet, and no real orders so far. I'll add numbers when there are some
Model failoverBuilt and tested in the template; the live site currently runs on a single provider, with a backup ready to add as a config entry
PricesCredit packs are priced from estimated model costs and will be reset against measured costs
ExportCopy text with the AO3-style block; EPUB is not built

How I delivered it

StepWhat was produced
RequirementsProduct spec: users, free vs paid, pricing assumptions, content rules, launch checklist
SEO / GEOKeyword choice, page titles, FAQs written as real questions, structured data
UITool-first home page, streaming result panel, pricing, library, admin
ArchitectureConfig-driven tool engine on Novalith; removable modules; PostgreSQL
BuildOne written instruction per feature, implemented with Claude Code
TestingUnit tests, the verify gate, real-model runs, payment tests in sandbox mode
LaunchVercel, custom domain, Google Search Console, GA4 and Microsoft Clarity

Planning something similar?

Write down the context, core features, budget and timeline. It takes a few minutes and gives us a concrete starting point.

Start a Project Brief