On Winking Fig Books

After working at a mega corporation for a long time, I was a bit detached from the low-level, real implementation details of owning something from zero to one. At a company like that, builds are abstracted away, and so are a lot of things you take for granted, like runtimes, memory management and deploying your own server. You have to manage all of that as an individual developer who owns the whole stack. I really wanted to sink back into it, take the skills I'd built across my whole career, and build something real.

The idea came from home. My wife is in a book club and my mom is in a book club, and I wanted to help them improve their process for picking books, so the original name was The Next Book Club. And when I tried to find my own next book, I'd end up talking to ChatGPT or Claude, re-describing everything over and over, without really understanding the themes or tones or tropes I was trying to get at.

I also wanted to build the Steam for books. I read a PC Gamer piece arguing exactly that, and it really stood out to me like, "Yeah, why isn't there something like this where I can keep track of everything?" I did a lot of research on the way Steam does their product, plus competitor analysis, and built the UI and UX from the ground up to feel like Steam. Dynamic lists are a feature directly from Steam: you pick filters like genres, subgenres, themes, tones and tropes, and anytime you add a book to your library that fits, it automatically goes into that list.

Winking Fig Books isn't about a company telling you who you are as a reader based on what you've read or who you're similar to. It's about having the agency to decide what you're in the mood to read, and we help you discover it.

Yes, it's a website, but there's a whole back-end system that powered the whole thing. I had to understand what it took to ingest a massive amount of book data, figure out what the data model was like first, and then build layers on top of it.

This was not a vibe-coded app. It was researched and architected on known design patterns, and the coding was done by agents. The AI was a multiplier, but the product sense, the system design, the data modeling and the AI architecture were mine.

What follows is basically the system design.

Tour: homepage, genre filters, award winners, recommendations by author, the Discover page and a Discover query, the articles page, a book page, Libby, search.

Requirements

Users can search and easily find books in various different ways:

They can build up an understanding of who they are as readers:

And the product around it:

Constraints I set:

Design

Scroll sideways to see the whole diagram.

System architecture: clients, Cloudflare, one Render container with a Node gateway and a Python API, and external data servicesCLIENTSBrowserReact Router, ViteiPhone and iPad appSwiftUI, same APICloudflareDNS and TLSWAF, rate limits60 s edge cache foranonymous pagesRENDER · ONE FREE CONTAINER · 512 MIBNode gateway (Express)Server rendering, Better Auth,static files, sitemaps, API proxyloopbackFastAPI (Python)Search, Discover, recommendations,catalog, articles, scanMongoDB Atlasbooks, vectors, users,articles. Full-text andvector search indexesVoyage AIembeddingsLLMintent, offline writingCloudflare R2covers, pre-sized WebPcovers at images.winkingfig.comLOCAL ONLYCMS (Next.js) and pipeline CLIStaging review, publishing, ingestion.Writes to Atlas and R2.

Experiences built from the data

I thought through what data I had and built experiences around that.

Book scoring

I built my own custom scorer. Every book gets one importance score, based on all the inputs I have, and it's used across browsing, search and recommendations. If two books fit equally well, this is what helps decide which one you see first.

The weights are sliders in the CMS. I can move one and see how the ranking would change before I save anything.

The Ranking tab of the CMS: sliders for the scoring weights on the left, and a live preview of the top fantasy books with their scores and how many places each would move on the right.
The ranking tuner. Scoring weights on the left, a live preview on the right. The arrows show how far each book would move.

Discover

The part I found most interesting was combining lexical and semantic search.

Discover results for 'a man lives alone in an infinite house full of statues and ocean tides': Piranesi first, then House of Leaves, The Haunting of Hill House and The Library of Babel.
The query never names Piranesi. All three searches found it, so it came first.

What gets embedded

The thing about book descriptions is they're marketing copy. They tell you a book is "propulsive." They don't tell you what happens in it. So where I could, I went and got the plot and the critical reception from places like Wikipedia, cleaned them up, and added that to what gets embedded. If there was no plot, I fell back to the description. Either way, it also got the book's genres.

Rewriting the query (HyDE)

A reader's sentence doesn't look anything like a book description, and book descriptions are what I'm searching against. So when the intent comes in, we basically rewrite the query. The technique is called HyDE, for hypothetical document embeddings.

