web
web copied to clipboard
ShapeShift Web
ShapeShift DAO Web Interface
This project was bootstrapped with Create React App.
ShapeShift's OSS 2nd generation Web application. (Under Development)
Table Of Contents
- Helpful Docs
- Resources
- Dependencies
- Developer Onboarding
- Commands
- Linking local dependencies
Helpful Docs
- Architecture
- File Structure
- Folder Structure
- Globally Shared Code
- State Management
- Styles
- Testing
- Conventional Commits
Resources
Dependencies
Quick Start
If you are using Linux and MacOS it works out of the box following the steps.
⚠️ On Windows you should use the Windows Subsystem for Linux (WSL).
-
Clone the repo
-
(optional) Make sure you're using the right Node.js version.
nvm use -
Install Dependencies:
# This is short for `yarn install`; be sure to use `yarn install --frozen-lockfile` instead if you're setting up a CI pipeline or trying to duplicate a historical build. yarn -
Run
yarn env devto generate a.envfile
Commands
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
yarn dev
Launches the test runner in the interactive watch mode.
See the section
about
running tests
for more information.
It also creates a html page you can interact with at the root level of the project in /coverage.
yarn test
Starts Cypress E2E testing with GUI.
yarn test:cypress
Or run Cypress headless
test:cypress:headless
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 for more information.
yarn build
Runs the component documentation.
Open
http://localhost:6006 to view it in the browser.
yarn storybook
Linking
If you're developing locally in this web repository, and need to make changes affecting packages in lib
or unchained (backend), use the following steps to link packages locally for developing.
If your changes only touch web these steps are unnecessary.
Initial, one-off setup:
- Clone the
librepo,cdinto it, and runyarn build - From
lib, runyarn link - Clone
unchained,cdinto it, and runyarn build - From
unchained,cd packages/clientandyarn link, then do the same frompackages/parser
When working in web, and using local changes in lib or unchained:
- Run
yarn link-packagesinwebto use local versions oflibandunchained- now yourweb's chain-adapters have a symlink to yourlib's. yarn show-linked-packageswill show what's currently linked- Once you're done developing locally, run
yarn unlink-packagesto use published upstream versions
Developer Onboarding
- Create a pull request on GitHub. (You can do this at
https://github.com/<username>/<fork name>/pull/new/<branch name>.) - Ensure you've followed the guidelines in CONTRIBUTING.md; in particular, make sure that the title of your PR conforms to the Conventional Commits format.
- Post a link to your new pull request in
#engineering-prsin the Discord - (optional) Return to the
developbranch to get ready to start another task.
Releases
The command yarn release helps to automate the release process.
Run the command and follow the prompts.