{"id":30622461,"url":"https://github.com/robleto/gameawardsapi","last_synced_at":"2025-08-30T15:40:54.886Z","repository":{"id":311788636,"uuid":"1041682769","full_name":"robleto/GameAwardsAPI","owner":"robleto","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-26T15:27:07.000Z","size":658,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-26T21:25:42.122Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robleto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-20T21:21:59.000Z","updated_at":"2025-08-26T15:27:10.000Z","dependencies_parsed_at":"2025-08-26T21:29:32.934Z","dependency_job_id":"1cb7bc8a-8fa1-4965-8082-660ce2d46f5a","html_url":"https://github.com/robleto/GameAwardsAPI","commit_stats":null,"previous_names":["robleto/gameawardsapi"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/robleto/GameAwardsAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robleto%2FGameAwardsAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robleto%2FGameAwardsAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robleto%2FGameAwardsAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robleto%2FGameAwardsAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robleto","download_url":"https://codeload.github.com/robleto/GameAwardsAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robleto%2FGameAwardsAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272871257,"owners_count":25007134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-30T15:40:51.243Z","updated_at":"2025-08-30T15:40:54.871Z","avatar_url":"https://github.com/robleto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game Awards API\n\nA RESTful API for board game awards data (an OMDB-style service for tabletop). Public sample ships with a limited subset; a larger private dataset (non-redistributable) can be mounted under `internal/`.\n\ngit add .\ngit commit -m \"Deploy Game Awards API\"\ngit push origin main\n## 🚀 Deployment \u0026 Operations\n\nProduction reference stack: Netlify (Functions + static) + Neon (Postgres) + Stripe (subscriptions). A single authoritative guide now lives in `DEPLOYMENT.md` (includes environment variables, build metadata, webhook setup, and migration notes).\n\nFast path:\n```bash\n# Commit \u0026 push\ngit add . \u0026\u0026 git commit -m \"Deploy\" \u0026\u0026 git push origin main\n\n# Netlify (UI)\n#  - Build command: npm run build\n#  - Functions dir: netlify/functions\n#  - Publish dir: public\n#  - Add env vars (see DEPLOYMENT.md section 2)\n\n# Neon\n#  - Create project, run neon/schema.sql, copy DATABASE_URL (?sslmode=require)\n\n# Stripe (test mode)\nnode setup-stripe-products.js   # creates products, prices, webhook, prints env vars\n```\n\nMigration from Supabase? See the \"Migration \u0026 Legacy Notes\" section inside `DEPLOYMENT.md` (Supabase env removal + Neon connection format) – prior separate docs were consolidated.\n\n### Local Development\n\n```bash\nnpm install\nnpm run dev  # nodemon auto-restart (Express)\n\n# Or test Netlify functions + static site locally\nnetlify dev\n```\n\nThe dataset includes major awards like Spiel des Jahres, Origins Awards, Diana Jones Award, and many more.\n\n## ⚡ Quick Start (Local)\n\n```bash\nnpm install\nnpm run dev          # Express + auto-reload\n# or test serverless functions directly\nnode local-functions-server.js \u0026\nnode scripts/run-function.js api \"s=wingspan\u0026apikey=demo\"\n```\n\nStripe test bootstrap (optional now, required before subscriptions):\n```bash\ncp .env.example .env   # fill DATABASE_URL + Stripe keys\nnode setup-stripe-products.js\n# add printed price + webhook secrets to Netlify env and redeploy\n```\n\nHealth \u0026 build metadata:\n```bash\ncurl http://localhost:4000/.netlify/functions/health\n```\n\n## 📋 API Endpoints\n\n### Base URL\n```\nhttp://localhost:3000/api/\n```\n\n### Parameters\n\n| Parameter | Required | Description | Example |\n|-----------|----------|-------------|---------|\n| `i` | Optional* | Award ID | `10865` |\n| `t` | Optional* | Award title search | `Spiel des Jahres Winner` |\n| `s` | Optional* | Search across all fields | `Catan` |\n| `bgg_id` | Optional* | BoardGameGeek game ID | `13` |\n| `year` | No | Filter by year | `2023` |\n| `category` | No | Filter by category | `Game of the Year` |\n| `award_set` | No | Filter by award set | `Spiel des Jahres` |\n| `type` | No | Filter by type | `winner` or `nominee` |\n| `r` | No | Response format | `json` (xml coming soon) |\n\n*At least one of `i`, `t`, `s`, or `bgg_id` is required.\n\n### Example Requests\n\n#### Get award by ID\n```\nGET /api/?i=10865\n```\n\n#### Search for awards\n```\nGET /api/?s=Spiel des Jahres\u0026year=2023\n```\n\n#### Get all awards for a specific game\n```\nGET /api/?bgg_id=361\n```\n\n#### Get awards by year\n```\nGET /api/years/2023\n```\n\n#### List all award sets\n```\nGET /api/awards\n```\n\n#### List all categories\n```\nGET /api/categories\n```\n\n## 📊 Data Structure\n\nEach award object contains:\n\n```json\n{\n  \"Response\": \"True\",\n  \"id\": \"10865\",\n  \"slug\": \"1974-charles-s-roberts-best-amateur-game-winner\",\n  \"url\": \"/boardgamehonor/10865/1974-charles-s-roberts-best-amateur-game-winner\",\n  \"year\": 1974,\n  \"title\": \"Charles S Roberts Best Amateur Game Winner\",\n  \"primaryName\": \"\",\n  \"alternateNames\": [],\n  \"boardgames\": [\n    {\n      \"bggId\": 18158,\n      \"name\": \"Manassas\"\n    }\n  ],\n  \"awardSet\": \"1974 Charles S. Roberts\",\n  \"position\": \"Charles S. Roberts Best Amateur Game\",\n  \"isWinner\": true,\n  \"isNominee\": false\n}\n```\n\n## 🎮 Use Cases\n\n### For Publishers\n- Track award performance across your game catalog\n- Competitive analysis of award-winning games\n- Marketing material for award achievements\n\n### For Developers\n- Integrate award data into gaming apps\n- Build recommendation engines based on award-winning games\n- Create award tracking features\n\n### For Researchers\n- Academic studies on game design trends\n- Historical analysis of gaming industry recognition\n- Award system comparisons across regions\n\n### For Media\n- Easy access for articles and reviews\n- Award season coverage automation\n- Historical context for feature pieces\n\n## 🏗️ Architecture\n\n- **Netlify Functions + Express fallback** – Serverless first, local dev convenience\n- **Neon PostgreSQL** – Users, API keys, usage, (soon) award search\n- **In-memory dataset (current search)** – Pending SQL-backed search flag (`USE_DB=1`)\n- **Rate limiting \u0026 usage tracking** – PL/pgSQL (`validate_api_key_enhanced`) sets remaining quota headers\n- **Build metadata** – `build-info.json` surfaced via `/health`\n\n## 🔐 Security \u0026 Rate Limiting\n\n- Tiered daily/monthly quotas (Free / Professional / Enterprise)\n- API key validation + suspension logic (Stripe payment_failed events)\n- CORS (`*` default – tighten if embedding in browsers)\n- Helmet security headers via Express fallback\n- Planned: peppered key hashing (`API_KEY_SECRET`), narrower CORS\n\n## 📈 Key Environment Variables (excerpt)\n\nSee full matrix in `DEPLOYMENT.md`.\n```env\nDATABASE_URL=postgresql://...?...sslmode=require\nSTRIPE_SECRET_KEY=sk_test_...\nSTRIPE_PUBLISHABLE_KEY=pk_test_...\nSTRIPE_WEBHOOK_SECRET=whsec_...\nREQUIRE_API_KEY=true\nDEPLOY_ENV=production\n```\nOptional overrides: `RATE_LIMIT_WINDOW_MS`, `RATE_LIMIT_MAX_REQUESTS` (Express path), `USE_DB=1` (future search switch).\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Adding / Updating Awards Data\n\nCurrent search layer reads from `lib/awards-data.js`, which attempts to load a private full dataset at `internal/enhanced-honors-complete.json` (gitignored). The repo includes a minimal `data/sample-awards.json` for development \u0026 demonstrations.\n\nTo use a full dataset privately:\n1. Place the JSON file at `internal/enhanced-honors-complete.json`\n2. Restart local dev (`npm run dev` or `netlify dev`)\n3. The loader will detect and use it automatically (log line: \"Loaded full private dataset\").\n\nPlease do NOT submit PRs containing proprietary or third‑party dataset dumps. Schema/structure improvements are welcome.\n\n## 📝 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Board game award data sourced from BoardGameGeek community\n- Inspired by the excellent OMDB API structure\n- Built for the board gaming community\n\n## 📞 Support\n\n- 📧 Email: support@gameawardsapi.com\n- 🐛 Issues: [GitHub Issues](https://github.com/your-repo/issues)\n- 💬 Discord: [Board Game Developers](https://discord.gg/boardgamedev)\n\n---\n\n**🎲 Game Awards API** – Bringing board game award data to developers worldwide.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobleto%2Fgameawardsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobleto%2Fgameawardsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobleto%2Fgameawardsapi/lists"}