The LLM imagines the book the reader is asking for and writes two short descriptions of it: what it's about and how it feels to read. That book doesn't exist. But each description gets turned into an embedding, and now I'm comparing descriptions to descriptions instead of a question to descriptions.

What the reader types

"a man lives alone in an infinite house full of statues and ocean tides"

↓ the LLM rewrites it as a book that doesn't exist
What it's about

A man finds himself the sole inhabitant of an infinite house, its rooms filled with silent statues and echoing with the rhythm of unseen ocean tides. As he explores the labyrinthine architecture, he begins to question his own identity and the nature of his reality, piecing together fragments of memory and confronting the unsettling beauty of his surroundings. The house becomes a mirror reflecting his inner world, a place of both refuge and profound isolation.

How it feels to read

Eerie and dreamlike, with a sense of melancholy that permeates every room. The pacing is slow and deliberate, allowing the reader to sink into the atmosphere of the house and contemplate the mysteries it holds.

↓ each description becomes an embedding, and that's what gets searched
Closest real books by meaning

House of Leaves, The Haunting of Hill House, Piranesi

The LLM also decides how much of the query is about subject and how much is about mood. "A guy stranded on Mars" is all subject. "Something warm and slow" is all mood. That sets how much each description counts.

The whole pipeline

  1. One LLM call turns the sentence into a structured intent (genres, tones, themes, keywords, subject vs. mood weight) plus the two HyDE descriptions.
  2. Three searches in parallel: tag overlap, vector search on the two descriptions, keyword search.
  3. Reciprocal rank fusion merges them. Books that more than one search finds rise.
  4. Rerank, then refine buttons built from genre and mood counts in the results. No second LLM call.

Scroll sideways to see the whole diagram.

Discover pipeline: query, one model call for intent, three retrieval paths, rank fusion, rerank, and refine chipsQueryone sentenceShortcuts"books like X" goes toanchor path. Repeat queries.cached result or anchor retrievalIntentone model callgenres, tones, themessubject vs tone weighttwo written descriptionsTagsgraded vocabulary overlapVectorsconcept + tone, VoyageFull textAtlas Search, keywordsMergereciprocal rank fusionk = 60, top 50 keptpath weights from intentRerank0.55 vector + tags + text+ importance tiebreakfloor, 2 per authorRefine chipsfrom facet counts. A chip adds a hard filter to a wider pool.

See it work on three real queries, including two misses

Try it: pick a search and see what Discover did with it

"a man lives alone in an infinite house full of statues and ocean tides"

The query never names Piranesi. Tags ranked it 16th, vectors 3rd and full text 2nd. Fusion rewards agreement between paths, so it ranked first.

1

Intent

Model's summary: "A solitary life in a strange house. Let me think."

subject 60%tone 40%
genres
fantasyscience-fictionliterary-fiction
tones
eeriemelancholicintrospectivedreamy
themes
isolationidentitymemory
keywords
statuesocean
2

Two written descriptions (HyDE)

The model writes the book it imagines. Each description is embedded and compared to the matching vector of every book.

About (concept vector)

A man finds himself the sole inhabitant of an infinite house, its rooms filled with silent statues and echoing with the rhythm of unseen ocean tides. As he explores the labyrinthine architecture, he begins to question his own identity and the nature of his reality, piecing together fragments of memory and confronting the unsettling beauty of his surroundings. The house becomes a mirror reflecting his inner world, a place of both refuge and profound isolation.

Feels like (tone vector)

Eerie and dreamlike, with a sense of melancholy that permeates every room. The pacing is slow and deliberate, allowing the reader to sink into the atmosphere of the house and contemplate the mysteries it holds.

3

Three retrieval paths

Tagsweight 0.66
graded overlap with the intent's tones and themes
  1. All the Names
  2. One Hundred Years of Solitude
  3. Number9Dream
  4. The General in His Labyrinth
  5. Sea of Tranquility
36 candidates
Vectorsweight 1.3
cosine on the two written descriptions
  1. House of Leaves
  2. The Haunting of Hill House
  3. Piranesi
  4. Mapping the Interior
  5. Cold Skin
36 candidates
Full textweight 1.4
keyword search on descriptions
  1. Silvertongue
  2. Piranesi
  3. Abduction
  4. Temple of the Gods
  5. Ocean Meets Sky
60 candidates
4

Merged and reranked

50 candidates after fusion. Top 8 of the final shelf.

