GithubHelp home page GithubHelp logo

mattyg / herddit Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 1.0 950 KB

P2P sub-group posting app on holochain

Nix 0.43% Rust 46.53% TypeScript 14.29% HTML 0.24% JavaScript 0.72% Vue 37.61% CSS 0.18%
dapp happ holochain p2p peer-to-peer groupware social-media social-network

herddit's Introduction

Herddit

Have you herddit?

P2P sub-group posting app - built on Holochain

Wildebeests Stable Diffusion

Environment Setup

PREREQUISITE: set up the holochain development environment.

Enter the nix shell by running this in the root folder of the repository:

nix-shell
npm install

Run all the other instructions in this README from inside this nix-shell, otherwise they won't work.

Running 2 agents

npm start

This will create a network of 2 nodes connected to each other and their respective UIs. It will also bring up the Holochain Playground for advanced introspection of the conductors.

Running the backend tests

npm test

Bootstrapping a network

Create a custom network of nodes connected to each other and their respective UIs with:

AGENTS=3 npm run network

Substitute the "3" for the number of nodes that you want to bootstrap in your network. This will also bring up the Holochain Playground for advanced introspection of the conductors.

Packaging

To package the web happ:

npm run package

You'll have the herddit.webhapp in workdir. This is what you should distribute so that the Holochain Launcher can install it. You will also have its subcomponent herddit.happ in the same folder`.

Documentation

This repository is using these tools:

herddit's People

Contributors

mattyg avatar mrbianchi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mrbianchi

herddit's Issues

Cache data in front-end state

  • Decrease page loading times
  • Avoid situation where someone fetched data, but then agents we're not available at a later time (I thought DHT cache handled this but maybe not)

UI Themes

  • Support for UI themes
  • Create / Use a bunch of pre-existing themes

Aggregated Feed

A page that displays an aggregated feed from all the herds you are a member of.

UX Indicator of unread calls in herd

  • Track if an agent has read a call in the frontend state
  • Create a new coordinator zome function get_calls_count to return the number of calls in a herd
  • Poll get_calls_count periodically in the Watering Hole to identify which herds have new calls
  • Display visual indicator next to herd name indicating that there are new, unread calls in herd
  • Display visual indicator on Call in AllPosts component, indicating that it has not been read

Clarify "list of sub-herds" in the Watering Hole

Consider a different UX to make clear that the list of sub-herds is similar to sub-reddits.

I'm not sure how it should be formatted... maybe columns, left-aligned, with a heading that says "Join a Herd (Community)"

Refactor Clone Cell Logic

This change in hc 0.1.4 will require some changes to herd cell cloning logic:

New: Enabling or disabling a clone cell is now idempotent — if you try to enable an already enabled clone or disable an already disabled one, it’ll return a successful result rather than an error. (#2093)

Refactor all zome calls fetching data to use SWR pattern

every new herd I join is empty, until I re-visit it

This is very bad UX for new users. Instead the HerdDetail page should poll for calls on a regular interval, so the user doesn't have to reload or navigate away and back to see calls in a herd cell they recently installed

Refactor all zome calls fetching data to use SWR pattern with polling and localstorage caching. See https://docs-swrv.netlify.app/configuration.html#refreshinterval and https://docs-swrv.netlify.app

Split up WaterHole list of herds into "Installed" and "Not Installed" sections

I think it makes sense to split the WaterHole list into 2 sub-lists:

  • Your Herds (cells you've installed
  • Neighbor Herds (cells you haven't installed)

This lets you prioritize visiting herds you're already apart of, and lets us separately (later) come up with more interesting and useful UX for discovering new herds.

test not passing

Are tests passing for you?

[holonix:~/herddit]$ npm test

> test
> npm run build:zomes && hc app pack workdir --recursive && npm t -w tests


> build:zomes
> RUSTFLAGS='' CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown

    Finished release [optimized] target(s) in 0.12s
Wrote bundle /home/mrb/herddit/dnas/herd/workdir/herd.dna
Wrote bundle /home/mrb/herddit/dnas/directory/workdir/directory.dna
Wrote bundle /home/mrb/herddit/workdir/herddit.happ

> [email protected] test
> NODE_NO_WARNINGS=1 TRYORAMA_LOG_LEVEL=warn RUST_LOG=warn ava -s -c 1 --fail-fast --timeout=2m


  ✔ posts › post › create post (14.1s)
  ✔ posts › post › create and read post (24s)
  ✔ posts › post › create and update post (27s)
  ✔ posts › post › create and delete post (20.6s)
  ✘ [fail]: posts › post › get_all_posts_sorted_by_votes sorts by number of votes desc, then timestamp asc
  ─

  posts › post › get_all_posts_sorted_by_votes sorts by number of votes desc, then timestamp asc

  src/posts/posts/post.test.ts:345

   344:     });                                                                                  
   345:     t.deepEqual(alice_posts_sorted, [record.signed_action.hashed.hash, record3.signed_ac…
   346:                                                                                          

  Difference (- actual, + expected):

    [
      Buffer @Uint8Array [
        84292466 4771f578 20b9df3b 5a43d19a f5918744 606ae36f 85c11937 44444d6d
        47b02e75 9f43cb
      ],
  -   Buffer @Uint8Array [
  -     8429244d 80fd96cc 0b9b0ed8 3a466cea a22b5bbb f81a2633 344373f6 181c4aae
  -     f90b118e b9810e
  -   ],
      Buffer @Uint8Array [
        8429245a 273edb31 28957e8f ae7c73ab e4c5d2fb bd28ed89 4bf86ddb 0b124b8f
        9df6c253 3f7375
      ],
      Buffer @Uint8Array [
        842924f0 427bc950 f9509c2c eb2ae7e4 0cd1f866 ac37e73e 33d22b3c 1d172377
        2b471895 71d616
      ],
    ]

  › runScenario.timeout (file://src/posts/posts/post.test.ts:345:7)
  › async runScenario (file:///home/mrb/herddit/node_modules/@holochain/tryorama/lib/local/scenario.js:102:9)
  › async file://src/posts/posts/post.test.ts:248:3

  ─

  `--fail-fast` is on. 1 test file was skipped.

  1 test failed
npm ERR! Lifecycle script `test` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: [email protected] 
npm ERR!   at location: /home/mrb/herddit/tests 

"Notifications" menu

Add a "notificatoins dropdown to the navbar containing:

  • Comments on posts you have created
  • Comments on posts you have replied to

Relies on #8

Build front end to support older webkit versions

A major challenge with using Tauri for the launcher is many users will be stuck on older versions of webkit and we can't control it. Unless we get a version of launcher using electron down-the-road, this may be an issue we're stuck with.

What we can do is configure front-end builds to include polyfills that implement our necessary js features. This seems particularly import for any front-end modules that will be widely used in other happs.

Seems like targeting Safari >= 13 would satisfy most users.

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.