This guide focuses on a maintainable approach: use official upstream sources, make one meaningful change at a time, and keep a clear recovery path if a Discord or Moonlight update changes behavior.
Prepare the toolchain
The current developer documentation calls for a recent Node.js 22 environment, pnpm 10, Git, and a code editor. Match the project requirements before debugging build errors.
Learn the extension model
Understand manifests, Moonlight APIs, mappings, and module patching before building a complex UI feature. Small extensions are a better first project than broad client rewrites.
Build against current code
Clone the official repository, install dependencies, and use the documented build or development commands. Keeping your fork current reduces confusing failures caused by old mappings.
Contribute maintainably
Keep changes focused, follow formatting and linting requirements, and avoid breaking public extension APIs. Clear reproduction notes and small pull requests are easier to review.
Useful upstream links
Moonlight GitHub project ↗ · Installer repository ↗ · Official documentation ↗