3031 source-verified AI-built games from 2724 repos, attributed to GPT-6 Astra, GPT-6.1 Sol, Gemini 4 Argon, Claude Opus, Claude Sonnet and Claude Fable
Python ai-gamesai-generatedawesome-listbrowser-gamesclaudeclaude-opusclaude-opus-5-5game-developmentgeminigemini-4gemini-4-argongpt-6-astrallmopen-source-gamesopus-5-5threejsvibe-coding
{
"repo": "MozartofCode/Shark-Tank-Game",
"created_at": "2026-10-03T16:44:58Z",
"pushed_at": "2026-10-03T18:34:49Z",
"description": null,
"homepage": null,
"default_branch": "main",
"language": "TypeScript",
"readme": "# Tank Day 🦈\n\nTake a seat on the panel. Every day you get **$1M** and **five real startup pitches**. Watch each pitch, question the founder, compete with four AI sharks for the deal, then fast-forward years later and see what really happened to every company and what your slice is worth. Every day adds to your lifetime **portfolio**.\n\nIt's built to teach (including teenagers) how startup investing works: valuation, equity, dilution, exits, survivorship bias, and why investors spread their bets. The wording is deliberately plain, with a \"money words\" glossary and a short lesson after every company.\n\n## Quick start\n\nRequirements: [uv](https://docs.astral.sh/uv/) (Python 3.12) and Node 20+.\n\n```bash\nmake install\ncp .env.example .env # optional: add ANTHROPIC_API_KEY for the live AI founder\nmake dev # API on :8000, web app on http://localhost:5173\n```\n\nThe game works without an API key. A built-in offline founder answers questions from the pitch facts.\n\n### Accounts & leaderboards (Supabase)\n\nThe Supabase project **tank-day** (`uulpajrparfidqyntdop`) already has the schema from `supabase/migrations/`. To turn on saved runs and leaderboards:\n\n1. Supabase Dashboard → **Project Settings → API Keys** → copy a **secret key** into `.env` as `SUPABASE_SECRET_KEY`. It's server-only, so never commit it or put it in the frontend.\n2. Dashboard → **Authentication → URL Configuration**: set **Site URL** to your app URL and add `http://localhost:5173` to **Redirect URLs** so magic links land back in the game.\n3. Restart the backend. `/api/health` should report `\"accounts\": true, \"leaderboards\": true`.\n\nOptional: run `cd backend && uv run python ../scripts/sync_pitches.py`, then set `PITCH_SOURCE=supabase` to serve pitches from the database instead of the `pitches/` folder.\n\nSupabase's built-in email sender is rate-limited. Configure custom SMTP before a public launch.\n\n| Command | What it does |\n|---|---|\n| `make dev` | Run backend and frontend together |\n| `make test` | Backend test suite (pytest) |\n| `make lint` | ruff + oxlint |\n| `make validate` | Check every pitch in `pitches/` |\n| `make build` | Production build of the web app |\n\n## How a day works\n\nEach day starts with **$1M** and picks 5 of the 23 pitches. Every day includes **2–3 companies that really went out of business**, mixed with survivors and shuffled. (Simulated over 2,000 days, \"buy everything at the asking price\" loses money on about 16% of days.)\n\n1. **Pitch**: the real clip, cut before the deal so there are no spoilers.\n2. **Ask**: up to 3 questions to an AI founder who only knows pitch-day facts.\n3. **Invest**: the four sharks go in or out. Offer money for a slice (optionally with a **royalty**), say *why* (team / product / price / gut), or pass. The founder takes the offer that values the company highest (sharks get a bonus when they can help; royalties count 25% less), counters once if it's close, or walks.\n4. **Find out**: what really happened, what your slice is worth now, a lesson, how you did against the sharks, an index-fund comparison, and a **Share** button (🟩🟥⬜…).\n\nAfter each deal you win there's a quick **valuation check**.\n\n**Portfolio.** Every finished day adds to your portfolio: profit, every company you own, which reasons paid off, **achievements** and your daily-challenge **streak**. Guests' portfolios live in the browser; signed-in players' are saved in Supabase.\n\n**Learn.** A searchable glossary of ~25 money words; key terms in the game are tappable.\n\n**Classroom.** A teacher creates a class and gets a 6-letter code. Students join with the code and their first name, and everyone plays the same five companies. The teacher's dashboard shows live results, how the class invested in each company, and discussion prompts generated from the class's choices.\n\n## Architecture (MVC)\n\n```\nbackend/ (FastAPI)\n app/models/ Pydantic domain + API schemas (Pitch, PublicPitch, GameState, views)\n app/repositories/ Data access: Local/SupabasePitchRepository, SharkRepository (YAML), InMemoryGameStore, SupabaseRunRepository\n app/services/ Business logic: game_engine, founder (accept/counter/walk), scoring, deal_math, founder_chat (Claude)\n app/controllers/ Thin HTTP layer: /api/games…, /api/health, /api/sharks, /media\n app/content/ sharks.yaml (fictional personas), lessons.py\nfrontend/ (React + Vite + TS + Tailwind)\n src/api/ HTTP + SSE client (model access)\n src/store/ Zustand game store (controller)\n src/views/ Home, Game, Reveal screens (views)\n src/components/ SharkPanel, FounderChat, OfferSlip, DecisionBanner, VideoPlayer…\npitches/<slug>/ pitch.json (+ hidden outcome) and reactions.json\nscripts/ new_pitch, validate_pitches, generate_shark_reactions, sync_pitches, trim_clip\nsupabase/migrations/ Database schema + RLS policies\n```\n\n**Server-authoritative.** The browser never receives `outcome`, `real_deal` or `founder_prefs` until the reveal (`PublicPitch` omits them). `/media` only serves whitelisted media files. Both rules are enforced by tests.\n\n**Deterministic money, AI flavour.** All deal math and founder decisions are plain Python (`services/founder.py`, `services/scoring.py`). Claude only writes dialogue: live founder answers (Claude Haiku 4.5, streamed over SSE) and offline shark reactions (Claude Sonnet 5.5, `scripts/generate_shark_reactions.py`).\n\n### API\n\n| Method | Path | Purpose |\n|---|---|---|\n| POST | `/api/games` | Start a day (5 random pitches) |\n| GET | `/api/games/{id}` | Resume |\n| POST | `/api/games/{id}/rounds/{i}/questions` | Ask the founder (SSE: `delta`…, `done`) |\n| POST | `/api/games/{id}/rounds/{i}/offer` | `{amount, equity}` or `{pass: true}` |\n| POST | `/api/games/{id}/rounds/{i}/counter` | `{accept: bool}` |\n| POST | `/api/games/{id}/reveal` | Results (only once every round is closed); saves the run for signed-in players |\n| POST | `/api/games/{id}/claim` | Attach a guest game to the signed-in account |\n| GET | `/api/leaderboard?scope=daily\\|all` | Daily challenge / all-time leaderboard |\n| GET | `/api/me/runs` | Signed-in player's run history |\n| GET | `/api/me/portfolio` | Every finished day and the companies the player owns |\n| POST | `/api/classes` | Create a class → `{code, teacher_token}` |\n| GET | `/api/classes/{code}` | Class name (for students joining) |\n| GET | `/api/classes/{code}/dashboard` | Teacher dashboard (`X-Teacher-Token` header) |\n\n`POST /api/games` takes `{\"mode\": \"class\", \"class_code\", \"student\"}` to join a class, or `{\"mode\": \"daily\"}` for the daily challenge: everyone gets the same 5 pitches each UTC day, and only your first daily run is ranked. Requests may carry `Authorization: Bearer <supabase access token>`. The backend verifies it against the project's JWKS (ES256).\n\n**Storage.** Game sessions and classrooms live in SQL via `DATABASE_URL` (SQLite locally, Supabase Postgres in production), so games survive restarts and scale across instances. Per-IP rate limits and a daily cap on paid AI calls (`AI_DAILY_CALL_CAP`) protect costs.\n\n**Security model.** Scores are written only by the backend with the secret key; the tables have no insert policies, so players can't post fake scores. `pitches` (hidden outcomes) has RLS with no policies, so it's service-role only. Games owned by an account can only be used by that account.\n\n## Adding a pitch\n\n```bash\npython3 scripts/new_pitch.py my-company # scaffolds pitches/my-company/pitch.json\n# fill in pitch.json (facts = pitch-day knowledge only; outcome with sources)\ncd backend && uv run python ../scripts/generate_shark_reactions.py my-company # or write reactions.json by hand\nmake validate\n```\n\nRead [docs/CONTENT_AND_COPYRIGHT.md](docs/CONTENT_AND_COPYRIGHT.md) before adding clips.\n\n## Deploying\n\nSee [docs/DEPLOY.md](docs/DEPLOY.md): Supabase dashboard steps, environment variables, Fly.io/Render for the API (root `Dockerfile`), Vercel for the web app. CI (GitHub Actions) runs lint, tests, content validation, the frontend build and a Docker smoke test on every push; a weekly job checks every YouTube clip is still embeddable (`make embeds`).\n\n## Roadmap\n\nSee [docs/PLAN.md](docs/PLAN.md). Ideas: more pitches, TTS shark voices, loan deals, an admin page for adding pitches.\n\n*Educational game, not financial advice. Not affiliated with Shark Tank, ABC or Sony Pictures Television.*",
"commits": []
}