Giter Site home page Giter Site logo

fuzzrnet / fuzzr Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 8.0 1.35 MB

P2P platform for publishing content, self-hosting, decentralized curation, and more.

Home Page: https://fuzzr.net

License: The Unlicense

Rust 100.00%
censorship-resistance ipfs p2p rust rust-gui self-hosted

fuzzr's People

Contributors

cryptoquick avatar dependabot[bot] avatar goller avatar kn0wmad avatar nuke-web3 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fuzzr's Issues

Content Posts

Posts vs Content:
A post can be editable, and is signed by you.

A piece of content is immutable. It can be copied and signed by someone else, also.

Your client can confirm if someone's content was posted before or after the content of others through looking for a publish record on a blockchain.

Fontconfig error: Cannot load default config file

On build and run, I get:

Fontconfig warning: line 5: unknown element "its:rules"
Fontconfig warning: line 6: unknown element "its:translateRule"
Fontconfig error: line 6: invalid attribute 'translate'
Fontconfig error: line 6: invalid attribute 'selector'
########### snip #####################
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'version'
Fontconfig error: Cannot load default config file

Desktop (please complete any relevant information, or leave this section out if not applicable):

  • OS Ubuntu MATE 20.04
  • Fuzzr version (60c130b)

App Icon

And other desktop-specific metadata

  • Linux
  • Mac
  • Windows

public_flyingcat

Clippy linting

I don't have time to put into configuring Clippy, but sometimes it's nice for ensuring automated code quality.

Basic IPFS Communication

For ipfs-embed

  • Add image to IPFS
  • Show generated cid
  • Can retrieve the data from local IPFS store by cid when submitted to the Content page
  • Determine state of network connectivity

Task processor

Develop a means to manage long-running asynchronous tasks in one place

IPFS Data

For IPFS HTTP API

  • Add image to IPFS
  • Show generated cid

Text input for CID

Make this function and look good

This finishes:

  • Can retrieve the data from local IPFS store by cid when submitted to the Content page

Style polish for 0.0.1

  • Border radius should be 1.0
  • Page selector spacing between buttons with columns
  • Disabled state styles (black text, no border)
  • Active state styles (black border)
  • All non-testing page buttons that are currently in the hidden vec should be displayed by default, but disabled

Toolbar button items count or indicator

On the toolbar buttons, if there are pending / unviewed / new items, display a number, or at least, an indicator (* or +) to the right of the toolbar text.

Resets after the view page is highlighted. If zero, the indicator is absent.

Progress bar integration

Integration of progress bar into the Toolbar (when one is in use, otherwise keep spacer column).

"Processing... ...Processing... ...Processing"

Add a light/dark mode

Only work on this if you have no other things to work on. It'll be really nice to have when we go to show off our work, but it's more impressive that we have actual features.

  • Learn how to do a stylesheet. There are examples for this exact feature (night/dark) in Iced: https://github.com/hecrj/iced/search?q=dark
  • Add a toggle button to all pages
  • Reverse color-scheme on button press
  • Change PageSelector to Toolbar
  • Should apply to all elements (buttons, etc)

Initialization Dashboard Card

This the main issue for coordinating work on the Installer.

  • Dashboard columns (just 2 for now)
  • Dashboard cards (styling)
    • Understand layout and formatting principles and protocols in iced and use them to begin formulating a simple UI
    • Center and top align page buttons (always)
    • Create Containers with Rows/Columns to arrange data and widgets in an idiomatic fashion
  • Download progress bar UI: https://github.com/hecrj/iced/tree/0.2/examples/progress_bar

After it looks nice with static values, make it work, and then replace the static values: #26

No masters

Rename master branch to main and change it to the default branch in GitHub settings

Failed to compile | Rust 1.43.0 | Ubuntu 20.04 - 64bit

error[E0658]: `while` is not allowed in a `const fn`
   --> /home/box/.cargo/registry/src/github.com-1ecc6299db9ec823/bs58-0.4.0/src/alphabet.rs:107:9
    |
107 | /         while i < encode.len() {
108 | |             if base[i] >= 128 {
109 | |                 return Err(Error::NonAsciiCharacter { index: i });
110 | |             }
...   |
120 | |             i += 1;
121 | |         }
    | |_________^
    |
    = note: see issue #52000 <https://github.com/rust-lang/rust/issues/52000> for more information

error[E0658]: `if` is not allowed in a `const fn`
   --> /home/box/.cargo/registry/src/github.com-1ecc6299db9ec823/bs58-0.4.0/src/alphabet.rs:108:13
    |
