تخطَّ إلى المحتوى

Contributing

هذا المحتوى غير متوفر بلغتك بعد.

Welcome! This project is young and experimental, and beginners are very welcome. You do not need a paid AI tool, a paid account, or even Hollow Knight to help.

  1. Install Node.js 24 (https://nodejs.org) and Git (https://git-scm.com).
  2. Install pnpm: npm install -g pnpm@10
  3. Fork this repo on GitHub, then:
Terminal window
git clone https://github.com/<your-name>/LearnThroughGames.git
cd LearnThroughGames
pnpm install
pnpm test

If pnpm test ends with “passed”, you are ready.

Slow internet? Set ELECTRON_SKIP_BINARY_DOWNLOAD=1 before pnpm install to skip the ~110 MB overlay runtime. You only need it to run the overlay window.

A good free editor: VS Code (https://code.visualstudio.com) with the Biome extension.

Every issue has a difficulty (easy → start here, medium, hard), a priority (P1 is needed now, P3 is later) and a milestone (the roadmap phase). See docs/ROADMAP.md.

  • Never contributed before? Pick good first issue + difficulty: easy. Ones marked no code needed are content or docs.
  • Issues marked needs Hollow Knight need the game; maintainer ones need private material, so skip those.
  • epic issues are big ideas for V2/V3: join the discussion, but don’t start coding them yet.

Look at issues labeled good first issue. Comment “I’ll take this” so two people don’t do the same thing. Ask questions in the issue: there are no stupid questions.

Terminal window
git checkout -b my-change # a new branch for your work
# … edit files …
pnpm format # fixes formatting for you
pnpm lint && pnpm typecheck && pnpm test
git add .
git commit -m "Short description of what you changed"
git push -u origin my-change

Then open a Pull Request on GitHub. Small pull requests are best: one task per PR.

End-to-end tests launch the real desktop app and click through it (Playwright, with a separate config folder, so your own settings are safe):

Terminal window
pnpm --filter @game-learning/desktop build
pnpm --filter @game-learning/desktop e2e

They also run in CI on Windows.

The mod’s Arabic text shaping has C# tests that need no game: dotnet test integrations/hollow-knight/tests (.NET 10 SDK).

You can test everything with the simulator, a fake game:

Terminal window
pnpm hub --pack content/examples/solar-system # terminal 1: the hub with the sample pack
pnpm sim --client # terminal 2: shows questions, answer with number keys
pnpm sim # terminal 3: press d to "die"

See the table in README.md and the design in docs/ARCHITECTURE.md. The short version:

  • Protocol (packages/protocol): the messages games and screens send. Changing it affects everyone, so discuss first.
  • Core (packages/core): the rules. Pure TypeScript, easy to unit test.
  • Hub (packages/hub): the local server.
  • Overlay (apps/desktop): what the player sees (React).
  • Hollow Knight mod (integrations/hollow-knight): C#.
  • Be kind. We are all learning.
  • Never commit API keys, .env files, or copyrighted books. Private study material belongs in content/private/, which git ignores.
  • Code is Apache-2.0. By contributing you agree your contribution uses the same license.
  • Follow the Code of Conduct. Report security problems privately (see SECURITY.md).

All player-facing text is in packages/locales/src/ (one JSON file per language). To fix a word, edit ar.json or en.json. To add a language, copy en.json (for example to fr.json), translate the values (keep the keys and the {placeholders}), and add it to LOCALES in packages/locales/src/index.ts. pnpm test checks that every language has the same keys and placeholders. No coding needed beyond that one line. (The Hollow Knight mod’s few words are still in QuestionCard.cs.)

Before you open a pull request:

  • Reuse first (ADR 0009): is there a trusted open-source library, standard or free asset for this? A new dependency needs a reason in the PR: license (MIT, ISC, BSD, Apache-2.0; OFL or CC0 for assets), maintained, widely used, and worth its weight. New assets go in THIRD-PARTY.md.
  • Tests: new logic has unit tests; pnpm lint && pnpm typecheck && pnpm test pass.
  • Configurable (ADR 0008): no fixed numbers players might want to change; new settings have safe defaults.
  • Both languages: player-facing text exists in Arabic and English, and Arabic reads right to left.
  • Accessible: works with the keyboard (and a controller in games), follows the text size and high-contrast settings.
  • Private by default: nothing about the player leaves the PC unless they choose it (PRIVACY.md).
  • Docs: README, PROTOCOL or the guides updated when behavior changes; TESTING-STATUS.md lists what still needs a real test; a line in CHANGELOG.md.