These rules are official. Every contributor, and every AI a contributor uses, follows them. A PR that breaks them is sent back, however well it works.
Every new page, component or feature must look like it already belongs on start.ng. Do not step away from how the app looks. Before you build anything, open the live site and the existing pages and look at how they are laid out, then match them.
- Use the existing look. Reuse the colours, fonts, spacing, cards, buttons, pop-ups and tables already in the app. Copy the pattern of the nearest existing page instead of inventing a new one.
- Use the CSS variables in
src/styles.css(--bg,--card,--ink,--muted,--line,--lime,--danger,--okand the rest). Do not hard-code hex colours in components or add a second palette. - Reuse existing components (for example
GameCard,BoardTable) before writing your own. If one almost fits, extend it rather than copying it. - Add new styles to
src/styles.cssin the same style as what is there. Do not add a new CSS framework, UI library or font. - Dark mode must work. Every colour has to come from a variable that has a dark value. Check both themes.
- Phones must work. Check your page at phone width (about 375px) with no sideways scrolling, except for tables that are meant to scroll.
- Not sure? Ask in the team chat and show a screenshot before you open the PR.
A feature that works but looks like a different app will be sent back.
- No hard-coded colours. No
#hex,rgb()or named colours in.tsxor in new CSS rules. Use a variable. If you truly need a new colour, add it as a variable in both:rootand:root[data-theme="dark"]insrc/styles.css, and say so in the PR. - No new libraries for looks. No Tailwind, shadcn, MUI, Chakra, Bootstrap, styled-components, emotion, icon packs or web fonts. The app is plain CSS in
src/styles.css. - No second font. The body font is the Helvetica stack; the monospace variable
--monois for eyebrows, counts and code. - No inline
style={{ }}for colour, spacing or typography. Use a class. (A few inline styles exist for values computed at run time, like a width from data. That is the only reason to add one.) - No new page layout. Pages sit in
.container(max width 960px, 24px side padding). - No new breakpoints. The app uses
max-width: 760pxandmax-width: 600px(and a few older ones). Use those.
| Thing | How it is done | Where to look |
|---|---|---|
| Page width | .container |
src/styles.css |
| Hero heading | .eyebrow (mono, uppercase), big h1, <mark> for the lime highlight, .lead for the intro |
Home in src/App.tsx |
| Section heading | .section-head with an h2 and a mono .count |
the games list in src/App.tsx |
| Buttons | button / .btn (solid), .ghost (outlined), .link (text). Radius 10px, bold |
src/styles.css |
| Cards | --card background, 1px --line border, radius 18px, hover lifts with a lime offset shadow |
.game, .card |
| Game card | GameCard.tsx; features add to it through registerCardPart, never by editing it |
src/GameCard.tsx |
| Empty state | .empty (dashed border, muted text, a link out) |
src/styles.css |
| Loading | Skeleton.tsx / .skeleton shimmer, aria-busy on the container |
src/Skeleton.tsx |
| Not found | NotFound.tsx |
src/NotFound.tsx |
| Tables | BoardTable.tsx |
src/BoardTable.tsx |
| Paging and search | Pagination.tsx, SearchBox.tsx |
src/ |
| Dark / light | data-theme on <html>; every colour is a variable |
top of src/styles.css |
| A new feature | src/features/<feature>/, one owner, one flag (see README.md) |
src/features/_template |
- Real headings in order: one
h1per page, thenh2,h3. Do not skip levels for looks. - Links and buttons have text or an
aria-label. Pictures havealt. - The current page link in the nav has
aria-current="page". - Short, plain English. No jargon on the page. Say what a thing does.
The same rules are in startng-be's CONTRIBUTING.md. Some pages are written twice. The API writes them as plain HTML for Google, AI tools and link previews (startng-be app/routers/pages.py, put in place by nginx.conf), and then React draws the real page. Google compares the two. If what it is served differs from what people see, it treats that as cloaking and ranks the whole site lower, or drops it. So the two versions must match.
Today these pages are written by the API:
| Address | API route | React |
|---|---|---|
/ |
GET /pages/home |
home view in src/App.tsx, text in src/home-copy.ts |
/games, /games?page=2 |
GET /pages/games |
games view in src/App.tsx |
/games/<name> |
GET /pages/games/{name} |
src/GamePage.tsx |
/creators/<id>-<name> |
GET /pages/creators/{id} |
src/IndiePage.tsx |
- Nothing for Google only. Every word, heading, link and number the API writes must be on the React page when it loads, with no sign-in and no clicks beyond opening a dropdown. No hidden text, no extra keywords, no text in a colour or size people can't read.
- Nothing missing either. The main content people see (headings, the games listed, the About and questions) must be in the server version too.
- Same words. Copy lives once in each repo and is kept identical:
src/home-copy.tsandHOME_ABOUT/HOME_QUESTIONSinpages.py, and so on. Change one, change the other in the same pair of PRs. - Same data, same order, same counts. The server uses the same query as the API endpoint React reads (hidden games left out, same sort) and the same numbers: games per page and games on the homepage. These constants carry a comment naming their twin (for example
PER_PAGEinpages.pyand insrc/App.tsx). Change both. - Same links. The same addresses in the same places, as real
<a href>links Google can follow, never a click handler only. - Same structure. One
h1with the same text, the same heading levels and the same class names, so the server version also looks right while the app loads. - Everyone gets the same page. Never change what is served based on the user agent, bot detection or country.
- A page that doesn't exist is a 404 for both (an unknown game, a page of games past the last one): nginx serves the 404 page with a 404 status, and React shows
NotFound. Never a copy of another page.
- The title, description, canonical link, robots tag and preview image are the same in the served HTML (
src/seo.tsat build time, orpages.py) and in what React sets withsetSeo()as people move around. - Each address is its own canonical, including pages of a list (
/games?page=2). Searches, filters, sign-in flows, invites and private pages arenoindex, both in what is served (meta tag orX-Robots-Tagheader) and in React. - Structured data (JSON-LD) only describes what is on the page. No ratings, prices or authors that people can't see.
- The sitemap lists only canonical, indexable addresses. Never a
noindexpage.
- The page falls back to the plain app, with no error text and never a different page. nginx already does this (
@ssr_emptyand the shell fallbacks innginx.conf); keep it that way.
It needs all of these, in one pair of PRs: the route in pages.py with tests that check its text, a location in nginx.conf, a path in src/main.tsx, a title and description in src/seo.ts, an entry in the sitemap, and a row in the table above. Everything the API writes goes through _esc(). Never change a published address without a redirect.
Run the API locally, build the frontend and serve it with nginx (the Dockerfile, with SSR_UPSTREAM set to your local API). Then compare the two versions of each page you touched:
curl -s http://localhost:8080/gamesThat is what Google is served. Open the same address in a browser and check that every heading, game, count and link in the curl output is on the page, in the same order, and that the title, canonical and robots tags in the page's <head> match. Say in the PR that you did this.
A PR that lets the two versions drift apart is sent back, even if both look fine on their own.
- Branch from
devand keep the PR to one feature. - Run
npx tsc --noEmitandnpm run build. CI runs both. - Look at your change in light mode, dark mode and at phone width. Put a screenshot in the PR.
- Fill in the checklist in the PR template.
- Quick self-check for stray colours in your change:
It should print nothing.
git diff origin/dev -U0 -- 'src/*.tsx' 'src/**/*.tsx' | grep -E '^\+.*#[0-9a-fA-F]{3,8}\b'
- CI (
ci.yml): typecheck, build, worker tests, dependency audit. - CodeQL: security scan.
- Malware Scan (CI Gate): blocks known malicious code patterns.
- CodeRabbit: automatic review. It also flags changes that break the styling rules above.
CI cannot judge how a page looks, so the reviewer and the PR checklist hold that line.
Give it this file and AGENTS.md first. Ask it to read src/styles.css and the nearest existing page before it writes any UI. Check what it gives you against the rules above before you open the PR. The PR is yours, not the AI's.