|
| 1 | +--- |
| 2 | +title: Adding a Game |
| 3 | +description: Step-by-step recipe for adding a new game to GamePulse — seed entry, taste profile, reviews, and verification. |
| 4 | +sidebar_position: 2 |
| 5 | +--- |
| 6 | + |
| 7 | +# Adding a Game |
| 8 | + |
| 9 | +This is the canonical recipe for adding a game. It takes about 5 minutes. |
| 10 | + |
| 11 | +## 1. Add the catalog row |
| 12 | + |
| 13 | +Open `lib/db/seeds/games.ts` and append: |
| 14 | + |
| 15 | +```ts |
| 16 | +// lib/db/seeds/games.ts |
| 17 | +export const games: SeedGame[] = [ |
| 18 | + // …existing games… |
| 19 | + { |
| 20 | + slug: "ark-nova", |
| 21 | + title: "Ark Nova", |
| 22 | + year: 2021, |
| 23 | + description: |
| 24 | + "Plan and design a modern, scientifically managed zoo. Build enclosures, support conservation projects, and run a successful zoo.", |
| 25 | + categories: ["Strategy", "Animals", "Card-Driven"], |
| 26 | + mechanics: ["Action Selection", "Tableau Building", "Resource Management"], |
| 27 | + min_players: 1, |
| 28 | + max_players: 4, |
| 29 | + complexity: 3.7, |
| 30 | + play_time: 150, |
| 31 | + buzz: 88, |
| 32 | + rising: 72, |
| 33 | + taste_profile: { |
| 34 | + strategy: 92, thematic: 78, party: 10, family: 25, solo: 85, conflict: 20, |
| 35 | + }, |
| 36 | + }, |
| 37 | +]; |
| 38 | +``` |
| 39 | + |
| 40 | +### Taste profile guidelines |
| 41 | + |
| 42 | +Each dimension is **0–100**: |
| 43 | + |
| 44 | +| Dimension | What "high" looks like | |
| 45 | +| --- | --- | |
| 46 | +| `strategy` | Many decisions, long-term planning, engine building | |
| 47 | +| `thematic` | Strong narrative, immersive world, evocative components | |
| 48 | +| `party` | Fast, social, group-dynamics-driven | |
| 49 | +| `family` | Approachable, kid-friendly, gateway weight | |
| 50 | +| `solo` | Robust single-player mode or designed for solo | |
| 51 | +| `conflict` | Direct player interaction, take-that, PvP | |
| 52 | + |
| 53 | +Score relative to *the catalog*, not absolutely. A 90 strategy means "among the most strategic games we list." |
| 54 | + |
| 55 | +## 2. Add at least one critic review |
| 56 | + |
| 57 | +Critic reviews live in `lib/db/seeds/critic-reviews.ts`. Reference the game and critic by **slug**: |
| 58 | + |
| 59 | +```ts |
| 60 | +// lib/db/seeds/critic-reviews.ts |
| 61 | +export const criticReviews: SeedCriticReview[] = [ |
| 62 | + // …existing reviews… |
| 63 | + { |
| 64 | + game_slug: "ark-nova", |
| 65 | + critic_slug: "tabletop-tara", |
| 66 | + score: 92, |
| 67 | + verdict: "Buy", |
| 68 | + excerpt: "The card synergies are deep without ever feeling fiddly. Ark Nova rewards patient builders.", |
| 69 | + source: "YouTube", |
| 70 | + content_type: "video-review", |
| 71 | + published_at: "2022-08-12T10:00:00Z", |
| 72 | + }, |
| 73 | +]; |
| 74 | +``` |
| 75 | + |
| 76 | +The orchestrator resolves `game_slug` and `critic_slug` to numeric IDs at insert time. |
| 77 | + |
| 78 | +## 3. (Optional) Seed prices and awards |
| 79 | + |
| 80 | +```ts |
| 81 | +// lib/db/seeds/prices.ts |
| 82 | +{ game_slug: "ark-nova", retailer: "Miniature Market", price: 64.99, shipping: "Free over $99", label: "best" } |
| 83 | + |
| 84 | +// lib/db/seeds/awards.ts |
| 85 | +{ game_slug: "ark-nova", award_name: "Spiel des Jahres", award_year: 2022, result: "Recommended" } |
| 86 | +``` |
| 87 | + |
| 88 | +## 4. (Optional) Seed community ratings |
| 89 | + |
| 90 | +For more realistic personalized predictions, add a few community ratings: |
| 91 | + |
| 92 | +```ts |
| 93 | +// lib/db/seeds/community-reviews.ts |
| 94 | +{ game_slug: "ark-nova", user_handle: "alex", rating: 9.0, review: "Best card-driven euro of the decade.", created_at: "2024-01-04T12:00:00Z" } |
| 95 | +``` |
| 96 | + |
| 97 | +## 5. Bump the seed version |
| 98 | + |
| 99 | +```ts |
| 100 | +// lib/db/seed.ts |
| 101 | +const SEED_VERSION = 5; // was 4 |
| 102 | +``` |
| 103 | + |
| 104 | +## 6. Rebuild and verify |
| 105 | + |
| 106 | +```bash |
| 107 | +npm run clean |
| 108 | +npm run dev |
| 109 | +``` |
| 110 | + |
| 111 | +Then check: |
| 112 | + |
| 113 | +- **Browse page** at `/browse` → your game appears, filterable. |
| 114 | +- **Game detail** at `/games/ark-nova` → scores render, consensus badge is correct. |
| 115 | +- **Dashboard** at `/me` → if matched critics reviewed it, a personalized prediction shows up. |
| 116 | +- **Search** in the header → the title autocompletes. |
| 117 | + |
| 118 | +## 7. Run the CI gate |
| 119 | + |
| 120 | +```bash |
| 121 | +npm run check |
| 122 | +``` |
| 123 | + |
| 124 | +This runs `type-check → lint → build`. If types or seeds are inconsistent the build will catch it. |
| 125 | + |
| 126 | +## Common mistakes |
| 127 | + |
| 128 | +| Mistake | Symptom | Fix | |
| 129 | +| --- | --- | --- | |
| 130 | +| Forgot to bump `SEED_VERSION` | New game doesn't appear locally | Bump it and `npm run clean && npm run dev` | |
| 131 | +| Taste profile dimensions don't sum to anything | None — they're independent axes | Treat each axis independently, don't normalize | |
| 132 | +| Used `critic_id: 12` instead of `critic_slug` | Build error from the seed type | Always reference by slug | |
| 133 | +| Score is 9.2 (a 1–10 rating in a critic review) | Validation throws | Critic scores are 0–100; community ratings are 1–10 | |
| 134 | + |
| 135 | +Next: [Customizing Scoring](./customizing-scoring.md) if you want to tune the algorithms. |
0 commit comments