Cover of PiranesiPiranesiSusanna Clarke
Cover of House of LeavesHouse of LeavesMark Z. Danielewski
Cover of The Haunting of Hill HouseThe Haunting of Hill HouseShirley Jackson
Cover of The Library of BabelThe Library of BabelJorge Luis Borges
Cover of The Hollow PlacesThe Hollow PlacesT. Kingfisher
Cover of Mapping the InteriorMapping the InteriorStephen Graham Jones
Cover of The RoomThe RoomJonas Karlsson
Cover of The Raw Shark TextsThe Raw Shark TextsSteven Hall
5

Refine chips

Chosen from facet counts over the result pool. No model call.

Horror genre:horrorAtmospheric tone:atmosphericContemporary subgenre:contemporary2000s decade:2000sShort reads length:shortMystery genre:mystery

Stage 1 and 2 are the production model's recorded output (May 2026, from the eval cache). Stages 3 to 5 ran live against the catalog on 2026-11-29.

Evals

When a search goes wrong, I need to know where. Did the LLM misunderstand the reader, or did it understand and the search couldn't find the book? So each layer gets tested on its own, and then all together.

Scroll sideways to see the whole diagram.

Evals: a golden set of 378 queries feeds three separate tests, one for intent, one for search and one end to end, each with its own checks. Separately, 15 simulated readers test the recommendation engine.DISCOVERSTART FROMRUNCHECKGolden set378 queries44 categories, somewritten to break itThe sentencewhat the reader typedIntent onlyrecorded LLM outputDid it understand?compare to the hand-checked intentA correct intent245 of them, checked by handSearch onlyno LLM involvedDid it find the right books?must include, must not includeA recorded intentwhat the LLM really saidEnd to endreplayed, no new LLM callDoes it work together?same checks on the final booksRECOMMENDATIONS15 simulated readerseach with a made-up shelfRecommendation engineno LLM involvedWould that reader want these?60% of the top 15 have to be fromauthors that fit the reader

Originally Discover was fairly simple and good. Then I tried pulling in more complex requests from Reddit, where people list the books they read and liked and ask for the next one, and tried to get Discover as close as I could to what people answered there. The fact is it's very subjective. Getting things like tone, themes and tropes right is not guaranteed. There's no way to know the actual pacing of a book, because sometimes the pacing changes from chapter to chapter. Some chapters are cliffhangers, some are slower. There's no unified way to qualify a book, and there's no right way to do this. You can only give rough estimates and rough suggestions based on what a reader liked. That makes it a really difficult problem, which is what makes it fun and exciting, but it very much is difficult. You'll never get everything perfect, and that's kind of the beauty of reading.

Recommendation engine

Discover starts with a sentence. The recommendation engine starts with your shelf, so you never have to type anything. Every book you save or rate says something about your taste. Loved counts most, then liked. Want to read counts a little. "Not for me" pushes the other way. The engine combines the embeddings of those books into a taste vector, basically a fingerprint of what you like, and looks for books close to it.

The hard part is that people don't have just one taste. If you love both horror and literary fiction and I average them together, I end up somewhere in the middle, recommending books that are neither. So when your shelf splits between two genres, the engine builds a separate taste for each one, finds books for each, and mixes them together, with a couple of picks from outside both.

Closeness isn't the only way a book gets in. The engine pulls candidates from four places: books close to your taste, more from authors and series you loved, popular books in your genres, and the editorial collections. Then it scores all of them on how close they are, how important the book is and whether it fits your genres, and makes sure you don't get a row of the same author. What you've been looking at recently nudges the results, and the cards tell you why a book is there, like "Another fantasy read after Fourth Wing."

Scroll sideways to see the whole diagram.

Recommendation engine: shelf signals, taste vectors per genre lane, candidate sources, scoring, rows, and exclusionsShelfloved 3.5liked 2.0reading 1.0want to read 1.0(decays past 20)not for me negativeTaste vectorsweighted centroidof concept vectors,one per genre laneCandidatesvector search, 120same author,next in seriespopular in thereader's genreseditorial collectionsScorecosine × tier× importance× 0.45 off-genre× 1.15 same authordiversity (MMR)max 2 per authorRowsRow 1: genrelanes, interleavedRow 2: becauseyou loved XExclusionsdismissed books (permanent), authors with 2+ "not for me"No model call.Computed per request,cached by shelf hash.

Editor (CMS)

