0

A React-like JS Framework with Web Components

preview

IMPORTANT DISCLAIMER: This is my own project. Im am using AI. Its important to get that out of the way… because its the key reason for why YOU SHOULD NOT USE IT. Im not trying to promote “yet another ui framework”, this is an investigation to see what is possible. Its unreviewed, unaudited and far from finished. Nobody else should be using this. This framework is intended for myself on my own projects. It is provided open-source for transparency, testing and demo purposes only.

I was investigating an idea i had about JSX-like syntax for webcomponents after some experience with Lit. I am sharing this here because it might be interesting/educational.

Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components. It can support React with a wrapper, buts React is fundamentally an abstraction away from the DOM.

Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.

My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects. I made a start by creating some basic reusable ui components components to be built with the js framework. Aiming for something like Material UI.

I can then compound that slop down into some basic UI demos:

To better demonstrate the pure-javascript and no-transpilation approach, i created an example repo of using a minimal amount of tooling for a PWA. The aim here is to keep the application logic in readable js and abstract the framework logic away from the developer.

To simplify things for myself, i added something similar to module-federation where i can fetch the dim/core dependencies as remote statics from github-pages instead of publishing to npm. The approach has tradoffs worth considering and is still a work-in-progress.

The disclaimer above is always worth repeating. Im aiming for a post like this to be like “building in public”. If interesting to anyone, i hope its inviting to take a look. It’s hard to determine if / when its a good time to share, so best to get it out there sooner for any outstanding issues i may have overlooked.

IMPORTANT DISCLAIMER: This is my own project. Im am using AI. Its important to get that out of the way… because its the key reason for why YOU SHOULD NOT USE IT. Im not trying to promote “yet another ui framework”, this is an investigation to see what is possible. Its unreviewed, unaudited and far from finished. Nobody else should be using this. This framework is intended for myself on my own projects. It is provided open-source for transparency, testing and demo purposes only.

I was investigating an idea i had about JSX-like syntax for webcomponents after some experience with Lit. I am sharing this here because it might be interesting/educational.

Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components. It can support React with a wrapper, buts React is fundamentally an abstraction away from the DOM.

Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.

My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects. I made a start by creating some basic reusable ui components components to be built with the js framework. Aiming for something like Material UI.

I can then compound that slop down into some basic UI demos:

To better demonstrate the pure-javascript and no-transpilation approach, i created an example repo of using a minimal amount of tooling for a PWA. The aim here is to keep the application logic in readable js and abstract the framework logic away from the developer.

To simplify things for myself, i added something similar to module-federation where i can fetch the dim/core dependencies as remote statics from github-pages instead of publishing to npm. The approach has tradoffs worth considering and is still a work-in-progress.

The disclaimer above is always worth repeating. Im aiming for a post like this to be like “building in public”. If interesting to anyone, i hope its inviting to take a look. It’s hard to determine if / when its a good time to share, so best to get it out there sooner for any outstanding issues i may have overlooked.

0

A React-like JS Framework with Web Components

preview

IMPORTANT DISCLAIMER: This is my own project. Im am using AI, so lets get that out of the way… because its the key reason for why YOU SHOULD NOT USE IT. Im not trying to promote “yet another ui framework”, this is an investigation to see what is possible. Its unreviewed, unaudited and far from finished. Nobody else should be using this. This framework is intended for myself on my own projects. It is provided open-source for transparency, testing and demo purposes. Feel free to reach out for clarity if you have any questions.

Im was investigating an idea i had about JSX-like syntax for webcomponents after some experience with Lit. I am sharing this here because it might be interesting/educational.

Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components. It can support React with a wrapper, buts React is fundamentally an abstraction away from the DOM.

Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.

My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects. I made a start by creating some basic reusable ui components components to be built with the js framework. Aiming for something like Material UI.

I can then simmer that slop into some basic UI demos:

To better demonstrate the pure javascript approach, i created an example of using a minimal amount of tooling for a PWA. The aim here is to keep the application logic in readable js and abstract the framework logic away from the developer for better DX.

To simplify things for myself, i added something similar to module-federation where i can fetch the dim dependencies from remote instead of publishing to npm. The approach has tradoffs worth considering and is still a work in progress.

