Git Product home page Git Product logo

ipfs-boards's Introduction

IPFS Boards

Boards is an experiment with the goal of figuring out whether it's possible to have a discussion board, forum or social network that works inside a normal browser tab without relying on servers, desktop applications, browser extensions, the blockchain or anything else.

The goals in detail:

  • all communication should happen in the most distributed way possible using peer to peer systems
  • should work completely offline without anything else other than a web browser after it's downloaded for the first time
  • all data including assets, code and user created content needs to be distributed and/or replicated between the users

The project is in prototype stage and works thanks to the IPFS distributed file system.

The first iteration focuses on creating boards, posting content and commenting. Moderation tools, encryption, friends lists, private messages, real time chat and other features will be attempted in the future

Under the hood

This project is a web UI, orbit-db-discussion-board is the underlying library

Try it out

Super early build hosted on IPFS:

https://ipfs.io/ipfs/QmYT9EzvQY8zwtxQxUhPcphSGR4XtTRkT4MnXmQKPFamQ7

This allows you to create boards and posts. There is no moderation or commenting yet and a lot of things are super wonky

Working on the code

This is a react project using redux, react-router-redux and redux-saga

The UI is being implemented using semantic-ui-react

Clone this repo, then run

  • npm install to install dependencies
  • npm start to start a development server
  • npm run build to create a production build

Old Version

You're looking at the new implementation of Boards. If you want to check out the old one follow this link

ipfs-boards's People

Contributors

fazo96 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipfs-boards's Issues

Implement choosing how much data and how old to gather

This is one of the biggest problems in successfully implementing this protocol.

It needs an efficient algorithm that tries to keep the most relevant data, throws away the less relevant, all while trying not to luck up the user's web browser and being reasonably fast.

Cool landing page

It would be the coolest thing if the app could load in the background while the user looks at the landing page.

Rethink web application

  • use skeleton to style application
  • use React for functionality
  • use Browserify to recycle npm modules and server code
  • create a build system (probably based on gulp) to build, browserify, minify the app and ship it on ipfs

Communicate errors to user

  • have the API emit error events when something goes wrong
  • have the web app show error notifications when something goes wrong

Consistent ES2015 usage

  • use classes for react components
  • use ES6 import instead of require
  • use function name(){} instead of name: function(){} when applicable
  • use react stateless components when applicable
  • use promises instead of horrible callbacks (solves callback hell)
  • investigate using generators or async/await

Write unit tests for boards API

  • get an IPFS mock
  • get disposable IPFS nodes
  • pin a profile to disposable node then start testing on it
  • set up testing framework
  • test every API endpoint

Throroughly testing the API will be very hard because for example when looking for posts, it could take a long while before they are all found and often there is no end to a query

Implement publishing

Requires moving to IPFS 0.4 #20

  • profile creation and editing
  • board creation and editing
  • writing posts
  • editing posts
  • deleting posts
  • writing comments
  • editing comments
  • deleting comments

Illegal content filtering

If illegal content gets published we need a way to stop mainstream users to see it even if they open the link.

A good solution would be global blacklists that a user could use, and one/some of them active by default.

EDIT: I think IPFS also has his own solution, in that case we would just need to build something to signal the blacklist's authors that some content may deserve its place in the blacklist

Implement aggregation

  • download posts from admin
  • approval list: download posts from approved list
  • whitelist: download posts from whitelisted users
  • whitelist: download comments from whitelisted users
  • blacklist: download posts from random users and apply blacklist
  • user interface to handle all these

Other stuff:

  • inject op fields into posts when it's obvious
  • inject op field into posts when using whitelist or downloading from random people
  • Important for security: when the op field is already in the post, figure out if that guy really has the post by using ipfs.ls on his /posts/boardname. In other words, verify that the guy actually posted the thing before putting it on the screen. Being worked on in #77
  • figure out how to merge into the same post when multiple people post the same thing

Implement all main pages

The idea is:

  • Loading page while the app hasn't loaded yet
  • Landing Page #32
  • Error page if can't connect to IPFS
  • @user
    • board
      • specific post referenced by IPFS hash that shows comments
        • specific comment referenced by IPFS hash that shows subcomments
  • users, which is the users page
  • me, which redirects to the current user's profile
  • board (without specifying the user, works like user/board)

The problems:

  • URLs are already long... a nice way to shorten them would be good. Too bad there's no easy way

Backup and restore IPNS cache

  • use localStorage when available (in the browser)
  • use a file somewhere when localStorage is not available but the filesystem is
  • don't use this on IPFS 0.4 or newer

Migrate from custom protocol to POST + Extensions

POST plans to resolve the problem of interoperability between applications: using POST as a protocol for IPFS Boards would allow:

  • Interoperability with other Applications using POST
  • Having a well documented protocol as a base, thus better organization and clarity
  • Easily extend the application using POST extensions

