Skip to content

Repository files navigation

newArc

anime recommender

live demo: new-arc-omega.vercel.app

tech stack

  • backend: Python, FastAPI, NumPy, pandas
  • frontend: React, TypeScript, Vite, Tailwind
  • data: Tenrai API, Jupyter, parquet
  • deployment: Vercel (frontend), Render (backend)

how it works

content-based recommender built on vector similarity. every anime is a vector, your favourite shows are turned into a vector, closest ones win

  • every anime → a 73-dim multi-hot vector over its genres + themes. ~15k titles pulled from the tenrai api, processed so low-signal titles (either without genres/themes or are some trailers/promo vids) are cut out
  • your taste vector = the average of the vectors of the anime you picked
  • score every title by cosine similarity to your taste vector, sort, return the top ones
  • refresh just walks further down the same ranked list
  • the 15,000×73 matrix is built once at startup, so a query is one vectorized numpy pass

what's to come

phase 1 is live. i look forward to phase 2:

  • dense embeddings — sentence-transformer embeddings of each synopsis instead of genre/theme multi-hot
  • feedback loop — thumbs up/down nudges your taste vector toward or away from a title
  • explainability — why something got recommended, read straight off the vectors. no LLM
  • semantic search, filters, diversity slider
  • possible collaborative filtering, however will also require auth (though not a big issue)

running locally

backend (from repo root)

pip install -r requirements.txt
uvicorn api.main:app --reload      # http://localhost:8000

frontend

cd frontend
npm install
npm run dev                        # http://localhost:5173

frontend hits http://localhost:8000 by default; in prod the api url comes from VITE_API_URL.

rebuilding the catalog (optional — parquet's already committed)

python ingest/fetch.py             # raw pages -> data/raw/
python ingest/clean.py             # clean -> data/anime.parquet

deployment

frontend on vercel, backend on render's free tier. render sleeps after ~15 min idle, so an uptimerobot monitor + github actions pings /health every 5 min to keep it awake. (tried a github action by itself first — its cron was too flaky to hold a sub-15-min interval.)

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages