I usually have a dedicated API service for the front end that's more closely tied to the UI/UX, this may call other API's and services behind it, or the database directly. As a project grows, splitting and adding a primary API gateway may be more prudent.
Interesting... but should probably rely on defined and longer symbols over `^` and `#`... also, against using async decode since that stops this from being a drop in replacement for JSON.stringify/parse.
It's not exactly directly comparable... Parcel is probably the first framework like this that's actually got code splitting and asset use working as I'd expect. I know it's using other tools underneath, but it brings new meaning to the phrase "just works" that doesn't include some scss, images etc, which I'm not sure ESbuild supports the "import" references of, or that it will do templating for the html, let alone a dev server with a watch to (re)run the build.
There's also typescript and type checking to consider, for those that use it.
I'll definitely be playing with this as time permits, but I'm not necessarily "all in" on it just yet.
Definitely want to look into JIMP library mentioned... curiousities on features likely to be missing, but would be nice include...
For jpeg in particular:
* un-rotate image (in other words, clear the rotation and actually match the image without rotation metadata to the image detail), this happens a lot with images taken on phones.
* preserve/copy metadata (such as geolocation, etc) into newly saved images.
For png:
* palette reduction (and quantization) - png gets a lot smaller when you get your colors to a limited palette, which includes alpha channels. quantization will allow this to be reduced on images with more colors, the effects can be good to very bad, but often a huge boost combined for both with png output.
These are all features that are often missing from these types of libraries, and run into dedicated libraries. I've been hoping for a while that the builds for the libraries used with squoosh could be made into individual npm packages using web-assembly for web and node. Which should allow for interop as long as those wasm bundles are gpl, the use of them afaik doesn't require it.
With JWT, you can have an expiration database, something like an in-memory redis instance or memcached can also work... the jti (token identifier) can be added with a timeout of the token's expiration, so that on request, you can check to see if the token was revoked. You also get the added advantage of not having to query user/role tables or systems on requests, or maintain a state server at all. If you have short lived tokens with a refresh cycle you may not need a "logout" at all.