The disclaimer above is always worth repeating. Im aiming for a post like this to be like “building in public”. If interesting to anyone, i hope its inviting to take a look. It’s hard to determine if / when its a good time to share, so best to get it out there sooner for any outstanding issues i may have overlooked.

IMPORTANT DISCLAIMER: This is my own project. Im am using AI, so lets get that out of the way… because its the key reason for why YOU SHOULD NOT USE IT. Im not trying to promote “yet another ui framework”, this is an investigation to see what is possible. Its unreviewed, unaudited and far from finished. Nobody else should be using this. This framework is intended for myself on my own projects. It is provided open-source for transparency, testing and demo purposes. Feel free to reach out for clarity if you have any questions.

Im was investigating an idea i had about JSX-like syntax for webcomponents after some experience with Lit. I am sharing this here because it might be interesting/educational.

Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components. It can support React with a wrapper, buts React is fundamentally an abstraction away from the DOM.

Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.

My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects. I made a start by creating some basic reusable ui components components to be built with the js framework. Aiming for something like Material UI.

I can then simmer that slop into some basic UI demos:

To better demonstrate the pure javascript approach, i created an example of using a minimal amount of tooling for a PWA. The aim here is to keep the application logic in readable js and abstract the framework logic away from the developer for better DX.

To simplify things for myself, i added something similar to module-federation where i can fetch the dim dependencies from remote instead of publishing to npm. The approach has tradoffs worth considering and is still a work in progress.

The disclaimer above is always worth repeating. Im aiming for a post like this to be like “building in public”. If interesting to anyone, i hope its inviting to take a look. It’s hard to determine if / when its a good time to share, so best to get it out there sooner for any outstanding issues i may have overlooked.

0

Browser-based WebLLM Chatbot

preview

To help users of my app, it was important to document the details around the “how it works”. the docs were easy enough using docusaurus + AI. i can then index that data (like used in the docusaurus search). i framed this as like a chatbot so that it can be intuitive for users who have questions. at this point it was really just a fancy autocomplete.

i started to investigate running a local LLM to perhaps offer a more conversational experienced (and hopefully better suggestions)? im using WebLLM on a browser and it seems to work “reasonably” well. i wired it up and set it up so users could select an LLM down download for offline use. the experience varies between devices and models used. there are models that are 19mb… they are unsable as far as i can tell. there are some ~1gb models which are better but understandable slow.

its great that the 1gb model can “show me the bubble-sort in rust”, but i want something “dumber” and smaller. something can can take advantage the data ive already indexed. something that can respond “quickly enough” for a conversational flow. perhaps better i should make a verbose set of reponse templates to perhaps add fancier autocomplete capabilities.

are there any models out there you can suggest for me to investigate and compare?

note: the project is unstable, experiemental and there will be breaking changes. its far from finished. im just trying things out and this approach with LLM’s might just be a waste of time. if you want to test it out, you can try: app.glitr.io/ai

To help users of my app, it was important to document the details around the “how it works”. the docs were easy enough using docusaurus + AI. i can then index that data (like used in the docusaurus search). i framed this as like a chatbot so that it can be intuitive for users who have questions. at this point it was really just a fancy autocomplete.

i started to investigate running a local LLM to perhaps offer a more conversational experienced (and hopefully better suggestions)? im using WebLLM on a browser and it seems to work “reasonably” well. i wired it up and set it up so users could select an LLM down download for offline use. the experience varies between devices and models used. there are models that are 19mb… they are unsable as far as i can tell. there are some ~1gb models which are better but understandable slow.

its great that the 1gb model can “show me the bubble-sort in rust”, but i want something “dumber” and smaller. something can can take advantage the data ive already indexed. something that can respond “quickly enough” for a conversational flow. perhaps better i should make a verbose set of reponse templates to perhaps add fancier autocomplete capabilities.

are there any models out there you can suggest for me to investigate and compare?

note: the project is unstable, experiemental and there will be breaking changes. its far from finished. im just trying things out and this approach with LLM’s might just be a waste of time. if you want to test it out, you can try: app.glitr.io/ai

0

The Signal Protocol in Rust

preview

There are a few nuances to my approach, but the key detail is that I wanted it to also work in a browser so I needed the ability to build to a wasm to be used in js.

Signal libraries don’t offer browser based capabilities and so I created this to target web aswell as native.

