Skip to content

πŸ¦„ Web app for consumers to explore, download, and publish data assets.

License

Notifications You must be signed in to change notification settings

sreejithuvt/pleuston

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

banner

Pleuston

banner

πŸ¦„ Web app for consumers to explore, download, and publish data assets.

Docker Build Status Build Status Codacy Badge js oceanprotocol css bigchaindb

Pleuston [ˈplustΙ™n]: organisms that live in the thin surface layer existing at the air-water interface of a body of water as their habitat


πŸ²πŸ¦‘ THERE BE DRAGONS AND SQUIDS. This is in alpha state and you can expect running into problems. If you run into them, please open up a new issue. πŸ¦‘πŸ²

Main issues right now:

  • assets can only be purchased if they're hosted in Azure storage account
  • orders screen is not fully working

Table of Contents


Features

This repository houses Pleuston, the reference web app for consumers to explore, download, and publish data assets within the Ocean Protocol network.

  • Connect to all required Ocean Protocol components: Keeper & Provider
  • Register and publish data assets
  • Explore, buy, and download data assets

Pleuston is a single page React app, initially bootstrapped with create-react-app, but ejected from it.

Prerequisites

  • Node.js >=8 <v10 (ursa won't compile on npm install with newer versions, see JoshKaufman/ursa#175)
  • npm
  • Ocean Protocol components

To start development with Pleuston you first have to get all the other Ocean Protocol components up and running.

ocean-components

The simplest way is to use our main docker-compose file from the 🐳 docker-images repository:

git clone git@github.com:oceanprotocol/docker-images.git
cd docker-images/

docker-compose --project-name=ocean up

This will start up all required components, but also an instance of Pleuston. To use your local Pleuston version in the Quick Start step, you have to stop the Pleuston Docker container from another Terminal window:

docker stop ocean_pleuston_1

# or find the right container name
docker ps

You now have a locally running Provider backend application exposed under http://localhost:5000.

Because of changing addresses during migration, you need to make sure the deployed contracts within the Docker containers from πŸ’§ keeper-contracts match the ones used in your local Pleuston development version.

git clone git@github.com:oceanprotocol/keeper-contracts.git
cd keeper-contracts/

npm i
truffle compile
truffle migrate --reset

Then link them up with npm so Pleuston will grab this local version instead of the package from npm.js:

npm link

After following these instructions, you have a running RPC client under http://localhost:8545 where all smart contracts required by Pleuston have been deployed to.

Quick Start

After the Pleuston Docker container from the above docker-compose step is shut down, you can start your local development version of Pleuston:

git clone git@github.com:oceanprotocol/pleuston.git
cd pleuston/

npm i
npm link @oceanprotocol/keeper-contracts
npm start

Note that you have to redo the keeper-contracts npm link every time you do a npm install in pleuston.

This should output a message as follows:

Compiled successfully!

You can now view @oceanprotocol/pleuston in the browser.

  Local:            http://localhost:3000/

You can inspect a full production build by creating it first, and then run a local web server on top of the build output, e.g. serve.

# create production build
npm run build

serve -s build/
# go to http://localhost:5000

Configuration

All required components to get Pleuston running are pre-configured and started with the above docker-compose command, and the web app is configured to connect to them.

If you want to change and run Pleuston against your own deployed components, head over to the config/ocean.js file and modify the respective values.

To run your application over SSL, set the scheme values in config/ocean.js to https:

module.exports = {
    keeperScheme: 'https',
    oceanScheme: 'https'
}

Code style

Code linting is setup with ESLint and stylelint following eslint-config-oceanprotocol and stylelint-config-bigchaindb.

There's a npm script setup which runs all linting tests:

npm run lint

Testing

Automatic tests are setup via Travis, executing npm test.

At the moment, besides linting tests, there's only one test checking if the whole app can be rendered.

License

Copyright 2018 Ocean Protocol Foundation Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

πŸ¦„ Web app for consumers to explore, download, and publish data assets.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 9