Giter Site home page Giter Site logo

davemackintosh / novum Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 27.7 MB

Me playing around with a pure P2P web design tool (Figma clone-ish) in a few days around my actual work

Home Page: https://novum-gamma.vercel.app

JavaScript 5.01% HTML 1.03% TypeScript 71.03% Svelte 22.93%

novum's Introduction

Novum

"new"

I didn't get time to finish this but it's not a million miles off. Need to add a translation from ES event to ECS components and then to add a simple P2P WebRTC connection manager to send and receive events over the line.

a proof of concept figma like collaborative drawing app using SvelteKit, Typescript and WebRTC.

All work is done and stored in the frontend and there is no backend at all, all data is stored in localStorage. Events are dispatched over a webRTC channel and shared across devices.

It approaches the problem using the following ideas:

  • ECS

    • All "layers" are "entities".
    • All applicable actions are "components"
    • All rendering and user interaction are "systems"

    This gives us a very isolated way of adding behaviour to things without having to worry about extending entire feature sets.

  • Event Streaming

    • All actions are recorded in a ledger and replayed for "eventual consistency" in views and queries.

    This gives us the time travel feature as well as the flexibility to create entirely new views and queries while retaining the underlying structure.

  • CQRS

    • All "write" operations are seperated from all read operations.

Okay? So what does what?

The CQRS is responsible for the reading and writing separation, in this demo it's not very powerful but in a distributed system it's very very powerful and offers multiple benefits such as time travel, data restoration, data modification without any data model changes, total separation of query model from data structure as well as a very clear and concise set of rules around data transfer.

Event sourcing is what gives us the time travel through application state as well as the ability to; at any time, change our data model without ever changing the data source. It gives us a versionable protocol which means that our software is always backwards and forwards compatible (so long as the command and even handlers remain the same.)

The ECS is responsible for the handling of drawing objects to the canvas based on the events provided and or loaded from the event store. This means that our writing is it's own domain, reading/querying is it's own domain and rendering is it's own domain.

Getting started.

yarn && yarn dev will run a vite server at the default address and you should be good to go.

novum's People

Contributors

davemackintosh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.