I wanted to implement the Signal protocol for a series of secure messaging apps I’m working on, so I built this project to test and use in my own work. It’s still far from finished, but I think it’s at a stage where it’s worth sharing with the community.

IMPORTANT DISCLAIMER: This project is not professionally audited and is not production-ready. I do not recommend anyone use this in their own code yet. It is provided strictly for testing, experimentation, and demo purposes. I used AI as an assistant to help build this, so double-check everything before taking it seriously.

Project Links:

Current Status & Development:

  • Spec Alignment: The goal is to fully align with the official Signal protocol spec.
  • Testing: It includes unit tests, but due to WASM testing limitations, I also added a Storybook-like UI to run and test it directly within a browser environment.

The impementation here is being used in a few experimental messaging apps (similarly unaudited and unreviewed):

I am also working towards adding it to an open source project soon as seen at: github.com/positive-intentions/chat for e2e open-source transparency in the implementation.

There are a few nuances to my approach, but the key detail is that I wanted it to also work in a browser so I needed the ability to build to a wasm to be used in js.

Signal libraries don’t offer browser based capabilities and so I created this to target web aswell as native.

I wanted to implement the Signal protocol for a series of secure messaging apps I’m working on, so I built this project to test and use in my own work. It’s still far from finished, but I think it’s at a stage where it’s worth sharing with the community.

IMPORTANT DISCLAIMER: This project is not professionally audited and is not production-ready. I do not recommend anyone use this in their own code yet. It is provided strictly for testing, experimentation, and demo purposes. I used AI as an assistant to help build this, so double-check everything before taking it seriously.

Project Links:

Current Status & Development:

  • Spec Alignment: The goal is to fully align with the official Signal protocol spec.
  • Testing: It includes unit tests, but due to WASM testing limitations, I also added a Storybook-like UI to run and test it directly within a browser environment.

The impementation here is being used in a few experimental messaging apps (similarly unaudited and unreviewed):

I am also working towards adding it to an open source project soon as seen at: github.com/positive-intentions/chat for e2e open-source transparency in the implementation.

0

Signal Protocol in Rust

preview

I wanted to implement the Signal protocol for a series of secure messaging apps I’m working on, so I built this project to test and use in my own work. It’s still far from finished, but I think it’s at a stage where it’s worth sharing with the community.

IMPORTANT DISCLAIMER: This project is not professionally audited and is not production-ready. I do not recommend anyone use this in their own code yet. It is provided strictly for testing, experimentation, and demo purposes. I used AI as an assistant to help build this, so double-check everything before taking it seriously.

Project Links:

Current Status & Development:

  • Spec Alignment: The goal is to fully align with the official Signal protocol spec.
  • Testing: It includes unit tests, but due to WASM testing limitations, I also added a Storybook-like UI to run and test it directly within a browser environment.

I wanted to implement the Signal protocol for a series of secure messaging apps I’m working on, so I built this project to test and use in my own work. It’s still far from finished, but I think it’s at a stage where it’s worth sharing with the community.

IMPORTANT DISCLAIMER: This project is not professionally audited and is not production-ready. I do not recommend anyone use this in their own code yet. It is provided strictly for testing, experimentation, and demo purposes. I used AI as an assistant to help build this, so double-check everything before taking it seriously.

Project Links:

Current Status & Development:

  • Spec Alignment: The goal is to fully align with the official Signal protocol spec.
  • Testing: It includes unit tests, but due to WASM testing limitations, I also added a Storybook-like UI to run and test it directly within a browser environment.
0

A React Hook For Asynchronous State Management.

positive-intentions 8. Encrypted Storage & Loading States | positive-intentions positive-intentions.com
preview

A fairly unique approach to state management using encrypted asynchronous state updates.

It is not production-ready. I’m working on it to use in my own projects. It isn’t reviewed or audited by a third-party, so I can’t recommend you use it in your own code. Sharing for testing and demo purposes only.

TLDR; The title of this post.

Feel free to reach out for clarity instead of reading the code/docs.

I was working on “react-like syntax for webcomponents”. I started off with an approach for asynchronous state management so that components outside the shadow-root could receive updates. (The events are also encrypted to secure against things like browser extensions.)

positive-intentions.com/…/async-state-management

It then made sense to be able to persist that data so it can work between page releoads.

positive-intentions.com/docs/…/bottom-up-storage

The result looks and works like the following when used in a project.

