We have been slowly removing Meteor dependencies from Reaction API server code. We are now close enough to being done on the server side, that we can create this Epic to track the remaining work.
To be clear, the goal here is to get the _API server_ running as a non-Meteor Node app. This means all GraphQL code, all events, all background jobs, all relevant startup code. It does _not_ include necessarily all Meteor methods or publications, nor does it include operator UI client code. There will remain a Meteor app to run those things for some time yet, but it will be needed only for running the operator UI. The operator UI will eventually not need Meteor, but there is much work to be done there and no timeline yet.
Here is a preliminary list of the work that this Epic entails:
collectionIndex function, and remove aldeed:schema-index Meteor packagecontextcore/server/hooks.jssetAppVersion on startup with getting the data from the new systemInfo GraphQLregisterPackage equivalent with no Meteor depsregisterPackageregisterPackage replacement.context.callMeteorMethod and remove itgetGraphQLContextInMeteorMethod and remove it ( #5529 )inviteShopMember.js - #5520 inviteShopOwner.js - #5553 sendResetPasswordEmail.js - #5558 sendVerificationEmail.js - TODOsendWelcomeEmail.js - TODOcatalog.js - #5562 publishProducts.js - PR #5541 cart.js - #5562getLocale.js - Removed by PR #5514 index.js - #5559 verifySettings.js - #5531 generate-sitemaps.js - #5530 This will be complete when the pure Node server, currently runnable for testing with npm run devserver, correctly handles all GraphQL requests, generates app events, creates and works background jobs, and sends emails.
Note: Long term, there will be more modular and scalable solutions for background jobs and emails, but there is no need to lump those larger projects in with this one. Porting the existing core plugins should be straightforward for now.
Epic in every sense of the word
This is fantastic, @aldeed. Godspeed!
This is very exciting work. Re: JobCollection library....Is there any interest in moving this to something like Agenda or Bull? https://github.com/agenda/agenda I've developed a love and hate relationship with job-collection over the course of a few projects.....
@dhonig Long term it will definitely move to a different tool for queuing and scheduled jobs. It will most likely be a separate microservice, so essentially you could use any library, tool, or third-party provider you want as long as you tell Reaction how to add, monitor, and work jobs.
But that is long term and isn't on the near-term roadmap, so for this epic the goal is really just to keep the existing system working without any changes except removing Meteor dependencies.
Has Account management been left out here intentionally?
@janus-reith Account management (identity provider features) will remain on Meteor, as will the Reaction Admin UI for now. Accounts are still heavily dependent on Meteor accounts packages. The plan is that eventually IDP will split to its own Meteor app, and then will be abstracted so that you can use something like Keycloak or third-party like auth0.
Ok, makes sense.
I was wondering initially how the API would deal with account data and permissions then, but realized that this is is how it works already using the the auth token.
Maybe this could allow for a simple transition: https://github.com/accounts-js/accounts
Having now a release-3.0.0 branch, I'm closing this epic as done. There is some remaining work fixing bugs and getting everything working in that branch, which is now being tracked in a public GH project: https://github.com/orgs/reactioncommerce/projects/4
Sorry to ask here after closed this thread. Just wanted to know, what was the benefit of removing one of the best JS Frameworks and go on simple nodeJS? Was also the possiblity kept in focus to take ReactJS + Meteor combination?
@vajda-media There were many reasons but one key pain point was crushingly slow start/restart time for the meteor server making back end development extremely hindered. Having a GraphQL API was also a key component of our "headless" product direction and meteor being UI/back-end integrated was contrary to that.
Most helpful comment
Epic in every sense of the word