kingstinct / zemble Goto Github PK
View Code? Open in Web Editor NEWZemble Plugin System
Zemble Plugin System
https://deno.com/blog/comparing-deno-kv
Maybe use something like keyv/packages/keyv/README.md at main · jaredwray/keyv
The @zemble/routes
is very easy to get started with, but is missing a few things to make it on par with GraphQL:
@zemble/auth
similar to what we do with GraphQL directives. Using hono middleware is probably an approach worth exploring.Using the sofa plugin on top of your GraphQL schema would be the easiest way to achieve feature parity with GraphQL right now.
We should probably try to support validating flows that can’t fit all validation inside a JWT.
Do we need to extend our GraphQL directive for this - to support as many use cases as possible?
Clerk is interesting from two perspectives:
Since our ootb validation is solely based on JWT validation we need to invalidate tokens when things like a permission change happens.
One approach would be making tokens very short-lived.
Another would be invalidating all tokens before a certain time.
Both requires some sort of refresh flow. Either with a refresh token or by providing the previous token.
We want to enable bundling with bun build to easily support a wide range of runtimes.
Right now many files (primarily in routes and graphql packages) are dynamically imported which doesn’t include them in the main bundle. To do this we need to:
Purpose:
This way we can keep the source code (even in published libraries) in TypeScript, no need for a build step when publishing plugins. And still produce bundles that can be used on as many runtimes as possible.
We already have some powerful abstractions, and code reusability reducing the code we need to write and maintain per project. But the final step to make this low code is being able to put together an app in a GUI.
The step shouldn’t be gigantic, essentially we just want to dynamically wire up the plugins we want to use:
Examples use cases:
Solution | Pros | Cons |
---|---|---|
Web Components | Web native | Only web, DX? |
React Native Components | Universal Components | Runtime dependent, bundle size |
React Server Components | Supposedly runtime independent | Still experimental |
SSR | Runtime independent | Not too flexible |
Microfrontend | Bundle size | Not too flexible |
Ideally we want something that:
Of course hard to check all the boxes :)
There are combinations we could look at. For example adopting React Native Components as our standard would:
Something to also consider is how to minimize bloat in the plugins. Let’s say we just want to expose a React Native Component we might not want to have it in the same NPM package as the backend code, since it would force UI dependencies when installing it on the backend and vice versa. On the other hand if we expose this Component through any kind of Server Side Rendering this might be desirable to some degree.
For state management using a cross-framework state management system like Zustand or Redux should do it. A library like this is easy to use in any UI framework.
The goal of the CMS and CMS-UI packages is to provide a base Content Management functionality.
To make it a complete solution it should be possible to:
Interesting projects to look at:
Payload CMS
Strapi (many good things, but TypeScript and GraphQL support is so-so)
Passkort support is rising, and it definitely looks like the future of passwordsless.
I think it might be a good fit for zemble-plugin-auth-anonymous
, since it in itself is not connected to any other user identifier.
What would make it complete is adding support for carrying over users between differetn auth providers. In GraphQL it should be a mutation called something along the lines of addAuthenticationMethod
that adds passkeys to an existing user, or vice versa. It needs some kind of configurable hook for the implementation to wire it up.
Some links:
Passkeys: A No-Frills Explainer On The Future Of Password-Less Authentication — Smashing Magazine
https://blog.google/technology/safety-security/passkeys-default-google-accounts/
https://developer.apple.com/passkeys/
https://www.passkeys.com/
Add support for chatting with the API:
I think the main use case is ”LLM-enabling” the API, but other features could of course also be interesting to bundle in this plugin.
Many plugins provide general functionality, but are still dependent on a provider for certain tasks, some examples:
A few design patterns we could use:
Some things to consider:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.