CodeVetter · Repo Unpack · Data flow
meteor/meteor
Application metadata flows into a staged build context, compiled targets, and filesystem artifacts. Runtime collection writes branch between local storage and remote DDP calls, with simulation, authorization, persistence, and observer acknowledgment as separate steps. Authentication carries credentials through registered handlers and validation hooks before binding a stored resume token to the connection.
- ProjectContext reads .meteor/release, .meteor/packages, .meteor/versions, .meteor/cordova-plugins, and .meteor/platforms; generated local state defaults to .meteor/local but METEOR_LOCAL_DIR can redirect it.
- Bundler compiles PackageSource into an application Isopack, merges project/client/server watch sets, runs linting, and resolves minifiers before output generation.
- Bundle output records release, Node/npm versions, and Git commit metadata; target descriptors are collected into star.json and finalized through Builder.complete.
- _insertAsync clones document properties and validates supplied IDs; remote collections call the mutator RPC and expose stub/server promises, while owned collections call their underlying insertAsync directly.
- DDP method input is shape-checked, resolved against method_handlers, and invoked with userId/randomSeed/write-fence context; result replies and observer-committed updated messages have separate send paths.
- MongoConnection.insertAsync converts Meteor atom types for insertOne, uses a driver session, annotates the current fence with operation time, refreshes observers, and commits its write handle before returning insertedId.
- Published cursors observe changes and forward added/changed/removed events to subscriptions; client replication maps those messages to local insert/remove/update operations and resumes observers at batch completion.
- Password login sends a SHA-256 digest into Accounts.callLoginMethod; successful server validation generates or reuses a stamped token, stores its hashed representation, sets connection userId, and returns the raw token to the client.