This template provides a quick way to set up a customized trading UI for Orderly Network brokers, built with Remix and deployable on GitHub Pages.
-
Fork the Repository
Fork this repository to your GitHub account to create your broker's UI.
-
Clone Your Fork
git clone https://github.com/YOUR_USERNAME/broker-template.git
cd broker-template
- Install Dependencies
yarn install
Edit the .env
file to set up your broker details:
VITE_ORDERLY_BROKER_ID=your_broker_id
VITE_ORDERLY_BROKER_NAME=Your Broker Name
VITE_ORDERLY_NETWORK_ID=mainnet # or testnet for testing
- Visit the Orderly Storybook Trading Page
- Customize your preferred theme using the controls
- Export the generated CSS
- Replace the contents of
app/styles/theme.css
with your exported CSS
Edit app/utils/config.tsx
to customize your UI:
- Footer Links: Update
footerProps
with your social media links - Logos: Replace the main and secondary logos in the
appIcons
section - PnL Sharing: Customize the PnL poster backgrounds and colors in
sharePnLConfig
Required assets:
- Place your logos in the
public
directory:- Main logo:
public/orderly-logo.svg
- Secondary logo:
public/orderly-logo-secondary.svg
- Favicon:
public/favicon.png
- Main logo:
- PnL sharing backgrounds:
public/pnl/poster_bg_[1-4].png
Run the development server:
yarn dev
- Build the application:
yarn build
- Base URL Configuration:
The base URL configuration depends on your deployment method:
-
For GitHub Pages subdirectory deployment (
https://your-username.github.io/broker-template/
): Keep the basename configuration invite.config.ts
:// vite.config.ts remix({ basename: "/your-repo-name", // Change this to match your repository name // ... other options })
-
For custom domain deployment (
https://your-domain.com
): Remove the basename configuration invite.config.ts
:// vite.config.ts remix({ // basename: "/your-repo-name", // Remove or comment out this line // ... other options })
- Deploy to GitHub Pages:
- Enable GitHub Pages in your repository settings
- Set the build and deployment source to branch (not GitHub Actions)
- Select the branch you want to deploy (typically
gh-pages
ormain
) - For custom domain setup, follow the GitHub Pages custom domain configuration guide