Features for 2.0 and beyond
With the 1.0 release ~~quickly approaching~~ done, it is time to make a list of features we would like to see afterwards.
- Core framework
- [x] Application mount support (
app.plugin(mountPlugin, {app: fooApp, path: '/prefix'})) - [ ] Nested helpers (
ctx.foo.bar(...)) - [ ] Custom URL class with better manipulation methods (like
Mojo::URL) - [ ] Express middleware support (maybe as a plugin with request and response object emulation)
- [x] Proxy helpers (
ctx.proxyGet(),ctx.proxyRequest())
- [x] Application mount support (
- Assets
- [x] URL generation (
ctx.urlForAsset('foo.js')returns/static/assets/foo.abcd1234.js) - [x] Headers to prevent caching for assets in development mode (
foo.development.js)
- [x] URL generation (
- Documentation
- [ ] Port testing guide to JavaScript
- [ ] Port all reference documentation examples to JavaScript
- [x] Form validation with JSON schema
- [ ] Many more recipes for the cookbook (including all from Mojolicious)
- [x] Reference documentation for classes (needs to be generated on the website)
- WebSockets
- [ ] Support for custom headers in handshake (client and server)
- [ ] Support for subprotocol negotiation from action
- [ ] Reconnect feature for the client
- Client
- [ ] Switch to @mojojs/user-agent (more WHATWG APIs)
- [x] UNIX domain sockets (
http+unix://...) - [ ] HTTP/2 support (we might just support it via the fetch API)
- [ ] HTTP/3 support (:no_entry_sign: not yet in Node.js)
- Server:
- [x] UNIX domain sockets (
http+unix://...) - [ ] HTTP/2 support (:warning: tricky because of WebSockets)
- [ ] HTTP/3 support (:no_entry_sign: not yet in Node.js)
- [ ] Server-Sent Events (provide an actual API)
- [x] UNIX domain sockets (
- Renderer
- [ ] Port all the tag helpers
- [x]
colorFieldTag - [x]
dateFieldTag - [x]
datetimeFieldTag - [x]
emailFieldTag - [x]
fileFieldTag - [x]
hiddenFieldTag - [x]
labelFor - [x]
monthFieldTag - [x]
numberFieldTag - [x]
passwordFieldTag - [x]
rangeFieldTag - [x]
searchFieldTag - [ ]
selectFieldTag(⚠️ quite complex) - [x]
telFieldTag - [x]
textFieldTag - [x]
timeFieldTag - [x]
urlFieldTag - [x]
weekFieldTag
- [x]
- [ ] Port all the tag helpers
- Example apps
- [x] Chat (ported from Perl)
- TypeScript
- [x] Updated app generator commands with TypeScript support
- [x] Update plugin generator command with TypeScript support (
--tsflag)
- Command line
- [ ]
perl -Mojo -E '...'equivalent (something better thannpx mojo eval -v '...'?)
- [ ]
Would be great to have csrf_field tag helper.
Would be great to have
csrf_fieldtag helper.
That doesn't really work with JSON schema based validation. And has become kinda obsolete with SameSite cookies.
Edit: And for the record, mojo.js session cookies default to SameSite: lax. So they are reasonably well protected already, as long as you are not misusing GET routes.
I’d be willing to create a chat example if someone tells me how to broadcast to websocket clients
I’d be willing to create a chat example if someone tells me how to broadcast to websocket clients
The blue checkmark means it's already done.
Would be great to have
csrf_fieldtag helper.That doesn't really work with JSON schema based validation. And has become kinda obsolete with
SameSitecookies.Edit: And for the record, mojo.js session cookies default to
SameSite: lax. So they are reasonably well protected already, as long as you are not misusingGETroutes.
Unfortunately, SameSite cookies don't protect CSRF attacks on websockets. Please see this article. So as mentioned there we would need at least to check on the Origin header or use some kind of random generated csrf token. In mojo.pl you could generate an ws(s) url with a query parameter named csrf_token, generated with the existing helper, and then validate that inside the websocket, assuring that the rest of the mojo cookies are valid.