Git Product home page Git Product logo

debin's Introduction

Debin logo

Debin

A completely decentralized way of sharing temporary and permanent messages. Debin uses Waku and IPFS decentralized networks to temporarily or permanently store messages, respectively.

  • ๐Ÿ”— Easily share any text message with someone else (e.g. temporary secrets or one-time-passwords). Just send the link.
  • ๐Ÿ”’ All messages are encrypted on the browser and only transferred and stored encrypted.
  • ๐ŸŒŽ Messages are relayed using decentralized, trustless and censorship-resistant networks.
  • ๐Ÿ•‘ Messages on Waku are kept for ~30 days. Messages on IPFS are kept permanently. We hope to implement a way to delete messages when Web3.storage adds support for this in the future.

โš ๏ธ This is a beta project. Please be mindful of the information you share.

๐ŸŒ Hosted version

Debin can be found at https://debin.io, which is hosted on IPFS through Fleek.

๐Ÿ”จ Developing locally

It's easy to run this project locally to modify it or contribute.

  • Git clone this repository.
    git clone https://github.com/paolodamico/debin
    
  • Install Node (v16 recommended) via your favorite method and install dependencies (as shown below).
    yarn install
    
  • Start the server & automatic kea typegen generation (we use Kea for easier logic and state management).
    yarn start
    
  • Messages to IPFS are uploaded using a Cloudflare worker that connects to Web3.storage. To test IPFS upload too, you'll need to create your own ipfs-message-upload/wranger.toml file from wrangler.template.toml, be sure to set your own WEB3_STORAGE_TOKEN (which you can obtain from Web3.storage; this service is used to upload and pin files on IPFS). Do this in a separate console.
    cd ipfs-message-upload/
    cp wranger.template.toml wrangler.toml
    # edit wranger.toml now with your `WEB3_STORAGE_TOKEN`
    code wrangler.toml # or vi wrangler.toml ; or nano wrangler.toml
    wrangler dev
    l # to run the Cloudflare worker locally
    
  • Finally, update logics/ipfsLogic.ts and set IPFS_UPLOAD_RELAY to the localhost address where the worker is listening (e.g. http://localhost:8787).
  • You can find more information on the technologies used and conventions in the Technical docs.

๐Ÿš€ Deploying your own version

Deploying your own version is very easy. Using a serverless environment (e.g. Fleek, Netlify, Vercel) might be easiest.

IPFS relay service

  1. First of all, you'll need to sign up for a free Web3.storage account if you still haven't.
  2. Follow the instructions on developing locally to generate your own wranger.toml file. You can choose to use your own domain instead of Cloudflare's default (like we did, https://ipfs.debin.io) to host the IPFS relay service.
  3. Once you have your wrangler.toml file, you can deploy your worker using wrangler publish (remember to be in the /ipfs-message-upload folder). You can run this command any time you update your IPFS service or its configuration.

Frontend

  1. Update logics/ipfsLogic.ts and set IPFS_UPLOAD_RELAY to the location of your deployed IPFS relay service.
  2. Run the yarn build command to generate the production-ready files.
  3. Make only the files on the /build directory available in your installation, with index.html as the default.

debin's People

Contributors

paolodamico avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

defi-2022

debin's Issues

Consider moving to simple hash router

Currently we're using kea router (https://keajs.org/docs/plugins/router) which works great most of the time, but with IPFS we can't properly handle top level routing (see https://docs.fleek.co/hosting/troubleshooting/#my-single-page-application-spa-breaks-when-changing-routes-via-an-ipfs-gatway), this meant we had to introduce some ugly hack to support hash routing for the message retrieval. Instead, might be cleaner to move to a simple hash router instead and stop supporting normal routing.

Add social tags & special message on share links

It stands to reason that Debin messages will be shared in social platforms, particularly things like Slack or Discord. We should add a nice og:image to display there. Further, when sharing a specific message (i.e. https://debin.io/#/m[...]), we should change the description to something along the lines of "Someone is sharing a message with you through a web3 decentralized network".

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.