Skip to content

experiment: run backend without meteor - #41781

Draft
cardoso wants to merge 13 commits into
vite-meteorfrom
vite-meteor-backend
Draft

experiment: run backend without meteor#41781
cardoso wants to merge 13 commits into
vite-meteorfrom
vite-meteor-backend

Conversation

@cardoso

@cardoso cardoso commented Aug 13, 2026

Copy link
Copy Markdown
Member

Review in cubic

@dionisio-bot

dionisio-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project
  • This PR has an invalid title

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1d62d9f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 712d96e5-4f32-481e-98a2-a6c9ef976af0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

cardoso added 12 commits August 13, 2026 15:02
Adds vite, @vitejs/plugin-react and vite-plugin-istanbul to the meteor
app, aligns the uikit-playground plugin-react version, and declares
livechat's existing preact-render-to-string dependency explicitly.
…runtime

Reimplements the Meteor client packages the web client depends on
(DDP client, minimongo, tracker, accounts/OAuth, EJSON, reactive-dict,
reload, etc.) as a plain TypeScript workspace package, typechecked
standalone via its own tsconfig. minimongo.ts and mongo.ts are direct
ports of untyped prototype-based JS and are ts-nocheck'd for now; the
rest of the package passes strict typechecking.
Adds the SPA shell (index.html), the vite-only entry point (src/) wiring
@rocket.chat/meteor-client and a client-side typia stub, the vite config
with dev-server proxy to any Rocket.Chat server (ROOT_URL), source
aliases for workspace packages and the meteor/* namespace, and plugins
that inject the meteor runtime config, replace rocketchat.info, and emit
an nginx.conf for serving production builds.

The vite-only sources are excluded from the Meteor app's tsconfig: they
are not part of the Meteor build and rely on bundler-style resolution.
When the client is served from localhost, full URLs must use the local
origin so assets and uploads go through the vite proxy instead of
hitting the remote Site_Url origin's CORS policy.
The vite dev client is always served from the same localhost origin no
matter which server it proxies to, so the public-settings cache
(IndexedDB, token-less, survives logout) leaked across workspaces:
pointing the proxy at a server with E2E enabled after using one without
it kept E2E_Enable=false cached, and the _updatedAt delta sync never
repaired it.

Expose the proxy target as UPSTREAM_ROOT_URL in the injected runtime
config and use it as the PublicCachedStore token, evicting the cache
whenever the target server changes. No-op in the Meteor-served client,
where the origin already identifies the workspace.
MinimongoCollection is constructed with a null name — no connection, no
DDP replication — and immediately replaces the inherited _collection
with the Zustand-backed LocalCollection, so extending Mongo.Collection
contributes nothing at runtime. Nothing calls the inherited query or
mutator API either: Meteor.user/userId are overridden to read the
Zustand store and no client code calls Meteor.users.* methods.

Making it standalone removes the client's last construction-time
dependency on Mongo.Collection.
The internal users collection only ever served findOne-by-id lookups of
the logged-in user's own document and the registration of the 'users'
DDP store. Replace it with DdpCollectionStore, a Map-backed client
store — this client never runs method stubs, so none of minimongo's
matcher/originals machinery is needed. Also drop the collection and
defaultFieldSelector config options: nothing sets them and projections
are no longer supported.
…tore

The login service configuration collection is only read through
configurations.findOne({ service }) by the OAuth provider modules;
a Map-backed DDP store covers that without minimongo.
With Accounts.users and ServiceConfiguration backed by plain DDP stores
and MinimongoCollection no longer extending Mongo.Collection, nothing
reaches mongo.ts, minimongo.ts, allow-deny.ts or check.ts anymore:
no client code creates collections, calls allow/deny, or runs method
stubs. Inline oauth.ts's only check() call as a typeof assertion and
drop the _preventAutopublish typing that existed solely for the ported
Collection constructor.

Removes the package's last two ts-nocheck files; everything left passes
strict typechecking.
@cardoso
cardoso force-pushed the vite-meteor-backend branch from 66d2246 to 1d62d9f Compare August 13, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant