close

DEV Community

wexmix3
wexmix3

Posted on

How I built a Goodreads alternative with Next.js, Supabase, and Claude AI

I've been frustrated with Goodreads for years. It's slow, owned by Amazon, and its recommendations are basically just "you liked a thriller, here are 50 thrillers."

So I built my own: Chapterly (getchapterly.com).

Here's the stack and a few things I learned along the way.

Stack
Next.js 14 App Router — pages, API routes, everything
Supabase — Postgres + Auth (Google OAuth) + Row Level Security
Claude (Anthropic) — AI recommendations and reading personality analysis
Tailwind CSS — styling
Vercel — deployment
The AI recommendation problem
The hard part wasn't generating recs — it was making them feel personal. I use Claude with a structured prompt that includes the user's last 10 books, their ratings, and their genres. The output isn't just a title list; it's a recommendation with a reason: "Because you gave 5 stars to books with unreliable narrators, you might like..."

Getting consistent JSON out of Claude required a greedy regex extractor rather than naive markdown stripping, since Claude sometimes adds a preamble before the JSON block.

Barcode scanning
One feature I'm proud of: scanning a book's ISBN barcode to add it to your shelf. I used html5-qrcode which handles the camera API and EAN-13 detection. The tricky part was surfacing it — I had the component built but buried in a search input. I added a floating action button on the main shelf tab so it's discoverable on mobile.

What I'd do differently
Supabase RLS is powerful but the debugging experience is rough — a misconfigured policy just silently returns no rows. I'd write RLS policy tests from day one next time.

The app is live and free to try. I'd genuinely love feedback from other developers — especially on the AI rec quality and anything that feels off in the onboarding.

https://www.getchapterly.com

Top comments (0)