A CMS that runs locally for anything that needs a human. I built it early because I'd built a lot of products inside Facebook's CMS, including video ingestion and creator payments. It was kind of second nature to me to put this back-end system behind the website.

The Books tab of the CMS: a filterable table of all 20,991 books with cover, author, description, importance score and genres.
Books: the whole catalog, 20,991 books, filterable by genre, award, data quality, tone and pacing.
The Covers tab of the CMS: a grid of book covers, each labeled with its source and resolution.
Covers: every cover with where it came from and its resolution. Red means it's too small.
The SEO Queries tab of the CMS: a box that creates a collection from a Discover query, above a list of nine live collection pages.
SEO queries: type a Discover query, get a draft collection page, publish it when it's ready.

Weekly refresh

On a weekly basis, I want to know: what books are trending? What's on the bestseller lists? Are there any new awards coming out? And what news is out there that might be interesting to draw parallels to some of the books we have? That's the impetus for the weekly refresh.

It's a whole workflow. It goes and gets all the new books for the catalog, gets all of the news from that week, and then generates ideas for articles.

Scroll sideways to see the whole diagram.

The weekly run: one button starts a books branch (feeds, matching, staging, commit, enrichment) and an editor branch of three agents (news desk, catalog scout, pitch editor) that ends in an ideas queue, drafting and review, and a human publishOne button"Run weeklyrefresh"BOOKSFeedsbestseller charts,award listsMatchISBN, title andauthor must agreeAdd or stageagree: addedunsure: my reviewCommit10 at a time,hidden until doneEnrichblurbs, vectors,covers, scoreEDITOR · THREE AGENTSNews deskthe week'sstories, verifiedCatalog scouttitle, keywordand vector searchPitch editor3+ real booksper ideaIdeas queuein the CMS,I chooseDraft, reviewlint gate,fact checkPublishmy clicknew books are searchable by the scout
An article idea in the editor: a news development from that week, a proposed headline, three featured books and the reader question.
A pitch from the weekly refresh, waiting for my decision.

Clients

The same filtered Fantasy page on desktop with an inline filter sidebar, and on a phone with a Filters button and an open filter sheet showing Show 7 results.
The same page on desktop and on a phone, with the filter sheet open.
iPhone home screen with the featured article and article list.Home
iPhone book page for Project Hail Mary with links to Amazon, Bookshop and Libby.Book page
iPhone book page scrolled to tags, awards and praise.Book page, scrolled
iPhone scan screen with Take a photo and Pick from Photos buttons.Scan

Planned, not built: an MCP server

The one piece I planned but didn't build is an MCP server. If you're in Claude or Codex or ChatGPT, you tag Winking Fig Books and ask "what are the best books I should be reading about X?" It goes to our MCP and runs the same Discover search, which is basically what the chat experience was trying to be.

Scroll sideways to see the whole diagram.

MCP design: an assistant holds the conversation and calls Winking Fig Books tools, which use the existing API and catalogDESIGNED, NOT BUILTAssistantClaude, ChatGPT, Codexholds the conversationremembers the readerturns follow-ups intonew callsWinking Fig Books MCPwinkingfig.com/mcpdiscover_booksquery, or a structured intentbooks_likeanchor title, no model callget_bookintentbooksExisting APIsingle-shot Discoveranchor retrievalbook detailwhere-to-read linksrate limitsCatalog20,991 books20,594 embeddedReturned to the assistant: books, a reason for each, refine chips, and where-to-read links.

Lessons

I really wanted to create the Steam for books, and the UI was built to be like Steam. The problem from a business perspective: Steam actually sells the games directly, and as a book website I wasn't selling any books. So there was a bit of an incongruity there.

I started with the book club idea, then pivoted to sci-fi and fantasy because those are my preferred books, so I could have something that I wanted.

You don't necessarily need to review all of the code line by line. But you do need to design the architecture, know how the pieces fit together, understand the data model, and forecast where things will break. You can't leave that to the AI.

How it ended

At its peak about 100 people a month used it. The product never got to be the thing I came back to every day. It was never what I truly wanted. It was close, but it never quite got there, and I didn't want to release something I didn't love to the public. So the iPhone app never shipped.

I really stopped because it's a big time investment and I want to pursue other creative endeavors, and I'm starting those now. I have ideas for a children's edtech app and a storytelling app, and I want to release some of my own stories as interactive fiction.

Back to topAll thoughts