Giter Site home page Giter Site logo

honungsburk / plutus Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 176 KB

Personal accounting, but with superpowers.

License: GNU General Public License v3.0

HTML 1.98% TypeScript 98.02%
crdt distributed distributed-systems hlc pwa typescript webapp webapplication distrubuted-database accounting

plutus's Introduction

Plutus

Personal accounting, but with superpowers.

NOTE: Plutus is currently in development, there is no public available build.

Description

While personal accounting is a dime-a-dozen kind of software, Plutus is anything but. It is designed as a p2p local-first progressive web app that gives some amazing superpowers: zero-click install on all platforms, offline support, and sync multiple instances in real-time over Bluetooth/internet/LAN/USB. You can even edit your expenses on your phone while on vacation and sync right back up with the instance on your home device without conflicts.1

Design

Core tenants

In no particular order:

  • All systems are distributed systems.
  • Parse, don't validate.2
  • The cloud is just someone else's computer.
  • Cache, cache, cache.
  • If the user is confused then I'm wrong.

Technical

Users

Users will be represented using public-key cryptography. 3

Database

This is where the magic happens.

Since our app is a distributed system we need a distributed database. Users expect that their entries into their phones will be merged with the changes on their laptops even if they haven't been synced for days or even months.

To do so we need a database where the entries can be added in any order and still derive the same state. We will use conflict-free replicated data types (CRDT) 4, specifically sets and last-write-wins where each entry is timestamped using a hybrid logical clock (HLC) 5. This will also allow us to only share the entries that we would like to share, allowing you to share your milk purchase with your mom but not your late-night trip to the store for condoms.

Sync

With a good database layer that performs all the heavy lifting all that is left is the problem of syncing. Now, since we are building a PWA it gets a bit more complicated. We do not have full access to the user's machine, but only the Web APIs, and have to make due. Luckily for us, there are multiple interesting APIs though some are still experimental.

There will be two modes of sync: real-time, and async.

Tagging

A lot of effort has been spent by people trying to do hierarchical categories: but they usually fail. Whenever you encode something into a hierarchical structure you embed one way of thinking about the world. The problem however is that people often have different views of what makes a natural hierarchy, and it is not unusual for your own opinion on the matter to change over time.

This is why we will do away with categories and only use plain string tags. Then we can run a fancy clutering algorithm on top and dynamically organize the data as more is added.


Development

Installation

Good ol' npm install will do the trick!

Development

What about npm run dev?

Testing

A classic: npm run test!

For the rest of the commands see the scripts in package.json.

Features

Features listed with "(MVP)" are the goal for version 1.0 of Plutus.

  • Installable PWA (MVP)
  • Offline support (MVP)
  • Dark/Light mode
  • CRUD expenses (MVP)
  • Store images
  • Tags
    • Basic tagging based on strings (MVP)
    • Clustering to create categories
  • Sync
    • USB
    • WebRTC (MVP)
    • Bluetooth
    • File (export/import)
  • Track/sync expenses with other people

Footnotes

  1. For the current set of features, see

  2. "Parse, don't validate" by Alexis King, see

  3. Wikipedia entry on public-key cryptography, see

  4. A basic intro to the topic of CRDTs, see

  5. Post on "hybrid-logical-clocks" by Jared Forsyth, see

plutus's People

Contributors

honungsburk avatar

Stargazers

 avatar  avatar

Watchers

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