Giter Club home page Giter Club logo

blockcore-notes's Introduction

Blockcore

Blockcore Notes

Notes app for decentralized infrastructures (Nostr and Web5)

Blockcore Notes is an app for your public and personal notes. It is built to support the Nostr and Web5 (coming in the future).

Nostr

The Nostr support for Blockcore Notes relies on using your Nostr identity (public key) and uses a set of relays to publish and store your notes. You can run your own personal relay to always keep a backup of your notes.

Web5

The Web5 support for Blockcore Notes relies on using your DID and use your DWN (Decentralized Web Nodes) to publish and store your notes. The Blockcore Wallet already supports and hosts an internal DWN within the extension, this can be used to store a local copy of all your notes.

Connect using extension

Blockcore Notes require that you use an extension that keeps your keys secure and is responsible for performing signing of your notes, and performs encryption and decryption for private notes.

We suggest using Blockcore Wallet (Chrome Web Store), but other options are available such as nos2x and Alby.

Features

A goal of Blockcore Notes is to be feature rich and have functionality that goes beyond the NIP-specifications.

  • Mobile and Desktop
  • Organize people and circles
  • Activity Feed (Notifications)
  • Following Feed
  • Reactions (turn off in Settings)
  • Rich Media Support, videos, music, podcast and YouTube.
  • Thread View
  • Profile View and Edit
  • Infinity Scroll (go far back on user posts)
  • Import and Export of backup (JSON file)
  • Import and Export of contacts (publish)
  • Identify Verification
  • Browser Extension and Private Key Import supported
  • Advanced Relay Management
  • Profile Edit
  • Notes Management (save notes)
  • Media Player (listen to podcasts, music or watch videos while reading feeds)

NIPs

Development

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

Notes

Thoughts and ideas:

  • Validate the content of certain limit and don't render at all if content is too long, or at least cut the content and only render X length. Then allow users to manually retrieve that exact event upon request.

Data Flow:

  • Event received from relays... pushed into an event processor, which pushes events into individual services based upon the type.
  • Individual services grabs existing event from StateService, if available, updates (if replaceable event or profile) or simply ignores. Maybe log "observed on relay".
  • If not available, push into the StateService and schedule a database put.
  • StateService should always keep some items in-memory: Profiles, Circles and more.

Security

There are many ways a web app can be exploited when it allow user contributed content. Any and all measurements to avoid exploits should be done, like sanitizing the input.

XSS Filter Evasion Cheat Sheet

blockcore-notes's People

Contributors

dangershony avatar fernandolguevara avatar harshil-jani avatar jrakibi avatar kashi992 avatar miladsoft avatar missmeowness avatar sondreb 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockcore-notes's Issues

Add folders to Saved Notes

Saved Notes obviously need to have folder support so users can organize saved notes more easily.

For example is it possible to save folders with music, photos, films and more.

image

"Save relays publicly"

Should be possible to save the relays list publicly, similar to Iris. Iris is using content on kind 3 to store the relays.

Example:

{
  "kind": 3,
  "content": "{\"wss://jiggytom.ddns.net\":{\"read\":true,\"write\":true},\"wss://nostr-relay.wlvs.space\":{\"read\":true,\"write\":true},\"wss://nostr.fmt.wiz.biz\":{\"read\":true,\"write\":true},\"wss://nostr.ono.re\":{\"read\":true,\"write\":true},\"wss://relay.damus.io\":{\"read\":true,\"write\":true},\"wss://nostr-pub.wellorder.net\":{\"read\":true,\"write\":true},\"wss://relay.nostr.info\":{\"read\":true,\"write\":true},\"wss://nostr.bitcoiner.social\":{\"read\":true,\"write\":true},\"wss://nostr.onsats.org\":{\"read\":true,\"write\":true},\"wss://nostr.mom\":{\"read\":true,\"write\":true}}",
  "tags": [
    [
      "p",
      "00000000827ffaa94bfea288c3dfce4422c794fbb96625b6b31e9049f729d700"
    ],
    [
      "p",
      "17e2889fba01021d048a13fd0ba108ad31c38326295460c21e69c43fa8fbe515"
    ],
    [
      "p",
      "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
    ],
    [
      "p",
      "a341f45ff9758f570a21b000c17d4e53a3a497c8397f26c0e6d61e5acffc7a98"
    ],
    [
      "p",
      "d987084c48390a290f5d2a34603ae64f55137d9b4affced8c0eae030eb222a25"
    ],
    [
      "p",
      "edcd20558f17d99327d841e4582f9b006331ac4010806efa020ef0d40078e6da"
    ]
  ],
  "created_at": 1673191070,
  "pubkey": "17e2889fba01021d048a13fd0ba108ad31c38326295460c21e69c43fa8fbe515",
  "id": "af087bc5f9ff617f5203a82a83e6f93814ad3ea70f61e1ecfb420fb907f7059f"
}

