Giter Site home page Giter Site logo

ipfs-frontend's Introduction

ipfs-frontend

IPFS Front-end application of the Melon portal.

Installation

  1. Clone this repository

    git clone [email protected]:melonproject/ipfs-frontend.git
    cd ipfs-frontend
    
    
  2. Install dependencies:

    npm install
    

Getting started

After installation is complete

Go to the above ipfs-frontend directory, open a terminal and launch the react application:

npm start

Build

npm run-script build

Ipfs deployment

Build the react application:

npm build

React-script will create automatically the /build directory with a /static folder containing the .js and .css files. Since ipfs cannot handle relative paths, we need to get rid of the static folder and move all the files in the subfolders to the build directory. Next, change all the references of the files in index.html.

With the ipfs daemon running, deploy the app:

ipfs add -r build

Architecture

The whole source code can be found in /src. The main architectural patterns are coming from:

Here is a quick overview and description of the subfolders of /src:

/ Root

The main entry point is here: index.js

/actions

Redux actions and creators. Each file exports { types, actions }.

As a rule of thumb, we write imperative actions for user interactions: E.g. SHOW_MESSAGE_BOX or SHOW_ERROR. And reactive actions for blockchain observations: HAS_CONNECTED, NEW_BLOCK, ...

/components

Stateless, functional components.

/config

Store, router and other configuration.

/containers

Connected & composed components. See react-redux.

/reducers

Redux reducers.

/sagas

Redux sagas

https://redux.js.org/docs/basics/Actions.htm

ipfs-frontend's People

Contributors

schmidsi avatar jennazenk avatar ferranbt avatar thepriefy 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.