positive-intentions.com/docs/…/encrypted-store

The Dim framework seems like a dead-end. I wanted to try the hook out on my existing React projects. So I created the equivalent React hook.

positive-intentions.com/…/use-dim-store-react

I find it to be performant and I want to push the scale of the approach, so I am in the process of testing it out on my projects. A notable use-case there is storing encrypted files at rest.

Feel free to reach out for clarity.

A fairly unique approach to state management using encrypted asynchronous state updates.

It is not production-ready. I’m working on it to use in my own projects. It isn’t reviewed or audited by a third-party, so I can’t recommend you use it in your own code. Sharing for testing and demo purposes only.

TLDR; The title of this post.

Feel free to reach out for clarity instead of reading the code/docs.

I was working on “react-like syntax for webcomponents”. I started off with an approach for asynchronous state management so that components outside the shadow-root could receive updates. (The events are also encrypted to secure against things like browser extensions.)

positive-intentions.com/…/async-state-management

It then made sense to be able to persist that data so it can work between page releoads.

positive-intentions.com/docs/…/bottom-up-storage

The result looks and works like the following when used in a project.

positive-intentions.com/docs/…/encrypted-store

The Dim framework seems like a dead-end. I wanted to try the hook out on my existing React projects. So I created the equivalent React hook.

positive-intentions.com/…/use-dim-store-react

I find it to be performant and I want to push the scale of the approach, so I am in the process of testing it out on my projects. A notable use-case there is storing encrypted files at rest.

Feel free to reach out for clarity.

0

Browser-Based Office Suite

preview

By leveraging FileSystem API for browser-based file-management, we can create a fairly unique approach for interacting with files on your device from your browser.

Features:

  • PWA
  • Local-first
  • Word
  • Spreadsheet
  • PDF

Coming soon:

  • Support for more filtypes
  • Storage sync
  • Collaborative editing
  • Encryption at rest
  • P2P file-transfer

*** The project is experimental and far from finished. It’s presented for testing, feedback and demo purposes only (USE RESPONSIBLY!). ***

This project isnt finished enough to compare to Microsoft Office. This is intended to demonstrate client-side managed functionality. Allowing users to get started without setup.

I have a demo version for testing. It isnt ready to replace any existing app or service, but it would be great to get your feedback on it.

The implementation is based on the functionality described in a previous post.

By leveraging FileSystem API for browser-based file-management, we can create a fairly unique approach for interacting with files on your device from your browser.

Features:

  • PWA
  • Local-first
  • Word
  • Spreadsheet
  • PDF

Coming soon:

  • Support for more filtypes
  • Storage sync
  • Collaborative editing
  • Encryption at rest
  • P2P file-transfer

*** The project is experimental and far from finished. It’s presented for testing, feedback and demo purposes only (USE RESPONSIBLY!). ***

This project isnt finished enough to compare to Microsoft Office. This is intended to demonstrate client-side managed functionality. Allowing users to get started without setup.

I have a demo version for testing. It isnt ready to replace any existing app or service, but it would be great to get your feedback on it.

The implementation is based on the functionality described in a previous post.

0

P2P WhatsApp Clone

preview

IMPORTANT NOTE: This is still a work-in-progress and largely a close-source project. To view the deprecated open source MVP see here. Nothing has been audited or reviewed. This app should not be considered secure, private or even stable. I guarantee there will be breaking changes! Presented here for testing purposes only, not a replacement for any messaging app. There are countless details to improve throughout and it should not be used for sensitive/private/personal data. This project implements a unique but experimental approach to secure messaging with a PWA.


Want to send E2E encrypted messages and video calls with no downloads, no sign-ups and no tracking?

This prototype uses WebRTC to establish a secure browser-to-browser connection. Using browser-only storage—true zerodata privacy!

enkrypted.chat

The aim is to have an experience as close to Whatsapp as reasonably possible so that the experience is intuitive.

Some features include:

  • P2P
  • End to end encryption
  • Browser-based
  • No installation/registration
  • Local-Only storage
  • Text Messaging
  • Multimedia Messaging
  • File Transfer
  • Video Calls

To find out more check out the docs.

