Giter Site home page Giter Site logo

distrinet's Introduction

Distrinet

Code for Distrinet

Here's what I do:

  • Given a URI, provide the content (and/or a URL).
    • This is currently code inside the app; we could also make this a local HTTP server that gives up the content (and/or a URL).
    • This may eventually be replaced by DID Resolvers.

I also currently contain these sample applications:

Plans

See tasks.yml

Development

To run:

  • Go to the "distnet settings" on the first page and copy settings into the text field, eg. sample-sources.yml
  • yarn
  • yarn dev

To test:

To package (following https://www.electron.build/auto-update ):

  • Edit both package.json versions (in / and /app).
  • Add to CHANGELOG.md
  • git push and let GitHub build all packages before pushing anything new.
    • Manually: yarn package, create a GitHub release, and upload package(s) to it.
  • Add the commit hash to CHANGELOG.md and bump the versions with "-beta".

When developing:

  • Note that it will run some tests before allowing merging to master, eg. node_modules/.bin/tsc. Make sure those work because we enforce TypeScript.
  • Note that it will also run some pre-commit hooks, eg. yarn lint, which can be annoying if you're just trying to commit some temporary work on a branch; if you need to bypass it temporarily, remove the "pre-commit" line from package.json.

To start in a whole new repo, do the following in the same directory where you have distrinet cloned:

  • git clone --depth 1 --single-branch https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name
  • cd your-project-name
  • rm -rf .git
  • Now if you want to save this as the baseline in git, git init and git add . and git commit
  • git apply ../distrinet/patch.diff
  • cp -r ../distrinet/app/features/distnet app/features
  • ... then continue with above.

To create that patch file:

  • git diff e0aafdd21835b6d0515f5008174d9264c9848e42 app/Routes.tsx app/app.global.css app/components/Home.tsx app/constants/routes.json app/rootReducer.ts package.json yarn.lock > patch.diff
  • ... then look through patch.diff and remove the references to "task" stuff.

Tooling

Current sample app is built on the Electron framework.

  • Rejected frameworks:

    • Node & React Native
      • good because we use it for other projects
      • unable to get it working for macos
    • Flutter & Dart - immature, deskop for Mac in alpha
      • final nail: my exception doesn't show the main.dart line (eg. when the config.yml file doesn't exist)
      • Flutter & Kotlin?
    • Node & Electron - doesn't target mobile
    • Ionic - requires an account
    • Local server via browser - not designed for mobile (most tools just serve files or PHP)
  • For delivery/connectivity

  • For storage:

    • file system
    • authenticated server
    • encrypted data
    • ZKPs
  • For apps:

    • git excels at tracking the histories of file changes, including the actors and the differences.
    • Danube Tech works on foundational pieces of self-sovereign infrastructure with DID resolvers
    • Solid aims at personal pods, and includes many tools.
    • Picos (still being developed at BYU)
    • unhosted
    • not a fit
    • Identity / Verified Credentials
      • uPort.me (on Ethereum)
      • connect.me (on Sovrin)
      • MetaMask.io (on Ethereum)
      • AralaPrism.io (on Cardano, not open-source)

Design

Types of URI -> URL relationships:

  • For "sources.urls":
    • The first URL is preferred. If that's a remote URL:
      • You might have a local copy (eg. a git clone), and that "file:///" URL would be what to put as the second URL.
      • If there is no local copy, a copy will be downloaded and stored by this app.
    • Any URLs after the first are typically writable but not read (except when disconnected or to detect conflicts).
    • Future write methods could include:
      • Direct to file (typically sync'd through external tool)
        • OneDrive, Syncthing, Google Drive
      • Direct to git
      • git via request
        • This may need a pointer to my own copy repro.
      • Direct to Notion
      • Direct to Facebook
      • Sync would be dynamically updating. (Maybe both source & sink?)
        • Yjs & CRDTs
    • Future toggle settings on sources could include:
      • always load into memory (and watch for changes)
      • keep a local history

Other

To create your own URI, I recommend you use a scheme with your domain or email and the year (if you had it at the beginning of the year), such as "tag:[email protected],2020:stuff-for-home" following the TagURI standard. It's an easy way to get started with unique IDs.

Kudos

distrinet's People

Contributors

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