Git Product home page Git Product logo

evolu's People

Contributors

0xi4o avatar arekmaz avatar atgctg avatar danilaplee avatar dealingwith avatar filipchalupa avatar github-actions[bot] avatar harrywebdev avatar kaladivo avatar kndwin avatar needim avatar negue avatar piktur avatar prusnak avatar sectore avatar steida avatar tomheaton avatar tylermercer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evolu's Issues

Replace wa-sqlite

Because of the license and because OPFS and LocalStorage are good enough.

E2E tests

Vitest with Playwright for all Evolu use-cases. Test network traffic.

Expose SQLite config

The current config silences SQLite because it's verbose.

self.sqlite3ApiConfig = {
  debug: constVoid,
  log: constVoid,
  warn: constVoid,
  error: constVoid,
};

Add error handling example to README

e.g.

import { getError, subscribeError } from "evolu"

useEffect(() => {
  const notifyOnError = () => {
    console.error(getError())
  }

  return subscribeError(notifyOnError)
}, [])

Improve readme

What is missing in the readme? I think I should write more about CRDT, links are not enough. Should I?

Ideas

  • a helper for full text search

Create an advanced example

  • more tables and joins
  • an example of how to filter nullables on UI
  • custom string and number branded types
  • form validation
  • leverage patched Evolu state to prevent rerendering

Handle obsolete schema on sync

The app has to be able to import data created from a newer version because forcing users to update is bad UX. Evolu should detect a missing column error, alter the table, and then repeat the import of the affected row.

Example app crashes on iOS safari

Really interested in evolu so was trying out the example app on Safari on Mac and iPhone. Works fine on Safari on Mac but crashes on iOS safari (iPhone 8 - iOS 15.1)

Here is a screenshot of the crash - probably mobile Safari does not support one of the browser APIs used by evolu.
IMG_0902

The underlying question I was trying to figure out is whether evolu can synchronise data when one of the peers is offline. Does the server store a complete copy of the data or does it delete the data once it has been relayed to the other device?

Nostr

Nostr has a similar architecture. We should investigate whether we can reuse something.

Leverage Trezor

  • Use Trezor to store mnemonic
  • Super secret feature (data visible only on Trezor device)

Evolu apps

The idea is similar to https://remotestorage.io.

Use the same data across different apps. Create a to-do list in one app, and track the time on your tasks in another one. Say goodbye to app-specific data silos.

Evolu app is any app using Evolu lib. To protect Evolu Mnemonic, #118 must be implemented.

Because any Evolu app using a mnemonic has access to all owner's data, Evolu apps must be audited for fetch, etc. usage.

Let's discuss this.

Add fido2

Replace reset/show/recover mnemonic with "Connect with FIDO2".

Via hmac-secret. It should be what Evolu needs.

Refactor has helper into useQuery or createHooks

has is a very useful helper and should be integrated into the existing Evolu API.

All row columns except for id are nullable by default. A column can be null for two reasons. It's not loaded yet, or it's obsolete. That's why the has helper is so useful, and that's why it belongs to the application itself.

I'm not sure whether it can be refactored into the createHooks, but I'm pretty sure it can be refactored into useQuery. And with memorization, of course.

Some nullable columns are nullable for a reason, while others are just not yet loaded. The best place is createHooks, I believe.

Proposal: Simplify handling deleted rows

Rows are actually not deleted. They are only marked as deleted. But the current API is not ideal because practically all queries have to be filtered. A proposal:

  • replace isDeleted column with internal/invisible __isDeleted
  • store data in invisible tables with a suffix [tableName_all]
  • create views for useQuery [tableName] and [tableName_deleted]
  • add 'remove' function to useMutation

With such a change, developers wouldn't have to filter rows everywhere.

Document has helper

All row columns except for id are nullable by default. A column can be null for two reasons. It's not loaded yet, or it's obsolete. That's why the has helper is so useful, and that's why it belongs to the application itself.

TODO: Add an example to README.md.

const nodes = pipe(
  useQuery((db) =>
    db
      .selectFrom("node")
      .select(["id", "md"])
      .where("isDeleted", "is not", model.cast(true))
      .where("id", "in", ids)
  ),
  (a) => ({ ...a, rows: a.rows.filter(has(["md"])) })
);

Decrease library size

  • remove mutation code from kysely somehow
  • replace some dependencies with own code tailored for Evolu

Optimizations

Another idea is to hold the clock, Merkle tree, and table definitions in tab memory to skip reads, but it's unfortunately impossible because inactive tabs would have to be updated in the background, and such an async operation can't be reliable, AFAIK. We can already do that because we have one DB instance per many tabs.

For m:n relations, consider https://github.com/ccorcos/tuple-database#Motivation as an additional abstraction. SQL has to be always supported because that's what people use and know. The core idea of a tuple database is to build indexes by queries; I think Evolu can do that, too, because it does not expose mutation SQLite API.

IMHO unnecessary

Improve diff logic

  • Append
  • Prepend
  • Edit
  • RemoveAt

These operations can still be detected quickly. Remember, the perfect diff is impossible to compute quickly.

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.