Giter Club home page Giter Club logo

ubiquitodo's Introduction

Ubiquiti Programming Homework - Ubiquitodo

Tech:

  • Next.js
  • yjs
  • dnd-kit
  • LevelDB
  • Drizzle (Phased out)
  • TRPC (Phased out)

Initially it was planned to develop the solution with a Drizzle/TRPC stack which is pretty cool to use, but ultimately was not very suitable for a real-time pub/sub architecture.

Instead a much more traditional and a very crude stack was selected and implemented as an MVP due to the ready support for yjs communication.

Yjs was selected because it is very efficient and uses deltas streamed over Uint8 streams which is far more efficient than anything I could have come up with in the meanwhile. Persistence is facilitated with a filesystem based LevelDB which offloads data from ECS clusters onto a persisted and shared storage.

ECS clusters are spun up via Github Actions on push to main and there's a docker-compose setup to work with it locally. There's also a terraform script for spinning up a simple ec2 instance with the WS server on it.

There are a lot of considerations regarding the stability, security and reliability of the system, especially backend. If this were to be developed into a production app, the backend would need to be rewritten with a proper authentication, decoder, room initialization (for things like id autoincrementation (currently done on client, yikes)).

This turned out to be more of a system architect and devops task than it was a "regular" programming task.

Please do not abuse my server/cluster instances. They cost money and well.. I'm looking for a job.

N.B. Although I like to build frontend mobile-first, there have been absolutely no concern for making it work on mobile during the making of this project.

Execution:

Next.js server for frontend:

pnpm dev

Node WS server with LevelDB for persistence:

docker-compose up

Implemented user stories (simplified):

  • Can create to-do items
  • Can collaborate in real-time
  • Tasks can be marked as done
  • Complete tasks can be filtered out (incomplete subtasks will be filtered as well)
  • Can add subtasks
  • Can make an infinite amount of nested to-do items (styling is not adjusted for that, though)
  • Can see some presence of other users (shared cursor and selection 90% implemented)
  • Can create multiple shareable Todo lists with unique URLs
  • Can edit offline and sync to remote server on reconnect (not tested too extensively)
  • Can drag & drop

No VR Salad tracking, sorry!

ubiquitodo's People

Contributors

arajsegils 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.