765 karma · joined Sep 20, 2023 (3y ago) · 331 submissions
comment 2y ago · link · parent
Some unique selling points are:
- Apps are defined as declarative HTML. It's possible to build complex apps using only HTML + CSS and no back end code.
- Supports the creation of complex filters/views via a simple UI, with indexing for fast lookups.
- Collections and records update in real time.
- Efficient; real time updates only reach users who are currently looking at the affected resources/views.
- Scalable; behind the scenes, both the database and pub/sub mechanism for delivering real time updates support sharding.
- Spam prevention with rate limiting and backpressure limits.
comment 2y ago · link · parent
https://github.com/SocketCluster/writable-consumable-stream?...
It has full test coverage and is a core part SocketCluster which has almost full e2e test coverage.
To put it in perspective, the library itself is very lightweight with under 300 lines of code including dependencies (only 1 of them) and has 1.6K lines of test code...
It supports concurrent consumption/iteration by default (each consuming loop causes a new async iterator to be created implicitly in accordance with the AsyncIterator spec) but it also gives you the ability to manually create consumer streams using `stream.createConsumer()` for cases where you want to start buffering messages some time before consuming/iterating over them.
comment 2y ago · link · parent
You can build your entire app inside a plain HTML file which can be deployed online with something like GitHub pages.
I've built a few apps with it including a real-time chat app which supports both group chat, private 1-on-1 chat with an account system (with access control), OAuth via GitHub... The entire app is only 260 lines of HTML markup and fully serverless (no custom back end code). Access controls are defined via the control panel. All the app's code is in this file: https://github.com/Saasufy/chat-app/blob/main/index.html
You can try the app here (use the 'Log in with GitHub' link): https://saasufy.github.io/chat-app/index.html
Saasufy comes with around 20 generic declarative HTML components which can be assembled in complex ways: https://github.com/Saasufy/saasufy-components?tab=readme-ov-...
There is a bit of a learning curve to figure out how the components work but once you understand it, you can build apps very quickly. The chat app only took me a few hours to build.
I've also been helping a friend to build an application related to HR with Saasufy and I managed to get the basic search functionality working with only 160 lines of HTML markup.
comment 2y ago · link · parent
It lets you build just about any data-driven application using only a handful of declarative generic HTML components: https://github.com/Saasufy/saasufy-components?tab=readme-ov-...
I built a chat app with both group chat and private chat (with access control) using only plain HTML; only ~250 lines of HTML markup for the entire thing, no front end or back end code was used: https://github.com/Saasufy/chat-app/blob/main/index.html
You can use it here - All hosted on GitHub pages: https://saasufy.github.io/chat-app/
It would be great to add support for other front end tech like this. I kind of like HTMX (especially as it's declarative). This HTMZ looks interesting. I'd like something with a big community and more components to handle more advanced cases (e.g. higher level components like calendars).
comment 2y ago · link · parent
I've been working on a similar concept except as a serverless platform which updates all data in real time: https://saasufy.com/
Docs: https://github.com/saasufy/saasufy-components/#saasufy-compo...
comment 2y ago · link · parent
See https://github.com/Saasufy/saasufy-components#saasufy-compon...
Actually, the elements from this article could complement my own nicely as they seem to provide more fine-grained control.
My platform is https://saasufy.com/ (you can log in with GitHub)
comment 3y ago · link · parent
I built a support chat app with it (which we use ourselves) using only declarative HTML components. Supports both public chat and private chat with authentication.
It's fully working now but I'm now focusing on walkthroughs/guides.
comment 3y ago · link · parent
But alas, I hadn't discovered some new quantum effect... It turns out to have been because the race condition was close within maybe 1 millisecond and adding the console.log() statement there meant that one part of the code would take a bit longer to execute and so the race condition would not occur.
comment 3y ago · link · parent
This is unfortunate because the Shadow DOM is essential if you want to work with child components slotted into it from the outside. This opens up many use cases.
There is one alternative which is not being considered; it's possible for components with a shadow DOM to inject their elements into the Light DOM (where they can be styled/skinned externally with CSS), you just have to make the user slot a div (or other element) from the outside to act as a 'viewport' so that the component can inject its children into it (instead of injecting them into its Shadow DOM).
With this approach, you can still access slotted elements. It's an ideal pattern for situations where you want the component to generate child elements from a slotted template.
I wrote an article about this approach here: https://dev.to/jondubois/web-components-the-template-viewpor...
comment 3y ago · link · parent
It's hard for me to imagine an environment where software is constrained by the availability and cost of engineering talent and where maintainability becomes the number 1 priority. So far, I suspect that maintainability has ranked VERY LOW on the list of priorities. The only reason some systems are maintainable today is because maintainability is correlated with security which is a bit higher priority.
I feel like the priority of software development over the last decade has been 'shipping fast' as enshrined in Facebook's motto "Move fast, break things." everything else has been neglected in favor of shipping fast. So I can understand the author's point of view that software is likely to experience a decline; it was not built to last and thus requires an unreasonable amount of human resources to maintain.
comment 3y ago · link · parent
I'm hoping that this is true because simple systems that require a single-maintainer are my specialty. It's almost unbelievable how much software I'm maintaining right now for myself and my small community:
- A quantum-resistant blockchain (it includes a server component which can be configured to support custom currencies... It includes a bash client, JavaScript client, front end wallet app; all can be configured/whitelabeled to support any currency based on the tech).
- A decentralized exchange which can work with essentially any blockchain (includes back end node, clients, UI trading front end).
- An open source WebSocket library with a focus on scalability (includes server and client). This one gets a fair bit of production usage among startups.
- A no-code platform which lets users build real-time apps using only HTML. This one is new and I'm currently finalizing and working on documentation.
And I still have a lot of spare time. I don't get many bug reports these days. My main concern is that I started to forget details of how some components work because I barely look at the code of some of these projects anymore. Not hard to refresh my memory though I guess. Architecture and tooling is very consistent and I use as few dependencies as possible.
comment 3y ago · link · parent
The more you reveal about yourself, the fewer people you will appeal to because very few people share your exact values. People tend to like people who share some obvious common values and they assume that the values that are unspoken are also a match. In reality, it's rarely so.
As people learn more about the world and themselves, they begin to realize that some values that they didn't consider before are very important and they may be shocked to find that certain people they used to like do not share those values which they took for granted.
comment 3y ago · link · parent
The key is to perform updates on fields individually. Normally this would not be viable using HTTP due to headers/overheads (too many fields per resource to dedicate an entire HTTP request per-field) but it is viable over WebSockets as each frame is very lightweight and can even be batched. Also, being able to tie together the life of the connection to the subscription is handy to ensure that no real-time updates can be missed.
I built a chat app with authentication + access control with it (you can log in with GitHub at the bottom):
https://saasufy.github.io/chat-app/
Only 120 lines of HTML markup (web components), no custom JS. See GitHub repo here for the 'source': https://github.com/Saasufy/chat-app
comment 3y ago · link · parent
The other thing I've been careful about is to ensure that the backend is fully no-code. As soon as you allow the user to execute custom code on your backend, it opens up security risks with multi-tenancy. The risk doesn't fully go away when you containerize as vulnerabilities have been encountered in the past in Docker which allow escaping the sandbox.
In my case, although the user can customize back end behavior, they can only do so in a highly constrained way using well defined parameters, not custom code. It saves a lot of effort not having to write a VM or restrict each container to a single host.
comment 3y ago · link · parent
https://github.com/Saasufy/chat-app/blob/main/index.html#L23...
You can try the app here (if you have a GitHub account): https://saasufy.github.io/chat-app/
The backend is serverless built using Saasufy.com - The platform/startup I'm working on currently: https://saasufy.com/
An effective approach I've found is to create components which consume slotted <template> elements to produce HTML that can be fully customized and injected with data they loaded from a back end. This allows you to create components which are declaratively bound to specific back end resources.
comment 3y ago · link · parent
As a demo, I was able to build a chat app with it: https://saasufy.github.io/chat-app/ You can log in via GitHub OAuth (also implemented with HTML tags).
Less than 120 lines of HTML markup in total for the entire functionality.
The source is here: https://github.com/Saasufy/chat-app
There is no custom backend logic, all the logic is in that repo as HTML + CSS.
comment 3y ago · link · parent
Then you wonder how all these reckless people ended up in positions of power.
comment 3y ago · link · parent
I built a whole chat app with authentication, blockchain and GitHub login with just 120 lines of HTML markup no front end or backend code (all the logic is abstracted away via generic, easy-to-use components provided by the platform).
You can also build apps which display filtered views by category or with text search with custom parameters and it does so efficiently with indexing and all updates in real time. Real time updates are delivered efficiently only to relevant components. Components automatically subscribe and unsubscribe to and from realtime changefeeds in an efficient way. Access control can be specified at the object/model level or on individual fields.
comment 3y ago · link · parent
It's further along than what is available online right now though there should be an update in the next few days as it's very close to MVP.
It allows you to build tables, lists and pages which update in real-time and support complex views including filtered by category and/or based on variables with pagination. It's designed to be fast and scalable.
The idea is that it will allow you to build complex apps using only HTML and CSS with zero to very little JavaScript. I already did a proof of concept as I used the same components to build the service itself and some of the dynamic pages to manage resources are pure HTML with essentially no code.
With MVP, it will work as a flexible CMS for making and updating websites but the next phase is to add authentication and access control and this will allow building forms which collect data from users and allow them to share data and interact with each other. I think it will require a few more weeks to a month to implement that as many of the tools are already in place.