Code Monkey home page Code Monkey logo

ipfs-share-files's Introduction

IPFS Share Files

IPFS Share Files

js-standard-style

Share files via IPFS

Lead Maintainer

Diogo Silva

Table of Contents

Background

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.

Install

With [email protected] and [email protected] or greater installed, run:

> npm install

Usage

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

IPFS Daemon

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 {}

Lint

To validate the code using StandardJS run:

> npm run lint

Build

To build the app for production to the build folder:

> npm run build

Deploy

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.

Translations

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!

How to sync translations

  1. Install and set up the command-line client (tx)
  2. 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

How to add or update keys

  1. Make sure you have the latest files from Transifex with tx pull -a
  2. Only change the source file (public/locales/en/translation.json)
  3. 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.

Contribute

Feel free to dive in! Open an issue or submit PRs.

To contribute to IPFS in general, see the contributing guide.

License

MIT

ipfs-share-files's People

Contributors

fsdiogo avatar hacdias avatar lidel avatar olizilla avatar

Watchers

James Cloos avatar  avatar

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.