108 | /             if base[i] >= 128 {
109 | |                 return Err(Error::NonAsciiCharacter { index: i });
110 | |             }
    | |_____________^
    |
    = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information

error[E0658]: `if` is not allowed in a `const fn`
   --> /home/box/.cargo/registry/src/github.com-1ecc6299db9ec823/bs58-0.4.0/src/alphabet.rs:111:13
    |
111 | /             if decode[base[i] as usize] != 0xFF {
112 | |                 return Err(Error::DuplicateCharacter {
113 | |                     character: base[i] as char,
114 | |                     first: decode[base[i] as usize] as usize,
115 | |                     second: i,
116 | |                 });
117 | |             }
    | |_____________^
    |
    = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information

error[E0658]: `match` is not allowed in a `const fn`
   --> /home/box/.cargo/registry/src/github.com-1ecc6299db9ec823/bs58-0.4.0/src/alphabet.rs:156:12
    |
156 |           [][match result {
    |  ____________^
157 | |             Ok(alphabet) => return alphabet,
158 | |             Err(_) => 0,
159 | |         }]
    | |_________^
    |
    = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information

   Compiling void v1.0.2
error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `bs58`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Download subscription

Create an iced subscription that can be used to download files to a specific location.

Release does not run on Ubuntu 20.04

Running https://github.com/FuzzrNet/Fuzzr/releases/tag/v0.0.3-alpha on Ubuntu 20.04LTS yields:

./fuzzr-0.0.3-alpha: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.32' not found (required by ./fuzzr-0.0.3-alpha)

This is due to glibc version in 20.04 not being up to date:
https://unix.stackexchange.com/questions/628021/glibc-2-32-not-found

it seems you are using Ubuntu 20.04. To get GLIBC_2.32 you would
need to use Ubuntu 20.10 or another operating system that offers that version.
Trying to upgrade glibc on your existing system will likely lead to many problems.

Tasks for ETH Denver

I've been meaning to post this, and I'm not sure how much time I'll have for this, so here's what I had planned:

  • Possible ETH Denver tasks
    • Image thumbnail selection
    • Publish from thumbnail
    • Text content thumbnails
    • HTML rendering of the image thumbnail screen
    • Warp Server
    • WASM frontend for Start9 Embassy
    • Content Type Filter for selecting text documents
    • Markdown rendering in Iced

I haven't really had any time for Fuzzr and that makes me a little grumpy, but... Sometimes work is work.

Publishing workflow

On publish page:

  • Left-click on a content item to display a local full view of it
  • Right-click on a content item on (locally) added content to select it
  • Highlight border around selected content items
  • Highlight a "Publish content" button into an active (vs disabled)
  • Will need a way to publish to peers the content that's been published

Web server & P2P local-hosted blogging platform

Considering making one of our first features a web server and locally-hosted blogging platforms.

The intention would be to join with others in sharing each other's content, to ensure uptime. To do this, a "trusted ring architecture" would be established.

A simple uptime assurance strategy that would require trusting a peer with privileged information (not ideal):

  • DNS can serve as a useful form of trusted centralization that is necessary to integrate with web technology that can help visitors connect to the IP pointed to the self-hosted IP in the A record.
  • Network nodes can periodically check the uptime of other nodes in their network so they can "take over" hosting their content by checking the hostname, hashing it, then pulling content for that CNAME from the IP that is currently in the A record.
    • This relies on sharing with trusted network nodes your dynamic DNS token to point your A record to their server if yours goes down.
    • Uptime can be checked in real-time by establishing a persistent socket connection with the other node (say, with ZeroMQ) to double-check uptime of the "trusted ring" health-check
    • A weakness of this approach is that the peer network node needs to 1) be trusted with serving the fuzzr frontend, and 2) be able to take over rewriting the A record using a request to their DNS dynamic DNS endpoint with their dynamic DNS secret.
    • The fuzzr frontend needs to pull content from a CNAME that corresponds to the hostname, and this CNAME is checked against the hash of the requested content
    • To keep the ring secure, a TXT record that isn't updated via dynamic DNS (assuming this can't be set like any other A record using the dynamic DNS secret key on the domain DNS provider...)
  • Native desktop clients can browse over to any ring-hosted site without needing to deal with DNS shenanigans, and can verify content hashes before rendering, also.
  • Ideally rendered content isn't rendered as actual HTML text, resulting in possible XSS shenanigans

