Go to file
zramsay b1c8f37f25
All checks were successful
Publish ApplicationRecord to Registry / cns_publish (push) Successful in 1m33s
trigger job
2024-03-05 12:11:49 -05:00
.github on push 2024-02-23 15:28:24 -05:00
.vscode Upgrade next (#100) 2023-02-24 09:47:27 +01:00
public feat: list DYDX (#815) 2024-02-16 08:58:12 +01:00
scripts fix copy pasta 2024-02-23 15:56:06 -05:00
src feat: list DYDX (#815) 2024-02-16 08:58:12 +01:00
.dockerignore v2.2.2 OS (#794) 2024-02-13 11:33:13 +01:00
.env.example feat: handle URLs with or without trailing slash (#803) (#804) 2024-02-14 11:16:06 +01:00
.eslintignore [task] add LTV to vault tables (#381) 2023-08-21 14:02:32 +03:00
.eslintrc.json feat: refactored the toast responses (#442) 2023-09-11 10:35:13 +02:00
.gitignore v2.2.2 OS (#794) 2024-02-13 11:33:13 +01:00
.prettierignore v2.0.1 (#579) 2023-10-24 16:41:40 +02:00
.prettierrc feat: refactored the toast responses (#442) 2023-09-11 10:35:13 +02:00
Dockerfile Docker update (#814) 2024-02-15 10:49:14 +01:00
entrypoint.sh v2.2.2 OS (#794) 2024-02-13 11:33:13 +01:00
generate_types.sh Withdraw assets from account (#43) 2022-11-07 16:36:12 +00:00
install_charting_library.js v2.2.2 OS (#794) 2024-02-13 11:33:13 +01:00
install_charting_library.sh v2.2.2 OS (#794) 2024-02-13 11:33:13 +01:00
install_dummy_charting_library.sh v2.2.2 OS (#794) 2024-02-13 11:33:13 +01:00
LICENSE v2.2.2 OS (#794) 2024-02-13 11:33:13 +01:00
next-config.patch Docker CI update (#802) 2024-02-13 21:17:57 +01:00
next.config.js v2.2.2 OS (#794) 2024-02-13 11:33:13 +01:00
package.json must add repo url to p.json 2024-02-23 15:52:58 -05:00
postcss.config.js initial setup wip 2022-09-02 15:30:58 +01:00
README.md trigger job 2024-03-05 12:11:49 -05:00
sentry.client.config.js WIP (#12) 2022-09-29 20:21:31 +01:00
sentry.properties sentry setup 2022-09-02 22:29:22 +01:00
sentry.server.config.js WIP (#12) 2022-09-29 20:21:31 +01:00
tailwind.config.js Morph summary (#763) 2024-02-06 10:05:42 +01:00
tsconfig.json Websocket implementation (#726) 2024-01-12 09:07:55 +01:00
vercel.json Env update (#113) 2023-03-09 10:26:16 +01:00
yarn.lock Main update (#801) 2024-02-13 17:30:04 +01:00

Mars Protocol v2 Outpost Frontend

ci

mars-banner-1200w

1. Web App

This project is a NextJS. React application.

The project utilises React hooks, functional components, Zustand for state management, and useSWR for general data fetching and management.

Styles are handled with Tailwind.

Typescript is added and utilised (but optional if you want to create .jsx or .tsx files).

2. Deployment

Start web server

yarn && yarn dev

2.1 Custom node endpoints using Docker

We allow the use of environment variables to be passed to the Docker container to specify custom endpoints for the app. The variables are:

Variable Description Default
URL_OSMOSIS_REST The Osmosis node REST endpoint to use https://lcd-osmosis.blockapsis.com
URL_OSMOSIS_RPC The Osmosis node RPC endpoint to use https://rpc-osmosis.blockapsis.com
WALLET_CONNECT_ID Your projects WalletConnect v2 ID 0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x

Sample Docker run command

This command will start the container in interactive mode with port 3000 bound to localhost and print logs to stdout.

docker run -it -p 3000:3000 \
      -e URL_OSMOSIS_REST=https://lcd-osmosis.blockapsis.com \
      -e URL_OSMOSIS_RPC=https://rpc-osmosis.blockapsis.com \
      -e WALLET_CONNECT_ID=0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x marsprotocol/interface:latest

2.2 Custom node endpoints using non-Docker deployments

Copy .env.example to .env and modify the values to suit your needs.

2.2.1 TradingView library

The Outpost UI has a TradingView implementation, to display charts for the listed assets.

TradingView only works on non-docker deployments (e.g. via vercel). As the docker image already has a fallback installed and can not be updated on docker run

If you are running the UI on a node based server, add the following environment variables to install TradingView.

CHARTING_LIBRARY_USERNAME=YOUR_GIT_USERNAME
CHARTING_LIBRARY_ACCESS_TOKEN=YOUR_TRADING_VIEW_ACCESS_TOKEN
CHARTING_LIBRARY_REPOSITORY=github.com/tradingview/charting_library/

NOTE: You'll also need to have an active TradingView license to obtain those credentials

4. Development practices

4.1 Data orchestration

Data is handled with a combination of container components, useSWR and a caching mechanism. API hooks are responsible for syncing the application state.

5. Contributing

We welcome and encourage contributions! Please create a pull request with as much information about the work you did and what your motivation/intention was.

6. License

Contents of this repository are open source under the Mars Protocol Web Application License Agreement.