Store relay where data has been observed

We should store where events has been observed and allow users to potentially broadcast to other relays.

This is especially important for profiles, helping the network keep up-to-date profiles across the network.

Add "Mute" feature

"Mute" means that the posts by that user should not appear in the "Home" feed, but user should still be listed in the "People" section.

When a muted person replies on a thread, display a message like:

"This reply if from someone that you muted. Click here to see it" (Thanks "Pyre_3")

Make a timestamp to ISO date parser for tooltips

The "2 days ago" label need to have tooltip that renders the exact timestamp, OR perhaps a neater solution is to allow toggle between "ago" and displaying the date in ISO? I think maybe that is a better option?

Perform NIP-05 verification upon profile load

Some users have hundreds if not thousands of following and we can't do NIP-05 validation for all of them during import. We also want to validate NIP-05 once in a while for validitiy.

  • Store which NIP-05 was used on the user last time they where validated.
  • If the profile has a new NIP, show some visual indicator that makes users aware that "this user has changed their NIP-05".
  • Validate the NIP-05 against web server when loading profile and store date when retrieved.
  • Validate again if X amount of time, perhaps 5 hours or 24 hours or 48 hours?

Add hashtag query view

Users can use "t" tags as hashtags to posts. Make these tags linkable so users can view all posts with those hashtags.

Example on tag:

image

Persist media queue

The media queue should be persisted and users should be able to keep them and perhaps store multiple lists.

Optimization of database writes

When Notes receive a lot of the same events, there is a race-condition on get and puts resulting in multiple puts happening because the async await is waiting while next event triggers.

This could be optimized potentially with an queue for writes, where events fill up a queue instead of writing directly as now. The queue could also potentially look for duplicates directly when inserting into the update queues.

Example code where put of contacts and profile happens multiple times, depending on number of relays:

image

Get likes on posts

Leo: For likes you can do kinds: 7 and put event IDs in the ids array

For OPs (root posts) that are on a users profile, we can make queries that sends e.g. 10-50 event IDs and ask specifically for kind 7. This should get reactions to those posts in a fairly optimized manner.

Move the import and export of following to "People"

Currently the import and export is located under Circles, move this to People section.

The same logic must be applied where all circles are gathered and people are filtered if they are in public or private circles.

Improve subscription count management

There are probably not 48 active subscriptions at the moment of this screenshot, but at least enough to reach the limit of damus relay.

Need further improvements to ensure subscriptions are closed and new ones are waited until previous completes.

image

Package app for mobile

Related to #25 and #26, container task for the generic requirements for mobile package.

Use Cordova or any other new library to package for mobile phones.

Don't want to add ability to store private key directly into the PWA parts, the mobile apps need to have some custom UI/settings that allows storage of the private key in a secure enclave on the devices.

Export and Import

The local data should be exportable and importable, at minimum the Circle and the settings for Circles.

Circles can be local (private) or public (NIP-02), so user should be able to bring their data with them across devices without posting on the nostr-protocol.

Other data can include all the saved notes.

Personal profile edit

The profile should be loaded and allowed to be edited by the user when logged in using extension.

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.