0.1

  • Warp server
    • Instructions for router static config
  • Iced WASM frontend
  • CRUD text content for pages

0.1.1

  • Add images to pages
    • List images to add to pages

0.2

  • Dynamic DNS
    • Veracity checking
    • Uptime guarantees
    • Another problem is keeping the latest version of the site WASM binary available, but not so bad, since that can just be uploaded to peers to deliver... ugh, lots of trust issues all around with this approach, but that can then checked against a hash or signature before being executed by the browser.
  • Create pages
    • Link to other pages
    • List other pages to link on the editor
    • Page list (for, say, a list of blog articles)
  • Split pages into rows and columns (let's not use panels for now due to lack of serialization capability)
  • Link to other sites in the ring

Anyway, comments and thoughts on this idea are welcome. This approach might not require IPFS, remarkably enough. Just ZeroMQ, Warp server, dyanmic DNS requests on the backend, and a Rust-native crypto system capable of hashing, signatures, and encryption, some of which will need to happen in WASM clients.

Dependency Download

Similar to the logic that was implemented in the earlier project (fuzzr-old, it's still around, just hidden, it's only for temporary reference).

See: https://github.com/hecrj/iced/tree/0.2/examples/download_progress

This will need to be implemented for making an install page and a subscription for downloads.

Downloads and extracts to an /bin directory (in the root of the project, NOT the file system), just like we did it here:

https://github.com/fuzzr-net/fuzzr-old/blob/db11c160572bcee2b0c2f72ae6509fdc7ea6fc29/fuzzr/src/main.rs#L43-L81

(Note, this is a private repo, and will be removed once it's no longer useful.)

On build an run, it takes over **50 seconds** to have the GUI window open. (Ubuntu 20.04)

On build an run, it takes over 50 seconds to have the GUI window open. This is more than the first run, but on every attempt.

CPU/RAM usage not a limiting factor AFAIK.

Expected behavior
Startup in under a second

Desktop (please complete any relevant information, or leave this section out if not applicable):

  • OS Ubuntu MATE 20.04
  • Fuzzr version (60c130b)

Additional context
The https://cryptowat.ch/apps/desktop app opens in under a second on the same machine.

Unit tests and benchmarks

  • Unit tests for data/ipfs_client and ipfs_ops files.
  • Criterion benchmarks to measure performance of adding and loading IPFS data.

Page selector active state

Style the button on the page selector for the page that you're currently on differently so that the user knows what page they're on easily.

P2P Networking

  • Retrieve the file added to IPFS locally by cid off-prem

If this does not work, figure out why, and brainstorm strategies to fix.

Custom themes

Add a tuple to allow for user-generated and other custom themes. Ability to set foreground and background as desired. RGB triple.

  • Foreground / Background tuple datatype
  • Set via two text input boxes
  • Converts 3-byte RGB string, hex-encoded, i.e, #FF00FF, to Color
  • Lowercase works also
  • Refactor dark mode and light mode styles into a single stylesheet that accepts two color arguments for foreground and background
  • Database persistence

Cross-compilation

Possible targets:

  • x86_64-unknown-linux-gnu
  • x86_64-unknown-linux-musl
  • x86_64-apple-darwin
  • x86_64-pc-windows-gnu
  • aarch64-unknown-linux-gnu
  • aarch64-unknown-linux-musl

Also:

  • Manually tested on platforms
  • Integrates with #83

At some point investigate platform-specific integration testing.

Image Rendering

In Publish and Content Page only, to help facilitate development for #14

Directory listing (Publish page)

  • fs_crawler.rs
  • Rayon thumbnailing
    • 256px by 256px
    • Fills width while maintaining aspect ratio
  • Columnar view
    • Columns are added in increments of 256px + 2px spacing
    • Columns adjust after resize
  • Multi-select
    • Contrast color border, 1px
    • Navigate with keyboard
      • Tab between columns
      • Up and down arrows
      • Space to select
      • Scroll by page with page up / page down
  • Publish button
  • Unpublish Button

Minor image upload bug

I happened to be testing an upload with a white image that had a transparent background. At least in light mode, this obviously was invisible. Not sure a possible solution at the moment, and it's a very niche case, but I want to open this as a reminder to myself to sort it out at some point

Add new panels/sections(?) to dashboard

Understand layout and formatting principles and protocols in iced and use them to begin formulating a simple UI

  • Center and top align page buttons (always)
  • Create panels/sections/panes to contain data grouping in an idiomatic fashion

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.