ShapeShift Web
npx skills add https://github.com/shapeshift/web --skill react-best-practicesInstall this skill with the CLI and start using the SKILL.md workflow in your workspace.
This project was bootstrapped with
Create React App.
ShapeShift's OSS 2nd generation Web application. (Under Development)
nvm or check .nvmrc for the version.If you are using Linux and macOS it works out of the box following these steps:
Clone the repo
On Windows, Windows Subsystem for Linux (WSL) is required. Make sure to store your clone of the repo on the WSL filesystem in order to avoid issues with line endings.
Please do not ask our Engineering team for further help with WSL.
Make sure you are using the right Node.js version. This can optionally be done using a version manager like nvm:
nvm use
Install OpenJDK.
On MacOS via homebrew
brew install javashould do the trick
if you have installedbrew install openapi-generator, it should be installed automatically.
Follow the commands to symlink the PATH for JDK & java
To verify a proper install and link check on thejava -versionand it should have openJDK versions displayed alongside java version.
Install Dependencies:
pnpm install
Use
pnpm install --frozen-lockfileinstead if you're setting up a CI pipeline or trying to duplicate a historical build.
Build Packages:
pnpm run build:packages
Other recommended configurations:
To use the .git-blame-ignore-revs file to ignore specific commits, update the project's git configuration by running:
git config --local blame.ignoreRevsFile .git-blame-ignore-revs
To run the app in the development mode:
pnpm run dev
It opens http://localhost:3000 to view it in the browser and the page will reload if you make edits.
Portless (optional): Install Portless globally (
npm i -g portless), thendev:webuses it automatically. The app is available athttp://<branch>.web.localhost:1355. Without Portless, usedev:web:localhostfor plainlocalhost:3000.You will also see any lint errors in the console.
To launch the test runner in interactive watch mode:
pnpm run test
See the section about running tests for more information.
It also creates an HTML page you can interact with at the root level of the project in
/coverage.
To build the app for production in the /build folder at the root level of the project:
MODE=production pnpm run build:web
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.
https://github.com/<username>/<fork name>/pull/new/<branch name>.)#engineering-prs in the Discorddevelop branch to get ready to start another task.The command pnpm run release helps to automate the release process.
Run the command and follow the prompts.
MixPanel is used for non-private deployments of the interface.
We have a test MixPanel environment for developing and testing. To use this, update the .env file to include:
VITE_MIXPANEL_TOKEN=dev-project-id
VITE_FEATURE_MIXPANEL=true
The MixPanel project UI will now show events from your local session.
Vite supports local environment variable files that are automatically excluded from Git. You can create these files following the patterns described in the Vite documentation.
Examples of supported file names:
.env.local (loaded in all environments).env.development.local (loaded only in development).env.production.local (loaded only in production)