Share files via IPFS
The IPFS Share Files
is a work-in-progress. It is part of the wider IPFS GUI project.
The app uses ipfs-redux-bundle to connect to IPFS via multiple providers. An instance of js-ipfs
is created if no provider is available.
This app is built with create-react-app
. Please read the docs.
With node@8.12
and npm@6.4.1
or greater installed, run:
> npm install
To run the app in development mode:
> npm run start
# Go to http://localhost:3000
To run the storybook:
> npm run storybook
# Go to http://localhost:9009
Optionally you may have a local IPFS daemon running:
> ipfs daemon
# API server listening on /ip4/127.0.0.1/tcp/5001
You must configure your IPFS API to allow cross-origin (CORS) requests from you development server and the share.ipfs.io domain.
You can either run the cors-config.sh script:
> ./cors-config.sh
Or do it manually:
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://localhost:3000", "https://share.ipfs.io"]'
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
To reset the config to its default state run:
> ipfs config --json API.HTTPHeaders {}
To validate the code using StandardJS run:
> npm run lint
To build the app for production to the build
folder:
> npm run build
We use Jenkins for automatic deployments. When a branch gets merged to master
, it's deployed to share.ipfs.io. When merged to develop
, it goes to dev.share.ipfs.io.
We use Transifex to help us translate IPFS Share Files. The translations are stored on public/locales
and the English version is the source of truth.
If want to contribute, go to the project page on Transifex, create an account, pick a language and start translating!
- Install and set up the command-line client (
tx
) - Download new translations from Transifex with
tx pull -a
- this creates/updates the files in
public/locales/*
that need to be committed - if a new language is created, remember to add it to
src/i18n.js
- this creates/updates the files in
- Make sure you have the latest files from Transifex with
tx pull -a
- Only change the source file (
public/locales/en/translation.json
) - Commit your changes
- changes from the master branch are fetched by Transifex automatically
For more info on our i18n process at IPFS, check out ipfs/i18n.
Feel free to dive in! Open an issue or submit PRs.
To contribute to IPFS in general, see the contributing guide.