🧜‍♀️ THE Data Market
Go to file
Matthias Kretschmann 18fa4dd2bc
package updates
2020-10-09 21:29:15 +02:00
.github refactor for Gatsby, update all the things 2020-06-30 11:28:49 +02:00
.storybook fix storybook typography display 2020-07-13 23:48:19 +02:00
content new publish feedback UX 2020-10-05 15:03:21 +02:00
gatsby copy, move terms file 2020-07-17 15:16:00 +02:00
src output total pool liquidity 2020-10-08 17:56:26 +02:00
tests/unit lint fix 2020-10-05 12:29:50 +02:00
.env.example make metadataStoreUri part of app config 2020-09-11 16:34:13 +02:00
.eslintrc add eslint-plugin-react-hooks 2020-09-16 11:08:35 +02:00
.gitignore files input props fixes 2020-07-13 11:19:11 +02:00
.prettierrc make Gatsby start 2020-06-30 13:32:16 +02:00
.travis.yml disable test running on Travis for now 2020-07-08 18:07:34 +02:00
LICENSE first commit 2020-05-07 09:03:30 +03:00
README.md master → main 2020-07-29 18:27:04 +02:00
app.config.js make metadataStoreUri part of app config 2020-09-11 16:34:13 +02:00
gatsby-browser.js add providers with wrapRootElement 2020-07-01 18:57:10 +02:00
gatsby-config.js fixes 2020-08-11 08:44:31 +02:00
gatsby-node.js fix for being able to use `npm link` with @oceanprotocol/react 2020-07-30 20:33:51 +02:00
gatsby-ssr.js add providers with wrapRootElement 2020-07-01 18:57:10 +02:00
package-lock.json package updates 2020-10-09 21:29:15 +02:00
package.json package updates 2020-10-09 21:29:15 +02:00
tsconfig.json set baseUrl 2020-10-01 17:24:43 +02:00
vercel.json set Vercel rewrites 2020-09-14 16:44:10 +02:00

README.md

banner

Ocean Marketplace

Build Status Vercel deployment Maintainability Test Coverage js oceanprotocol

Table of Contents

🏄 Get Started

The app is a React app built with Gatsby.js + TypeScript + CSS modules and will connect to Ocean components in Rinkeby by default.

To start local development:

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

npm install
npm start

This will start the development server under http://localhost:8000.

To explore the generated GraphQL data structure fire up the accompanying GraphiQL IDE under http://localhost:8000/__graphql.

Local components with Barge

If you prefer to connect to locally running components instead of remote connections, you can spin up barge and use a local Ganache network in another terminal before running npm start:

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

# use v3 branch for the time being
git checkout v3

# startup with local Ganache node
./start_ocean.sh

Finally, set environment variables to use this local connection in .env in the app:

# modify env variables, Rinkeby is enabled by default when using those files
cp .env.example .env

🦑 Environment variables

The app.config.js file is setup to prioritize environment variables for setting each Ocean component endpoint. By setting environment variables, you can easily switch between Ocean networks the app connects to, without directly modifying app.config.js.

For local development, you can use a .env file:

# modify env variables, Rinkeby is enabled by default when using those files
cp .env.example .env

🎨 Storybook

Storybook is set up for this project and is used for UI development of components. Stories are created inside src/components/ alongside each component in the form of ComponentName.stories.tsx.

To run the Storybook server, execute in your Terminal:

npm run storybook

This will launch the Storybook UI with all stories loaded under localhost:4000.

Code Style

For linting and auto-formatting you can use from the root of the project:

# lint all js with eslint
npm run lint

# auto format all js & css with prettier, taking all configs into account
npm run format

👩‍🔬 Testing

Test suite for unit tests is setup with Jest as a test runner and:

To run all linting and unit tests:

npm test

For local development, you can start the test runner in a watch mode.

npm run test:watch

For analyzing the generated JavaScript bundle sizes you can use:

npm run analyze

🛳 Production

To create a production build, run from the root of the project:

npm run build
# serve production build
npm run serve

⬆️ Deployment

Every branch or Pull Request is automatically deployed by Vercel with their GitHub integration. A link to a deployment will appear under each Pull Request.

The latest deployment of the main branch is automatically aliased to market-six.now.sh.

Manual Deployment

If needed, app can be deployed manually to Vercel. Make sure to switch to Ocean Protocol org before deploying:

# first run
vercel login
vercel switch

# deploy
vercel
# switch alias to new deployment
vercel alias

🏗 Ocean Protocol Infrastructure

The following Metadata Store & Provider instances specifically for marketplace are deployed in Ocean Protocol's AWS K8:

Rinkeby (Staging)

  • K8 namespace: xxx
  • [aquarius.rinkeby.v3.dev-ocean.com](https://aquarius.rinkeby.v3.dev-ocean.com)
  • [provider.rinkeby.v3.dev-ocean.com](https://provider.rinkeby.v3.dev-ocean.com)

Edit command with kubectl, e.g.:

kubectl edit deployment -n xxx aquarius

Main (Production)

  • K8 namespace: xxx
  • xxx
  • xxx

Edit command with kubectl, e.g.:

kubectl edit deployment -n xxx aquarius

🏛 License

Copyright 2020 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.