threem
Ashton-C/threem
3M — type a game, get its Micro/Meso/Macro skill breakdown. Next.js + Supabase + Claude.
Instalação
npx convez-ai Ashton-C/threem1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
README
A tradução para o português deste README ainda está na fila.
3M — Micro / Meso / Macro game breakdown
Type a game, get its Micro / Meso / Macro skill breakdown, scored by an LLM against a fixed rubric. No accounts. The DB starts empty and fills itself as people search.
Stack: Next.js (App Router) · Supabase (Postgres) · Google Gemini API (free tier) · Vercel.
The frontend never talks to Supabase or the LLM directly — everything goes through one server-side route:
browser → /api/score → cache lookup (Supabase)
→ miss? LLM scoring call
→ write back to cache
→ return scores
Two-stage cache: raw spelling → alias → game. "LoL", "lol", and "league of legends" all resolve to one canonical row, and each spelling only ever costs one LLM call, then it's free forever.
Setup
-
Supabase — create a project at supabase.com, then run
supabase/schema.sqlin the SQL editor. -
Env vars — copy
.env.exampleto.env.localand fill in:SUPABASE_URL+SUPABASE_SERVICE_ROLE_KEY(project settings → API). The service-role key only ever lives server-side — never expose it in aNEXT_PUBLIC_var or client component.GOOGLE_AI_API_SECRET(aistudio.google.com, free tier — scoring usesgemini-3.5-flash)UPSTASH_REDIS_REST_URL+UPSTASH_REDIS_REST_TOKEN(upstash.com, free tier) — rate-limits new (LLM-billed) lookups to 10 req / 10 s per IP. Skipped if unset, which is fine locally but do not deploy publicly without it.
-
Run:
npm install npm run devSearch "Civilization VI" — expect low micro / high macro. Search it again — the response should return instantly with
cached: true.
Deploy (Vercel)
Import this repo into Vercel and paste the same env vars into the project
settings (same names, no .env.local). Deploy.
Done when
- Type a game → correct 3M scores + reasoning render.
- Repeat search returns instantly and shows
cached: true. - Different spellings ("LoL" / "League of Legends") resolve to the same row, no duplicates.
- Unknown game / junk input shows the "couldn't identify" message, no crash.
- Rate limit active on the route (Upstash env vars set).
- Live on Vercel.