Skip to content
Ipfs with TiddlyWiki
HTML JavaScript
Branch: master
Clone or download
xmaysonnave tiddler refactoring
export to ipns and ens preliminary support
Latest commit ccde540 Jan 23, 2020

README.md

IPFS with TiddyWiki

IPFS with TiddyWiki is a TiddlyWiki plugin who aims to help users, editors and developers to save their wikis and attachments over IPFS.

This plugin provides the following features:

According to TiddlyWiki Wikipedia:

TiddlyWiki is a personal wiki and a non-linear notebook for organising and sharing complex information. It is an open-source single page application wiki in the form of a single HTML file that includes CSS, JavaScript, and the content. It is designed to be easy to customize and re-shape depending on application. It facilitates re-use of content by dividing it into small pieces called Tiddlers.

IPFS with TiddlyWiki is a decentralized application (Đapps) who uses distributed computing systems:

IPFS with TiddlyWiki has the following (ĐApp) characteristics:

  • Open Source
  • Privacy
  • Unstoppable
  • Transparency

Using IPFS with TiddlyWiki:

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

Users

Getting running IPFS with TiddlyWiki in your browser

Starting from the file system, Follow the developer instructions Running TiddlyWiki

Remarks:

EthDNS and EthLink take care of https://bluelightav.eth.link.

https://bluelightav.eth.link requires IPFS Companion to be fully resolved as an IPNS identifier.

If you don't need or don't want to interact with ENS or install IPFS Companion https://bluelightav.eth.link is enough to interact with IPFS.

Run a local IPFS node with IPFS Desktop

According to the ipfs-desktop README.md, IPFS Desktop allows you to run your IPFS Node on your machine without having to bother with command line tools.

Use a browser extension with IPFS Companion

According to the ipfs-companion README.md, This add-on enables everyone to access IPFS resources the way they were meant: from locally running IPFS node :-).

Supported ENS Ethereum Networks

  • 'Mainnet': Ethereum Main Network
  • 'Ropsten': Ethereum Test Network (PoW)
  • 'Rinkeby': Ethereum Test Network (PoA)
  • 'Goerli': Ethereum Test Network (PoA)

Developer

We setup a nodejs environment to build a tiddlywiki instance bundled with IPFS with TiddlyWiki.

Environment

Node.js

Resource

Official Node documentation: https://nodejs.org/en/docs/

Official npm repository https://www.npmjs.com/

Install

On Debian buster we don't use the default Debian repositories or the Nodesource repositories. We recommend nvm for its flexibility.

Setup

Follow the nvm installation tutorial.

As we are using zsh, here is an excerpt of our .zshrc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
  local node_version="$(nvm version)"
  local nvmrc_path="$(nvm_find_nvmrc)"

  if [ -n "$nvmrc_path" ]; then
    local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")

    if [ "$nvmrc_node_version" = "N/A" ]; then
      nvm install
    elif [ "$nvmrc_node_version" != "$node_version" ]; then
      nvm use
    fi
  elif [ "$node_version" != "$(nvm version default)" ]; then
    echo "Reverting to nvm default version"
    nvm use default
  fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc

This repository contains a .nvmrc who describes the node version to use.

v10.17.0

Install the recommended version.

nvm install v10.17.0

Check:

node -v
v10.17.0

We update npm to use the latest:

npm install -g npm@latest
npm -v
6.13.4

At this stage your global environment should look like this:

npm -g ls --depth=0
/home/user/.nvm/versions/node/v10.17.0/lib
└── npm@6.13.4

Repository install

Clone this repository in a local folder:

git clone https://github.com/xmaysonnave/tiddlywiki-ipfs --depth 1

Change directory:

cd tiddlywiki-ipfs

Install dependencies, Node.js should be installed and setup:

npm install

Building TiddlyWiki

The repository contains several scripts who build TiddWiki instances bundled with IPFS with TiddlyWiki. The package.json references several options:

  • build-all-noclone
  • build-all
  • build-tiddlywiki-ipfs-dev
  • build-tiddlywiki-ipfs
  • run-build-number
  • run-browserify
  • run-prepare-clone
  • run-prepare
  • test
  • test-no-build

Use the build-all script to build IPFS with TiddlyWiki and the wiki directory will contain two runnable wikis:

  • index.html (production)
  • dev.html (non-minified)

Running TiddlyWiki

Open wiki/index.html file in your favorite browser.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GPL-3.0-or-later - see the LICENSE file for details.

Acknowledgments

  • Hat tip to anyone who support this project
  • Inspiration
You can’t perform that action at this time.