Contributing
This site is open source, and contributions are welcome: a typo fix is as useful as a new page. This page explains what kinds of help are most needed, how to run the site on your machine, how the content is organised and what a pull request needs before it is merged.
Ways to help
Section titled “Ways to help”- Fix errors. Factual mistakes, outdated claims, broken links, wrong numbers in an estimate, typos. If you are not sure how to fix something, open an issue describing the problem and where you saw it.
- Improve a page. A clearer explanation, a better diagram, a missing trade-off, a sharper “In the interview” box, a better source.
- Add a page. A topic, case study or object-oriented design exercise that is missing. Open an issue first to agree on the scope and the slug, so that work is not duplicated.
- Improve translations. Make the Russian text read more naturally, align terminology with the glossary, or bring a Russian page up to date with its English twin.
Run the site locally
Section titled “Run the site locally”You need Node.js 22.12 or newer and Git.
-
Fork the repository on GitHub, then clone your fork:
Terminal window git clone https://github.com/<your-username>/system-design.gitcd system-design -
Install dependencies:
Terminal window npm install -
Start the development server. It prints a local address (by default
http://localhost:4321/system-design/) and reloads pages as you edit:Terminal window npm run dev -
Create a branch for your change:
Terminal window git checkout -b fix/cap-theorem-typo -
When you are done, build the whole site once to make sure nothing is broken. The output goes to
dist/;npm run previewserves it locally:Terminal window npm run build
How the content is organised
Section titled “How the content is organised”src/content/docs/├── index.mdx English home page├── start/introduction.mdx English pages: <section>/<slug>.mdx├── fundamentals/cap-theorem.mdx├── ...└── ru/ ├── index.mdx Russian home page ├── start/introduction.mdx Russian twin: same section, same file name └── ...scripts/pages.json the site map: every section and slugscripts/check-mdx.mjs self-check for content filesscripts/check-diagrams.mjs renders every diagram and checks its widthsrc/data/skill-map.ts the skill map: each topic and its prerequisitesastro.config.mjs site config and sidebar groupsCONTENT_GUIDE.md how pages are written- English pages live in
src/content/docs/<section>/<slug>.mdx. - Russian pages live in
src/content/docs/ru/<section>/<slug>.mdx, with exactly the same section and file name. - The sidebar is generated from the folders. A page’s position inside its section comes from
sidebar.orderin its frontmatter. - New pages need their slug added to
scripts/pages.json; internal links are only allowed to pages listed there. A new topic page also needs a node insrc/data/skill-map.tswith its prerequisites, or the build fails. - Internal links are written root-relative, without the locale or base path, and end with a slash:
/fundamentals/cap-theorem/. The build adds/system-designand/ruautomatically. - Diagrams are Mermaid code blocks; images are not used. Keep them at most 800px wide (stack long chains top to bottom), or labels become too small to read.
- Interactive widgets in
src/components/are added by the maintainer; if a page would benefit from one, suggest it in an issue.
The content guide is the reference for everything else: page templates, frontmatter, writing style, the English–Russian glossary, MDX pitfalls and link quality rules. Please read it before writing or rewriting a page.
Writing and translation rules in short
Section titled “Writing and translation rules in short”- Your own words. Do not paste text from the original primer or from other sites. Use sources for facts, then explain in your own words and link to them under “Further reading”.
- Current and accurate. Prefer official documentation, papers and engineering blogs of the teams that built the thing. Check every external link before adding it.
- Both languages in the same pull request. The Russian page is not a word-for-word translation: keep the same structure, headings, diagrams and code, written in natural technical Russian using the glossary in the content guide.
- Can only write one language? Open the pull request anyway and say so in the description. Someone can add the other half before it is merged.
Check your changes
Section titled “Check your changes”The self-check script validates content files without a full build. It reports MDX syntax errors, missing frontmatter, internal links to pages that do not exist, and missing translation twins:
node scripts/check-mdx.mjs src/content/docs/fundamentals/cap-theorem.mdx src/content/docs/ru/fundamentals/cap-theorem.mdxEvery file should get a ✓. If you changed a diagram, render it too (the first run needs npx playwright install chromium):
node scripts/check-diagrams.mjs src/content/docs/fundamentals/cap-theorem.mdx src/content/docs/ru/fundamentals/cap-theorem.mdxFix every ✗ before you open a pull request, then run npm run build and npm run check:links as the final check.
Pull request checklist
Section titled “Pull request checklist”- The change is made in both the English and the Russian page (or the description says which half is missing).
- Frontmatter is complete:
title,description(120–160 characters),sidebar.order. - Internal links are root-relative, end with
/and point to pages inscripts/pages.json. - Every new external link was opened and works.
- Numbers in estimates were recomputed, and code examples were run.
node scripts/check-mdx.mjspasses for every changed file, andnode scripts/check-diagrams.mjsfor every changed diagram.npm run buildcompletes without errors andnpm run check:linksfinds no broken links.- The description says what changed and why, with sources for factual corrections.
If you are new to pull requests, GitHub’s guide to creating a pull request from a fork walks through it.
License of contributions
Section titled “License of contributions”By contributing, you agree that your contribution is published under the same license as the rest of the site, CC BY 4.0. See Credits and license.
Further reading
Section titled “Further reading”- Content guide: templates, style, glossary and MDX rules for this site.
- Starlight: using components: how to import and use components in MDX; the sidebar there links to a page for each built-in one (asides, steps, tabs, cards).
- Mermaid flowchart syntax: reference for diagrams.
- The original primer’s contributing guide: how the upstream project handles contributions and translations.
Related topics
Section titled “Related topics”- Credits and license: attribution and the license your contribution falls under.
- Introduction: how the site and its pages are structured.
Based on The System Design Primer by Donne Martin (CC BY 4.0). Restructured, rewritten and updated; site content is licensed under CC BY 4.0.