name: meteor description: Use when working with Meteor.js, the full-stack JavaScript platform. Covers building Meteor apps, writing or modifying core packages, navigating the build system (Isobuild), using the CLI, working with DDP/MongoDB/accounts, running tests (TinyTest, self-test, E2E), understanding the rspack bundler integration, or using tools-core utilities. Trigger when user mentions Meteor, meteor create, meteor run, meteor packages, Isobuild, DDP, Minimongo, or any Meteor-specific API. Also use when looking up which Meteor package handles a specific feature (auth, build, reactivity, etc.).
Meteor
Full-stack JavaScript platform for web and mobile apps. Reactive data (DDP + Minimongo), isomorphic code, integrated build system (Isobuild), 100+ core packages.
Essential Commands
meteor create my-app # New app (add --react, --vue, --svelte, etc.)
meteor run # Dev server with HMR
meteor build ../output # Production bundle
meteor add <package> # Add core package
meteor remove <package> # Remove core package
meteor test-packages ./packages/<name> # Test a core package
meteor self-test "test name" # CLI self-tests
Repository Structure
packages/ # 100+ core packages (auth, data, build, web, reactivity)
tools/ # CLI & build system (Isobuild)
cli/ # Command handlers (commands.js)
isobuild/ # Bundler, compiler, linker
runners/ # App/Mongo/HMR runners
npm-packages/ # Published @meteorjs/* npm packages
scripts/ # Build & release automation
Common Workflows
Adding or Modifying a Core Package
- Read conventions reference for
package.jsstructure - Create/edit in
packages/<name>/ - Use
api.mainModule()for server/client entry points,api.export()for globals - Add tests in
*-tests.js, register inPackage.onTest() - Run:
meteor test-packages ./packages/<name>
Working with the Build System
- Read codebase reference for the full pipeline
- Entry:
tools/cli/commands.js→ dispatches to isobuild - Pipeline: Project Context → Bundler → Compiler → Linker → Output
- Build plugins register via
Package.registerBuildPlugin()+Plugin.registerCompiler() - Debug:
METEOR_DEBUG_BUILD=1 meteor runorMETEOR_PROFILE=1 meteor build
Finding Which Package Does What
Load packages reference — organized by domain:
- Auth: accounts-base, accounts-password, accounts-oauth, accounts-2fa
- Data: mongo, minimongo, ddp-server, ddp-client, ejson
- Build: babel-compiler, ecmascript, typescript, rspack, modules
- Web: webapp (Express 5.x), autoupdate, reload, browser-policy
- Reactivity: tracker, reactive-var, reactive-dict
Running Tests
Load testing reference for full details. Quick decision tree:
- Testing a core package? →
meteor test-packages ./packages/<name> - Testing CLI/tool behavior? →
meteor self-test "test name" - E2E with modern bundler? →
npm run test:modern(Jest + Playwright) - Need headless package tests? →
PUPPETEER_DOWNLOAD_PATH=~/.npm/chromium ./packages/test-in-console/run.sh
Using Modern Tooling (tools-core / rspack)
Load modern-tools reference for full API. Key modules:
- Logging:
logProgress,logError,logSuccess,logInfofrommeteor/tools-core - NPM:
checkNpmDependencyExists,installNpmDependency,isYarnProject - Process:
spawnProcess,stopProcess,waitForPort - Config:
getMeteorAppDir,getMeteorAppConfig,getMeteorAppEntrypoints - Git:
isGitRepository,ensureGitignoreExists,addGitignoreEntries
Build Targets
| Target | Description |
|---|---|
web.browser |
Modern browsers |
web.browser.legacy |
Legacy browsers (IE11) |
web.cordova |
Cordova mobile apps |
server |
Node.js server |
Key Architectural Decisions
- Packages use
api.versionsFrom(['3.0'])for Meteor 3.x compatibility webappwraps Express 5.x — access viaWebApp.expressApptools-coreis the foundation for modern integrations (rspack, etc.)- Rspack (
@rspack/core) replaces legacy bundling for modern apps - DDP over WebSockets provides real-time client-server data sync
Reference Files
Load these as needed — not all at once:
| Reference | When to load |
|---|---|
| packages.md | Looking up packages by feature domain |
| codebase.md | Navigating build system, CLI, isobuild internals |
| conventions.md | Writing package.js, build plugins, CLI commands |
| testing.md | Writing tests, running test suites, debugging failures |
| modern-tools.md | tools-core API, rspack integration, process management |