Roadmap:

  • Take out protocol from this repo
  • Create one or more POST extensions that provide the required functionality for ipfs-boards, possibily:
    • POST-discussion-board
    • POST-comment, POST-user-profile (if core is not enough)
    • an extensions that defines a blog-style post (with title, body, author, date, media attachments)
  • Update the API to comply with the new protocol

Blocked by:

Handle huge files

  • make it possible to ignore files bigger than kilobytes
  • automatically ignore metadata (like json documents) files when they're too big to be legit
  • create interface to inform user that data wasn't downloaded because too big

Finish protocol specification

  • finish the data storage specification
    • move everything in a subfolder of the root folder of the IPNS publication
  • move FAQs in FAQ.md
  • move technical stuff in HACKING.md
  • leave only basic informations on the project and its current status in README.md

Implement Webpack Code Splitting

  • drop browserify, use webpack
  • modularize the app
  • set up build system on par with what we have now with browserify and gulp
  • use code splitting to reduce initial download size for the app

I decided to do this now because:

  • The app is getting way too big
  • The compile times with browserify are getting way too long (two minutes sometimes) and webpack takes at most 15 seconds
  • We will eventually need the cool webpack features (Code Splitting)

Webpack stuff already merged, need to modularize the app though

It's also kinda related to #19

Move to IPFS 0.4

Requires #64

  • implement IPFS version checking
  • drop IPNS caching layer if performance without it is ok
  • use updated js-ipfs-api with files API (currently using not-yet-released versions of js-ipfs-api)
  • drop support for 0.3 (probably not gonna do this until 0.4 is out)

New Name

Just like anonymous-networks, we need a better name!

  • Nettangle, Rektangle, Tanglepond
  • Impakt, Impacket, Impackt ? Impakt sounds nice
  • Citadel ?
  • uboard or ubrd
  • roundspace
  • IPSN: InterPlanetary Social Network
  • meshden, Meshub
  • IPFS Hub or IPHub as in InterPlanetary Hub
  • BitPod, MeshPod
  • Graphy
  • Merklehub
  • graphhub (hh) (thanks @dignifiedquire ๐Ÿ‘ )
  • hubwired, wirehub
  • Hubroid, Hubrid
  • Fluxeen
  • FluxHub (xHub) (thanks @dignifiedquire again ๐Ÿ‘ )
  • Flaxen, Linseed, Leanseed
  • Fluxseed (@dignifiedquire again ๐Ÿ‘ )
  • Seedly, Seedflux, Seedflow
  • Flowy, Flowery
  • Rokkit
  • Hinn, Hyn, Hynn
  • Pinnit
  • Filer, Fileform

Plan new features for the protocol

Discuss and write down specifics for these features:

  • ability to share pages written in markdown, which support versioning and are listable from the user's profile #81
  • embed a default board (like "blog") in a user's profile
  • trusted profiles list: your trusted profiles' trusted profiles are also marked as trusted
  • ability to have URLs pointing to IPFS hashes: the app figures out what that hash is and it shows content appropriately (a post, a comment, a board, a profile, media files)
  • global search engine for content (finds users, boards, posts, comments, hashtags, etc based on query)
  • hashtags for posts
  • chat system, would enable:
    • chatrooms (boards with a chat and no posts)
    • chat + boards (regular boards with a chat)
    • chat should be configurable like boards
    • should use a chain system where every chat message has a link to the previous one and only the latest is exposed
  • Access profile from multiple devices
    • best idea is probably have password protected keys and ability to import/export them
    • see #76
  • Outsource administration of boards
  • Multimedia
    • images
    • videos
    • audio
    • files and folders
  • nested boards, like a forum
  • sticky posts
  • maybe comment with the board/blog as a parent instead of a post
  • password encrypted content
    • see how Laverna does it
  • Ability to verify profile with social media, keybase (like keybase)
  • hidden content (requires IPFS to support it)
  • code repository hosting, requires:
    • js implementation of git
    • other github-like features
  • content versioning: app and protocol should be aware of previous versions of content

FAQs and other informational pages

  • How does it work page
  • FAQ page
    • add answer about localstorage security: ipfs gateway uses suborigins so if browser supports suborigins then it's safe

Implement comments

  • top level comments to posts
  • comments to comments
  • open/close thread interface
  • comment count displays even without opening threads and without downloading the comments handled in #69
  • basic comment CSS
  • cool comment CSS to display subcomments slightly shifted to the right
  • comment permalink, works like post permalink, makes it easier to navigate threads on mobile

searchUsers almost kills app

It can be reproduced by visiting the users page, seeing hundreds of requests of IPNS resolution start instantly, then going to your own profile and seeing that it doesn't load even though it should do it instantly. That's probably because the event emitter exploded.

searchUsers is essential, so it needs to be rewritten in a way that doesn't lock up everything. For example, sequentially figure out each one of the users.

Possible solutions:

  • use async library with ForEachSeries to rewrite it

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.