facebook/react
There is no single entrypoint; the repo is a set of publishable packages under `packages/` (workspace glob in `package.json`) plus a nested Yarn/Cargo workspace under `compiler/`. The public runtime entrypoints are `packages/react/index.js` (isomorphic), `packages/react-dom/client.js` → `ReactDOMRoot.createRoot`, `packages/react-dom/server.node.js` → Fizz, and `packages/react-server-dom-*/server.*` → Flight. Everything is compiled by `scripts/rollup/build.js`, driven by a bundle table in `scripts/rollup/bundles.js` and a module-substitution table in `scripts/rollup/forks.js`; `build-all-release-channels.js` runs the whole thing once per channel and rewrites versions from `ReactVersions.js`. There is no database or persistent storage layer — the only 'storage' is the Fiber tree in memory, npm as the deployment target, and GitHub Actions artifacts. Tests never run `jest` directly; `scripts/jest/jest-cli.js` picks one of six configs and spawns Jest with channel/env/variant globals injected.
- `package.json` declares a Yarn-1 workspace over `packages/*` with `packageManager: yarn@1.22.22`, and blocks direct Jest invocation via `"jest": {"testRegex": "/scripts/jest/dont-run-jest-directly\\.js$"}` — all testing must go through `yarn test` → `scripts/jest/jest-cli.js`.
- `ReactVersions.js` is the single source of truth for publishing: `ReactVersion = '19.3.0'`, a `stablePackages` map (react-reconciler 0.34.0, scheduler 0.28.0, react-refresh 0.19.0, eslint-plugin-react-hooks 7.1.1) and `experimentalPackages = ['react-markup']`; a package not listed there is never published.
- The client entrypoint is `createRoot(container, options)` in `packages/react-dom/src/client/ReactDOMRoot.js`, which calls `createContainer(..., ConcurrentRoot, ...)`, `markContainerAsRoot`, then `listenToAllSupportedEvents(rootContainerElement)` before returning a `ReactDOMRoot` wrapper whose `.render` delegates to `updateContainer`.
- The reconciler's public surface is `packages/react-reconciler/src/ReactFiberReconciler.js` — `createContainer`, `updateContainer`, `updateContainerSync`, and `updateContainerImpl` which builds an update via `createUpdate(lane)` / `enqueueUpdate` and hands off to `scheduleUpdateOnFiber(root, rootFiber, lane)`.
- The renderer boundary is the `ReactFiberConfig` shim: `packages/react-reconciler/src/ReactFiberConfig.js` contains only `throw new Error('This module must be shimmed by a specific renderer.')` — Rollup (`scripts/rollup/forks.js`) and Jest (`scripts/jest/setupHostConfigs.js`) both substitute a real host config per renderer.
- `scripts/shared/inlinedHostConfigs.js` enumerates ~20 renderer targets by `shortName` (`dom-browser`, `dom-node`, `dom-edge-webpack`, `dom-node-turbopack`, `dom-node-parcel`, `dom-bun`, `fabric`, `markup`, `dom-fb`, …), each with an `entryPoints` list — this table is the authoritative list of runtime boundaries.
- Cooperative scheduling lives in `packages/scheduler/src/forks/Scheduler.js`: `unstable_scheduleCallback` pushes into a min-heap, `workLoop` drains it, and `shouldYieldToHost` yields once `timeElapsed >= frameInterval` (default `frameYieldMs`, tunable via an fps setter); the host callback is scheduled via `setImmediate` when available, else `MessageChannel` (chosen to dodge the 4 ms `setTimeout` clamp), else `setTimeout`.
- Builds are orchestrated by `scripts/rollup/build.js` (`buildEverything` → `createBundle` per bundle × bundleType, with Babel, Google Closure Compiler for prod bundles, and `rollup-plugin-prettier` for FB/dev output) over the ~20 `bundleTypes` declared in `scripts/rollup/bundles.js` (NODE_DEV/PROD/PROFILING, ESM_*, BUN_*, FB_WWW_*, RN_OSS_*, RN_FB_*, BROWSER_SCRIPT, CJS_DTS/ESM_DTS).
- `scripts/rollup/build-all-release-channels.js` shells out to the build once per channel via `spawnSync`, then `processStable(buildDir)` / `processExperimental(buildDir)` rewrite package versions using the short SHA from `git rev-parse HEAD`, merging the experimental tree into the stable one.
- The compiler is a second workspace: `compiler/Cargo.toml` defines a Rust workspace over `crates/*` plus `packages/babel-plugin-react-compiler-rust/native`, pinned to edition 2024 / rust-version 1.85, version `0.0.1-oidc.0`, with a `[profile.release]` of fat LTO + 1 codegen unit + strip (documented as shrinking the shipped `index.node` from 11.2 MB to 7.2 MB).
- The Rust compiler is reached from JS through napi: `native/src/lib.rs` exposes `#[napi] pub fn compile(ast_json, scope_json, options_json) -> String`, spawning a dedicated 64 MB-stack thread and catching panics; `src/bridge.ts` loads it with `require('../native')` and passes JSON.
- External integrations are narrow and mostly tooling-side: npm registry (`scripts/release/publish.js`, `scripts/release/ci-npmrc`), Discord webhooks in four notify workflows, Vercel for the compiler playground (`compiler/apps/playground/vercel.json`), and Algolia's `beta-react` index queried by the React MCP server.
- Deployment shape is 'publish to npm from CI': `compiler_prereleases.yml`, `compiler_prereleases_nightly.yml` and `compiler_prereleases_manual.yml` inject `NPM_TOKEN` into the job env, while `scripts/release/publish.js` notes that npm `whoami`/ownership checks were removed in favour of OIDC trusted publishing.
- Repo-level agent conventions are codified in `CLAUDE.md` plus `.claude/skills/*/SKILL.md` — `/verify` runs `yarn prettier` → `yarn linc` → `/flow` + `/test` + `/test www` in parallel, and explicitly instructs that builds are CI's job and should not be run locally.