An open API service indexing awesome lists of open source software.

https://github.com/xmaysonnave/tiddlywiki-ipfs

IPFS with TiddlyWiki
https://github.com/xmaysonnave/tiddlywiki-ipfs

browser dapp ens ethereum ethersjs ipfs ipfs-companion ipfs-desktop javascript js-ipfs-http-client metamask nodejs tiddlywiki tiddlywiki-ipfs tiddlywiki-plugin

Last synced: about 1 month ago
JSON representation

IPFS with TiddlyWiki

Awesome Lists containing this project

README

        

IPFS with TiddyWiki

This [TiddlyWiki](https://tiddlywiki.com/) plugin aims to help users, editors and developers to manage their wikis on [IPFS](https://ipfs.io).



Blue Light




An ethical open source project


License: GPL v3


Covenant


Prettier







TravisCI


Snyk




Builds available on IPFS

This plugin provides the following features:

- Store `TiddlyWiki`'s and attachments on [IPFS](https://ipfs.io/)
- Access `TiddlyWiki`'s and attachments from [IPFS](https://ipfs.io/)
- Compress `TiddlyWiki`'s and attachments
- Encrypt, Decrypt and Sign `TiddlyWiki`'s and attachments
- Standford
- Ethereum
- [SHA-3](https://en.wikipedia.org/wiki/SHA-3)
- Import and Export
- Publish and Manage IPNS Keys and IPNS cids
- [Metamask](https://metamask.io) Ethereum wallets support
- Publish to [ENS](https://ens.domains)
- Share over [IPFS](https://ipfs.io/) `TiddlyWiki`'s [Tiddlers](https://tiddlywiki.com/#Tiddlers) and attachments

According to [Wikipedia](https://en.wikipedia.org/wiki/TiddlyWiki):

`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` enhances TiddlyWiki as a decentralized application (Đapps) who uses distributed computing systems:

- [IPFS](https://ipfs.io) is a decentralized storage network
- [Ethereum Smart Contracts](https://ethereum.org/learn/#smart-contracts) are decentralized applications

`IPFS with TiddlyWiki` has the following [ĐApp](https://en.wikipedia.org/wiki/Decentralized_application) characteristics:

- Open Source
- Decentralized
- Unhackable
- Unstoppable

## Using `IPFS with TiddlyWiki`

#### Latest `IPFS with TiddlyWiki` assets

- **\$:/boot/boot.js** [![Available on IPFS](/core/attachment/_ipfs_core_icons_ipfs.png)](https://tiddly.bluelightav.eth.link/tiddlywiki-ipfs/boot/latest-build/ 'Available on IPFS') [![Available on GitHub](/core/attachment/_ipfs_core_icons_github.png)](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/production/tiddlywiki-ipfs/boot/ 'Available on GitHub')
- **\$:/ipfs/documentation** [![Available on IPFS](/core/attachment/_ipfs_core_icons_ipfs.png)](https://tiddly.bluelightav.eth.link/tiddlywiki-ipfs/documentation/latest-build/ 'Available on IPFS') [![Available on GitHub](/core/attachment/_ipfs_core_icons_github.png)](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/production/tiddlywiki-ipfs/documentation/ 'Available on GitHub')
- **\$:/library/ipfs** [![Available on IPFS](/core/attachment/_ipfs_core_icons_ipfs.png)](https://tiddly.bluelightav.eth.link/tiddlywiki-ipfs/library/latest-build/ 'Available on IPFS') [![Available on GitHub](/core/attachment/_ipfs_core_icons_github.png)](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/production/tiddlywiki-ipfs/library/ 'Available on GitHub')
- **\$:/plugins/ipfs** [![Available on IPFS](/core/attachment/_ipfs_core_icons_ipfs.png)](https://tiddly.bluelightav.eth.link/tiddlywiki-ipfs/plugin/latest-build/ 'Available on IPFS') [![Available on GitHub](/core/attachment/_ipfs_core_icons_github.png)](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/production/tiddlywiki-ipfs/plugin/ 'Available on GitHub')

#### Latest `TiddlyWikis` editions

- **bluelightav.eth** [![Available on IPFS](/core/attachment/_ipfs_core_icons_ipfs.png)](https://tiddly.bluelightav.eth.link/editions/bluelightav/latest-build/ 'Available on IPFS') [![Available on GitHub](/core/attachment/_ipfs_core_icons_github.png)](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/production/editions/bluelightav/ 'Available on GitHub')
- **empty** [![empty](/core/attachment/_ipfs_core_icons_ipfs.png)](https://tiddly.bluelightav.eth.link/editions/empty/latest-build/ 'Available on IPFS') [![Available on GitHub](/core/attachment/_ipfs_core_icons_github.png)](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/production/editions/empty/ 'Available on GitHub')
- **tidlywiki.com** [![Available on IPFS](/core/attachment/_ipfs_core_icons_ipfs.png)](https://tiddly.bluelightav.eth.link/editions/tiddlywiki/latest-build/ 'Available on IPFS') [![Available on GitHub](/core/attachment/_ipfs_core_icons_github.png)](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/production/editions/tiddlywiki/ 'Available on GitHub')

### Release

- **\$:/ipfs/documentation** [![Resolve with ENS](/core/attachment/_ipfs_core_icons_ens.png)](https://bluelightav.eth/#IPFS%20Documentation 'Resolve with ENS') [![Resolve with DNS Link](/core/attachment/_ipfs_core_icons_dns.png)](https://bluelightav.eth.link/#IPFS%20Documentation 'Resolve with DNS Link')
- **\$:/plugins/ipfs** [![Resolve with ENS](/core/attachment/_ipfs_core_icons_ens.png)](https://bluelightav.eth/#%24%3A%2Fplugins%2Fipfs 'Resolve with ENS') [![Resolve with DNS Link](/core/attachment/_ipfs_core_icons_dns.png)](https://bluelightav.eth.link/#%24%3A%2Fplugins%2Fipfs 'Resolve with DNS Link')
- **bluelightav.eth** [![Resolve with ENS](/core/attachment/_ipfs_core_icons_ens.png)](https://bluelightav.eth 'Resolve with ENS') [![Resolve with DNS Link](/core/attachment/_ipfs_core_icons_dns.png)](https://bluelightav.eth.link 'Resolve with DNS Link')

### Recommended Plugins

- [Locator](https://bimlas.gitlab.io/tw5-locator/#%24%3A%2Fplugins%2Fbimlas%2Flocator)
- [Relink](https://flibbles.github.io/tw5-relink/#%24%3A%2Fplugins%2Fflibbles%2Frelink)

### 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](#developer-running)

To resolve **.eth** domains you need an [Ethereum](https://ethereum.org/) capable browser:

- Use [Metamask](https://metamask.io) as a browser extension or as an Android mobile application

To update [ENS](https://app.ens.domains/) domains you need an Ethereum wallet:

- Use [Metamask](https://metamask.io) as a browser extension or as an Android mobile application

To run a local IPFS node, you need:

- [IPFS Companion](https://ipfs-shipyard.github.io/ipfs-companion/)
- [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop)
- [IPFS Server](https://github.com/ipfs/go-ipfs)

More informations about IPFS:

- [IPFS](https://ipfs.io/)

Remarks:

**_EthDNS and EthLink_** [![EthDNS and EthLink](/core/attachment/_ipfs_core_icons_dns.png)](https://eth.link) are able to resolve [bluelightav.eth.link](https://bluelightav.eth.link) to IPFS.

#### Run a local IPFS node with IPFS Desktop

- [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop)

According to the `ipfs-desktop` [README.md](https://github.com/ipfs-shipyard/ipfs-desktop/blob/master/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

- [IPFS Companion for Chrome](https://chrome.google.com/webstore/detail/ipfs-companion/nibjojkomfdiaoajekhjakgkdhaomnch)
- [IPFS Companion for Firefox](https://addons.mozilla.org/fr/firefox/addon/ipfs-companion/)

According to the `ipfs-companion` [README.md](https://github.com/ipfs-shipyard/ipfs-companion/blob/master/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

- `Goerli`: Ethereum Test Network (PoA)
- `Mainnet`: Ethereum Main Network
- `Rinkeby`: Ethereum Test Network (PoA)
- `Ropsten`: Ethereum Test Network (PoW)

## Developer

Setup a nodejs environment to build tiddlywiki instances bundled with `IPFS with TiddlyWiki`.

### Environment

- [Babelify](https://www.npmjs.com/package/babelify)
- [Eruda](https://github.com/liriliri/eruda)
- [Ethers](https://github.com/ethers-io/ethers.js/)
- [IPFS Provider](https://github.com/ipfs-shipyard/ipfs-provider)
- [IPFS HTTP Client](https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client)
- [Mocha](https://mochajs.org/)
- [Node.js](https://nodejs.org/)
- [Snyk](https://github.com/snyk)
- [TiddyWiki5](https://www.npmjs.com/package/tiddlywiki)
- [Travis CI](https://travis-ci.com/)

#### Node.js

##### Resource

jsDelivr, A free CDN for Open Source:

Node Documentation:

Npm Repository:

SriHash:

Yarn Documentation:

##### Install

On Debian Buster we don't use the default Debian repositories or the Nodesource repositories.
We use [nvm](https://github.com/nvm-sh/nvm).

##### Setup

Follow the [nvm installation and update tutorial](https://github.com/nvm-sh/nvm#installation-and-update):

Current installation and update script:

```text
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
```

or

```text
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
```

As we are using [zsh](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH), here is an excerpt of our .zshrc

```text
# nvm initialization!
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_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
```

Check:

```text
nvm -v
0.38.0
```

This repository contains a [.nvmrc](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/.nvmrc) who describes the node version to use.

```text
v16
```

Install the recommended `node` version.

```text
nvm install v16
```

Check:

```text
node -v
v16.2.0
```

```text
npm -v
v7.13.0
```

Install `yarn`.

On Debian setup the `yarn` repository:

```text
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
```

As we are using `nvm`, we avoid the `node` installation:

```text
sudo apt update
sudo apt install --no-install-recommends yarn
```

Or Upgrade `yarn`.

```text
yarn set version latest
```

Check your environment:

```text
yarn -v
1.22.10
```

#### Repository install

Clone this repository in a local folder, the following command pulls the main branch:

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

Change directory:

```text
cd tiddlywiki-ipfs
```

Install dependencies, [Node.js](https://nodejs.org/) should be installed and setup:

```text
yarn
```

#### Building TiddlyWiki

The repository contains several scripts who build TiddWiki instances bundled with `IPFS with TiddlyWiki`.

The [package.json](https://github.com/xmaysonnave/tiddlywiki-ipfs/tree/main/package.json) references several options:

- build
- build-bluelightav
- build-tiddlywiki-ipfs
- download
- precommit
- prepare
- prettier-standard
- publisher
- semver
- snyk-monitor
- snyk-protect
- test
- testc
- testw
- tiddlywiki-ipfs
- updater
- uploader
- upload-tree

Use the `build` script to build `IPFS with TiddlyWiki`.

```text
yarn build
```

Use the `test` script to run the tests.

```text
yarn test
```

This project is integrated with Travis CI:

-

## Contributor Covenant Code of Conduct

Please read [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for details on our code of conduct.

## Authors

- **Xavier Maysonnave** - _Initial work_ - [IPFS with TiddlyWiki](https://github.com/xmaysonnave/tiddlywiki-ipfs)

See also the list of [contributors](https://github.com/xmaysonnave/tiddlywiki-ipfs/contributors) who participated in this project.

## License

This project is licensed under the [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html) - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Hat tip to anyone who support this project
- Inspiration