WARNING:
FileTribe is still in pre-alpha state. Do NOT use it for storing or sharing sensitive data. All branches are highly unstable.
FileTribe
FileTribe is a blockchain-based decentralized file-sharing and editing system built on Ethereum and IPFS.
Contract address of the development version on Ropsten: 0xa53336064E1c14a6a9c0a612Fe445d201a1982DE
Dependency
In order to use FileTribe, you will need a running IPFS daemon. To install IPFS, download it and then run
$ tar xvfz go-ipfs.tar.gz
$ cd go-ipfs
$ ./install.sh
For more information see here. You also need go-ethereum's abigen, which is bundled
into the basic ethereum package.
$ apt-get install ethereum
Alternately you can build it as well. For more information on that see here.
Building the sources
To successfully build the FileTribe client application, you need Go (v1.10 <=) and Truffle. To install Truffle, run
$ npm install -g truffle
. For more information on installing Truffle, see here. If both dependencies are installed, run
$ make all
This will download the Go dependencies, compile the solidity sources and create Go bindings to them. Note that you may have to use make in sudo
mode since go-ethereum's abigen might fail when trying to resolve the dependencies of the generated Go files.
Getting started
An unsafe developer version of FileTribe is deployed on the Ropsten test network. The default config.json
contains the necessary information to reach that application.
-
To use FileTribe you need to edit $HOME/.filetribe/config.json
to include your mnemonic that generates your ethereum account. If you do not have any, you can generate one
using an online mnemonic generator or by using MetaMask.
"EthAccountMnemonic": "your own long nice menmonic...",
-
To perform contract method calls you will need some ether
. Use a faucet, like the one hosted by MetaMask
to acquire ether.
-
Navigate to MetaMask's Test Ether Faucet.
-
Connect to the Ropsten Test Network using MetaMask.
-
The faucet will link to your first account. Click "Request 1 Ether From Faucet"
to submit your request.
-
Within a short period of time, your account will be populated with the requested ether.
Note, that FileTribe client uses Infura to use the blockchain application by default. If you want it to use your own
specific Ethereum node or you deployed your own version of FileTribe and you want to use
that contract, you can set these in the config.json
file.
Start IPFS daemon
FileTribe uses IPFS as its data storage layer so the client needs an IPFS daemon which it can talk to. The clients communicate with each other through the IPFS daemon's built in libp2p service which has to be enabled explicitly.
$ ipfs init
$ ipfs daemon --enable-pubsub-experiment </dev/null &>/dev/null &
$ ipfs config --json Experimental.Libp2pStreamMounting true
Start the client application
You can configure the FileTribe daemon with $HOME/.filetribe/config.json
. If you have a running Ethereum network, on which the FileTribe contracts were deployed and an IPFS daemon you can start the client:
$ filetribe daemon
Now that you have a running filetribe daemon you can start interacting with it. Since most of the operations you perform
will result in a contract method call on the blockchain, these operations will not come into force in an instant.
You can check your pending transactions by executing filetribe ls -tx
and lookup the results on Etherscan's Ropsten part.
-
Sign up
Execute
$filetribe signup <username>
to sign up and wait for the blockchain transaction to complete.
After successfully signe up, a filetribe/<usnername>
directory should appear in your $HOME
directory.
-
Create a group
Execute
$filetribe group create <groupname>
to create a group. As usually, wait for the transaction to complete.
After it is done, the directory $HOME/filetribe/<username>/<groupname>
should appear.
This will be the group's repository. You can share your files with your group by copying them into this folder.
-
Invite others
You can invite other users by executing
$ filetribe group invite <groupaddress> <other user's filetribe account address>
-
Commit changes
Do not forget to commit your changes, as your file shares/modifications will be visible to
your group mates only if you have committed them. Execute
$ filetribe group repo commit <groupaddress>
Usage
$ filetribe --help
FileTribe
USAGE:
filetribe <command> ...
COMMANDS:
BASIC COMMANDS:
signup <username> Sign up to FileTribe
ls {-g|-i|-tx} List groups, pending invitations or pending Ethereum transactions
daemon Start a running client daemon process (configured from $HOME/.filetribe/config.json)
group Interact with groups
GROUP COMMANDS:
create <groupname> Create a group
invite <group address> <invitee address> Invite a new member to the given group
leave <group address> Leave the given group
ls <group address> List group members
repo ... Interact with the group repository
REPO COMMANDS:
ls <group address> List files
commit <group address> Commit the pending changes in the repository
grant <group address> <file> <member> Grant write access for the given file to the given user
revoke <group address> <file> <member> Revoke write access for the given file to the given user
CONFIG.JSON OPTIONS:
APIAddress Address on which the daemon will be listening
IpfsAPIAddress http address of a running IPFS daemon's API
EthFullNodeAddress websocket address of an Ethereum full node
EthAccountMnemonic Mnemonic that generates your Ethereum account
EthAccountPasswordFilePath Path to the password file of the corresponding Ethereum account
FileTribeDAppAddress Address of the FileTribeDApp contract
LogLevel {INFO|WARNING|ERROR} Level of logs that will be printed to stdout
OPTIONS:
-h --help Show this screen
License
FileTribe is licensed under the GNU General Public License v3.0, also found in the COPYING
file in the root of the repository.
Used libraries
The licenses of all the above mentioned libraries are included in the COPYING.3RD-PARTY
in the root of the repository.