IMPORTANT NOTE: This is still a work-in-progress and largely a close-source project. To view the deprecated open source MVP see here. Nothing has been audited or reviewed. This app should not be considered secure, private or even stable. I guarantee there will be breaking changes! Presented here for testing purposes only, not a replacement for any messaging app. There are countless details to improve throughout and it should not be used for sensitive/private/personal data. This project implements a unique but experimental approach to secure messaging with a PWA.


Want to send E2E encrypted messages and video calls with no downloads, no sign-ups and no tracking?

This prototype uses WebRTC to establish a secure browser-to-browser connection. Using browser-only storage—true zerodata privacy!

enkrypted.chat

The aim is to have an experience as close to Whatsapp as reasonably possible so that the experience is intuitive.

Some features include:

  • P2P
  • End to end encryption
  • Browser-based
  • No installation/registration
  • Local-Only storage
  • Text Messaging
  • Multimedia Messaging
  • File Transfer
  • Video Calls

To find out more check out the docs.

0

Decentralized chat in a browser

preview

chat.positive-intentions.com

github.com/positive-intentions/chat

I’m excited to share with you an instant messaging application I’ve been working on that might interest you. This is a chat app designed to work within your browser, with a focus on browser-based security and decentralization.

What makes this app unique is that it doesn’t rely on messaging servers to function. Instead, it works based on your browser’s javascript capabilities.

Here are some features of the app:

  • Encrypted messaging: Your messages are encrypted, making them more secure.
  • File sharing: Easily share files using WebRTC technology and QR codes.
  • Voice and video calls: Connect with others through voice and video calls.
  • Shared virtual space: Explore a shared mixed-reality space.
  • Image board: Browse and share images in a scrollable format.

Your security is a top priority. Here’s how the app keeps you safe:

  • Decentralized authentication: No central server is required for login, making it harder for anyone to gain unauthorized access.
  • Unique IDs: Your ID is cryptographically random, adding an extra layer of security.
  • End-to-end encryption: Your messages are encrypted from your device to the recipient’s device, ensuring only you and the recipient can read them.
  • Local data storage: Your data is stored only on your device, not on any external servers.
  • Self-hostable: You have the option to host the app on your own server if you prefer.

A decentralized infrastructure has many unique challenges and this is a unique approach. Ive taken previous feedback and made updates. Its important to note, the app is an unstable proof-of-concept and a work-in-progress. Its important to understand at this early stage in the project, there will be breaking changes. It is not ready to replace any existing apps or services. While the app is aiming to be an encrypted and secure chat system, the project is not mature enough to have been reviewed by security professionals and should not be considered encrypted or secure. it is provided for testing/review/feedback purposes.

Looking forward to hearing your thoughts!

The live app

About the app

Even more about the app

Docs

Subreddit

chat.positive-intentions.com

github.com/positive-intentions/chat

I’m excited to share with you an instant messaging application I’ve been working on that might interest you. This is a chat app designed to work within your browser, with a focus on browser-based security and decentralization.

What makes this app unique is that it doesn’t rely on messaging servers to function. Instead, it works based on your browser’s javascript capabilities.

Here are some features of the app:

  • Encrypted messaging: Your messages are encrypted, making them more secure.
  • File sharing: Easily share files using WebRTC technology and QR codes.
  • Voice and video calls: Connect with others through voice and video calls.
  • Shared virtual space: Explore a shared mixed-reality space.
  • Image board: Browse and share images in a scrollable format.

Your security is a top priority. Here’s how the app keeps you safe:

  • Decentralized authentication: No central server is required for login, making it harder for anyone to gain unauthorized access.
  • Unique IDs: Your ID is cryptographically random, adding an extra layer of security.
  • End-to-end encryption: Your messages are encrypted from your device to the recipient’s device, ensuring only you and the recipient can read them.
  • Local data storage: Your data is stored only on your device, not on any external servers.
  • Self-hostable: You have the option to host the app on your own server if you prefer.

A decentralized infrastructure has many unique challenges and this is a unique approach. Ive taken previous feedback and made updates. Its important to note, the app is an unstable proof-of-concept and a work-in-progress. Its important to understand at this early stage in the project, there will be breaking changes. It is not ready to replace any existing apps or services. While the app is aiming to be an encrypted and secure chat system, the project is not mature enough to have been reviewed by security professionals and should not be considered encrypted or secure. it is provided for testing/review/feedback purposes.

Looking forward to hearing your thoughts!

The live app

About the app

Even more about the app

Docs

Subreddit