-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from bosonprotocol/redemption-widget-documenta…
…tion chore: add redemption widget documentation
- Loading branch information
Showing
40 changed files
with
736 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,20 @@ | ||
# Getting Started with Create React App | ||
[![banner](docs/assets/banner.png)](https://bosonprotocol.io) | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
<h2 align="center">Boson Protocol Widgets</h2> | ||
|
||
## Available Scripts | ||
## Getting started | ||
|
||
In the project directory, you can run: | ||
- How tos & guides: | ||
- [Redemption Widget](./docs/redemption-widget.md) | ||
- Finance Widget | ||
- [Local development](docs/local-development.md) | ||
|
||
### `npm start` | ||
## Contributing | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
We welcome contributions! Until now, Boson Protocol has been largely worked on by a small dedicated team. However, the ultimate goal is for all of the Boson Protocol repositories to be fully owned by the community and contributors. Issues, pull requests, suggestions, and any sort of involvement are more than welcome. | ||
|
||
The page will reload if you make edits.\ | ||
You will also see any lint errors in the console. | ||
Questions and feedback are always welcome, we will use them to improve our offering. | ||
|
||
### `npm test` | ||
All PRs must pass all tests before being merged. | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `npm run build` | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `npm run eject` | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
|
||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. | ||
|
||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. | ||
|
||
## Learn More | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
By being in this community, you agree to the [Code of Conduct](/docs/code-of-conduct.md). Take a look at it, if you haven't already. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+537 KB
docs/assets/redemption-widget/6-redeem-confirmation-backend-interrupted.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+667 KB
docs/assets/redemption-widget/6-redeem-confirmation-backend-resume.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+621 KB
.../assets/redemption-widget/Redemption Widget - Marketplace Cancellation Flow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+854 KB
docs/assets/redemption-widget/Redemption Widget - Marketplace Redemption Flow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+623 KB
...get/Redemption Widget - Redemption Widget Flow with Callbacks (interrupted).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+797 KB
...dget/Redemption Widget - Redemption Widget Flow with callbacks (continuous).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
[![banner](./assets/banner.png)](https://bosonprotocol.io) | ||
|
||
< [Boson Protocol Widgets](../README.md) | ||
|
||
## Boson Protocol Environment | ||
|
||
Boson Protocol is deployed onto 3 public **environments**, to be used in different contexts, for different reasons and probably by different users: | ||
- ***testing*** is a development environment, very unstable by nature. Unless you're developing on Boson Protocol Components, you shouldn't use this environment. | ||
- ***staging*** is a validation environment, on testnet blockchain, specifically designed to test and discover the Boson Protocol Components without being on a real blockchain. | ||
- ***production*** is the production environment. Everything processed on this environment is **FOR REAL**. | ||
|
||
In addition, it's possible to deploy your own environment on your local machine. We call it the ***local*** environment. | ||
|
||
## Boson Protocol Configurations | ||
|
||
Each environment (except ***local***) is currently deployed on several configurations, corresponding to different blockchains. | ||
|
||
The dApps (Marketplace and Dispute Resolution Center) and widgets are able to switch between configurations of the same environment. | ||
|
||
The following table recaps all configurations, per environment | ||
|
||
<table> | ||
<tr><th>Environment</th><th></th></tr> | ||
<tr><td>production</td><td> | ||
<table> | ||
<tr><th>Configuration</th><th>Blockchain</th><th>Subgraph</th></tr> | ||
<tr><td>production-137-0 </td><td>Polygon</td><td>https://api.thegraph.com/subgraphs/name/bosonprotocol/polygon</td></tr> | ||
<tr><td>production-1-0 </td><td>Ethereum Mainnet</td><td>https://api.thegraph.com/subgraphs/name/bosonprotocol/ethereum</td></tr> | ||
</table> | ||
<table> | ||
<tr><th>dApps</th><th></th></tr> | ||
<tr><td>Marketplace</td><td>https://bosonapp.io</td></tr> | ||
<tr><td>Dispute Resolution Center</td><td>https://disputes.bosonprotocol.io</td></tr> | ||
</table> | ||
<table> | ||
<tr><th>Widgets</th><th></th></tr> | ||
<tr><td>Redemption</td><td>https://widgets.bosonprotocol.io/#/redeem</td></tr> | ||
<tr><td>Finance</td><td>https://widgets.bosonprotocol.io/#/finance</td></tr></table> | ||
</td></tr> | ||
<tr><td>staging</td><td> | ||
<table> | ||
<tr><th>Configuration</th><th>Blockchain</th><th>Subgraph</th></tr> | ||
<tr><td>staging-80001-0 </td><td>Polygon Mumbai (testnet)</td><td>https://api.thegraph.com/subgraphs/name/bosonprotocol/mumbai-staging</td></tr> | ||
<tr><td>staging-5-0 </td><td>Ethereum Goerli (testnet)</td><td>https://api.thegraph.com/subgraphs/name/bosonprotocol/goerli-staging</td></tr> | ||
</table> | ||
<table> | ||
<tr><th>dApps</th><th></th></tr> | ||
<tr><td>Marketplace</td><td>https://interface-staging.on.fleek.co</td></tr> | ||
<tr><td>Dispute Resolution Center</td><td>https://drcenter-staging.on.fleek.co/</td></tr> | ||
</table> | ||
<table> | ||
<tr><th>Widgets</th><th></th></tr> | ||
<tr><td>Redemption</td><td>https://widgets-staging.on.fleek.co/#/redeem</td></tr> | ||
<tr><td>Finance</td><td>https://widgets-staging.on.fleek.co/#/finance</td></tr></table> | ||
</td></tr> | ||
<tr><td>testing</td><td> | ||
<table> | ||
<tr><th>Configuration</th><th>Blockchain</th><th>Subgraph</th></tr> | ||
<tr><td>testing-80001-0</td><td>Polygon Mumbai (testnet)</td><td>https://api.thegraph.com/subgraphs/name/bosonprotocol/mumbai-testing</td></tr> | ||
<tr><td>testing-5-0 </td><td>Ethereum Goerli (testnet)</td><td>https://api.thegraph.com/subgraphs/name/bosonprotocol/goerli-testing</td></tr> | ||
</table> | ||
<table> | ||
<tr><th>dApps</th><th></th></tr> | ||
<tr><td>Marketplace</td><td>https://interface-test.on.fleek.co</td></tr> | ||
<tr><td>Dispute Resolution Center</td><td>https://drcenter-test.on.fleek.co/</td></tr> | ||
</table> | ||
<table> | ||
<tr><th>Widgets</th><th></th></tr> | ||
<tr><td>Redemption</td><td>https://widgets-test.on.fleek.co/#/redeem</td></tr> | ||
<tr><td>Finance</td><td>https://widgets-test.on.fleek.co/#/finance</td></tr></table> | ||
</td></tr> | ||
<tr><td>local</td><td> | ||
<table> | ||
<tr><th>Configuration</th><th>Blockchain</th><th>Subgraph</th></tr> | ||
<tr><td>local-31337-0 </td><td>local (testnet)</td><td>http://localhost:8000/subgraphs/name/boson/corecomponents/graphql</td></tr> | ||
</table> | ||
<table> | ||
<tr><th>dApps</th><th></th></tr> | ||
<tr><td>Marketplace</td><td>http://localhost:3333</td></tr> | ||
<tr><td>Dispute Resolution Center</td><td>http://localhost:3333</td></tr> | ||
</table> | ||
<table> | ||
<tr><th>Widgets</th><th></th></tr> | ||
<tr><td>Redemption</td><td>http://localhost:3000/#/redeem</td></tr> | ||
<tr><td>Finance</td><td>http://localhost:3000/#/finance</td></tr></table> | ||
</td></tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, religion, or sexual identity | ||
and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the | ||
overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at | ||
reports@bosonprotocol.io. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing | ||
clarity around the nature of the violation and an explanation of why the | ||
behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series | ||
of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No | ||
interaction with the people involved, including unsolicited interaction with | ||
those enforcing the Code of Conduct, for a specified period of time. This | ||
includes avoiding interactions in community spaces as well as external channels | ||
like social media. Violating these terms may lead to a temporary or | ||
permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including | ||
sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public | ||
communication with the community for a specified period of time. No public or | ||
private interaction with the people involved, including unsolicited interaction | ||
with those enforcing the Code of Conduct, is allowed during this period. | ||
Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community | ||
standards, including sustained inappropriate behavior, harassment of an | ||
individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within | ||
the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.0, available at | ||
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. | ||
|
||
Community Impact Guidelines were inspired by | ||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available | ||
at [https://www.contributor-covenant.org/translations][translations]. | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html | ||
[Mozilla CoC]: https://github.com/mozilla/diversity | ||
[FAQ]: https://www.contributor-covenant.org/faq | ||
[translations]: https://www.contributor-covenant.org/translations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[Boson Widgets docs](../README.md) | ||
|
||
# Local development | ||
|
||
> The following is targeting developers who want to set up this repository locally to contribute, test or just play around. | ||
## Contents | ||
|
||
- [Local development](#local-development) | ||
- [Contents](#contents) | ||
- [Prerequisites](#prerequisites) | ||
- [Local setup](#local-setup) | ||
- [Building](#building) | ||
- [Running locally](#running-locally) | ||
|
||
## Prerequisites | ||
|
||
- Node.js 16.X | ||
- npm 8.X | ||
|
||
## Local setup | ||
|
||
```bash | ||
# checkout repo | ||
git clone https://github.com/bosonprotocol/widgets.git | ||
|
||
# install deps | ||
cd widgets | ||
npm ci | ||
``` | ||
|
||
## Building | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
## Running locally | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
Oops, something went wrong.