IMPORTANT DISCLAIMER: This is my own project. I 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 secure messaging app”, this is an example to see what is possible with a related UI framework im working on ( https://github.com/positive-intentions/dim ). Its unreviewed, unaudited and far from finished. This framework is intended for myself on my own projects. It is provided open-source for transparency, testing and demo purposes only. There will be breaking changes.

The key details that set this approach apart:

  • No minification or transpilation
  • No React, NPM or bundler
  • Works from index.html

The architecture is also a bit unique. Module federation has been around for a while but still fairly under-used. Im aiming for something that could be described as like a vanilla JS “decentralized microfrontend architecture”, where in this approach, i can abstract complexity into seperate repositories to manage reusble functionality like in the boilerplate example:

To avoid vibecoded cryptography, the aim here is to avoid handling encryption where appropriate. Browsers that support webrtc, will have their own mechanisms for managing encryption (as required by the spec). The keys will not be accessible from app-level JS code. For security best-practice, users should use an OS, browser and network they trust.

To make something complicated at scale, i would need to have an approach for testing out changes in a way thats more isolated/focused. The npm ecosystem is useful because you can have things like storybook, unit-testing and browser automation tools. So i wanted to see what is possible with the pure javascript approach and created runTests.html. Like the main app, the code is just plain javascript and so it can be imported and tested with production statics. The testing functionality here is especially far from finished. This is an important feature to do it properly because it would be doing a lot of heavy lifting as the project improves.

P.S. 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.

    • some_designer_dude@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      14 hours ago

      React is just HTML and CSS, but with tools that make it suck so much less to build and maintain real things. Remix is even more “pure” web standards wise, I think? It’s a good example of how an orchestrator for all the many standards is still super handy, but also at illuminating just how far the standards have come.

      • duckduckduck@programming.dev
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        13 hours ago

        IMO if you’re using React and not doing SPA, websockets, or updating the DOM on the fly, then you don’t really need React.

        I’ve just completely switched slinging raw html and using nginx’ ssi module for templating and dryness.

    • EloySg@lemmy.zip
      link
      fedilink
      arrow-up
      8
      ·
      17 hours ago

      So, what we change JavaScript for? Lua? Lisp? WebASM+C++/Rust?

      Edit: I’m genuinely curious but the web in this day and age NEEDS a substitute for JavaScript.

      • duckduckduck@programming.dev
        link
        fedilink
        arrow-up
        8
        ·
        14 hours ago

        Just don’t.

        If you want to make an application, make an application. But if you want to serve web pages, html is all you need.

        • bitfucker@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          1 hour ago

          Until you cannot publish the application (iOS, and next is Android with developer verification even for apk outside of the play store). Web Application is seriously a powerful tool too. I don’t want yet another application just to update my peripheral settings. WebUSB got me covered. I don’t want to install an application that I don’t know if I will use frequently. Having a web version that I can occasionally visit is great. Even better if they can be installed as PWA as those provide isolation for app that I don’t fully trust yet. Want to have instant messaging? Why should I install discord when the web version can also do voice and video call. And that is because I don’t need discord monitoring what app I open every time it runs.

        • EloySg@lemmy.zip
          link
          fedilink
          arrow-up
          4
          ·
          16 hours ago

          That’s the whole thing,using just CSS is a bad idea so using a language for Web is necessary