Mongoose-patcher [2] for using it with mongoose / mongodb.
Json-patch-rules [3] for declarative security on patch operations.
41–50 of 333 posts
Mongoose-patcher [2] for using it with mongoose / mongodb.
Json-patch-rules [3] for declarative security on patch operations.
Semantic HTML, CSS, Vanilla JS, and JAMStack. Semantic: embed data directly in HTML. If I have a list of wines with categories, each wine's "class" attribute has a class for each category. HTML: can be generated by anything and consumed by anyone. Great SEO. CSS: These websites were all made with the same HTML, only CSS changing. http://www.csszengarden.com/ Let's imagine we have a checkbox, that when checked, should…
IS CSS really this well featured and expressive these days? I havent tinkered with it in years.
This partially might be more of a what's old is new again, but here's what I use: - 100% server side rendered - Progressively enhanced (fully works without JS, but having JS enabled makes it nicer) - In select places where I need SPA-like snappiness I use a ~100 line long DOM diffing algorithm (I request full HTML through AJAX and diff it into the current page; if the user has no JS enabled then the page just refresh…
I’d add adding s3 to backup things though.
A good 5+ years ago I built HasGluten [1] with react backed by a google spreadsheet, hosted on github pages. Proven technology, it's still working.
More recently I hacked together MultiPreview [2] with react + API served by firebase functions. I'm also temp using firebase hosting as I have little traffic, but plan to replace it with edge computing / CDN caching.
MultiPreview is backed by Saasform [3]. This is more like a classic node/express (nestjs) application, but I really like how we're separating concerns: the SaaS = MultiPreview handles the biz logic / Saasform handles landing page + auth + payments.
While building the new landing page I played with and liked a lot Bulma [4], I used but didn't like AlpineJS [5] and I'm thinking to move to Hotwire [6].
My personal experience is that performance only matters when you're big enough, so in the near future I want to experiment more on usability / nocode side. And I'd love to see more open source alternatives to the big ones.
[3] https://github.com/saasform/saasform
[4] https://bulma.io
I moved a React side-project from CRA to Next.js for server-side rendering benefits, but the latter doesn't support directly importing css styles in jsx to avoid problems with the global scope.
The two options offered were CSS modules and CSS-in-JS. I didn't like either approaches having hashes in the classname when opening the website in devtools, and both seemed too locked into React/JSX.
Tailwind 1. doesn't have component framework lock-in 2. doesn't make me think of css classnames 3. atomic classnames are readable in dev tools 4. provides default colors and box shadows, etc.
In addition, they're starting to make a render-less component library (https://headlessui.dev/): that means you can customize how components look without having to understand how its javascript internals work, which I'd find a huge plus compared to other libraries like ant design or material-ui.
- vite + react
More beginner friendly than webpack in starting a new project, and faster developer experience: page reloads almost instantly when you're modifying a component.
There are obvious downsides - on the back-end it's slower than a proper templating system, and on the front-end you're rebuilding the DOM tree from scratch each time, with all the limitations that includes (performance, animations get interrupted, HTML state gets lost, any event listeners have to be re-initialized). But for simple stuff, I cannot recommend it enough.
Here's a back-end example from my personal website: https://github.com/brundonsmith/website/blob/master/src/rend...
And here's a front-end example: https://github.com/brundonsmith/blogs/blob/master/docs/site....
This partially might be more of a what's old is new again, but here's what I use: - 100% server side rendered - Progressively enhanced (fully works without JS, but having JS enabled makes it nicer) - In select places where I need SPA-like snappiness I use a ~100 line long DOM diffing algorithm (I request full HTML through AJAX and diff it into the current page; if the user has no JS enabled then the page just refresh…
https://gist.github.com/greim/3de3bcb71a672e11c75e371b7b81f4...