Loading...
Loading...
A Next.js App Router web app for discovering and getting anime recommendations. Users can browse a paginated, filterable catalog, search with debounced full-text queries, and select multiple titles to generate recommendations. The recommendation engine works two ways: a pgvector cosine-distance query on the server, and a Web Worker that computes weighted similarity across five embedding dimensions (synopsis, genres, themes, demographic, rating) entirely in the browser. Embeddings are generated via Google's text-embedding-004 and stored as 768-d vectors in Neon Postgres. A Jikan API sync pipeline backed by GitHub Actions keeps the dataset current — daily runs drain an embedding queue, quarterly runs pull new seasonal titles.
Next.js handles the frontend, API routes, and worker host. Neon Postgres with pgvector stores both structured anime data and five-field embedding vectors per title. The recommendation engine runs in two modes: server-side pgvector queries for individual anime pages, and a client-side Web Worker for multi-select where the user picks several titles and similarity is computed in-browser from IndexedDB-cached vectors. A priority queue in Postgres decouples data ingestion from embedding generation — search results that arrive without embeddings get enqueued and processed asynchronously by a daily GitHub Actions workflow calling Google's text-embedding-004. Quarterly sync runs pull new titles from the Jikan API.
Ships a responsive recommendation app where similarity math runs either on the server or entirely in the browser depending on the use case, with no per-query cost for the multi-select flow. The automated pipeline keeps the dataset growing — new anime get indexed on search, embedded overnight, and available for recommendations by the next visit. Started as a university project with MongoDB and local BERT, then evolved into a production stack on Vercel + Neon with automated syncing.