This repo houses the web application for Sommelier.finance, a platform for the finest liquidity management tools in DeFi.
- ๐ท Find our website at https://app.sommelier.finance
- ๐ฌ Join the Sommelier Finance channel on Telegram to chat with the community.
- ๐ Subscribe to Impermanent Loss Alerts generated by the Sommelier stack.
client
- the frontend interface for the Sommelier stack. Made with Create React App.deploy
- Scripts and tools for deployment on Sommelier infra (work in progress).server
- a Node.js Express server handling data querying and caching for the front end. No database - it's a stateless integration later.sommelier-types
- TypeScript types and other shared code between packages.workers
- Supporting workers and services to analyze and alert on changing market conditions.
- Cosmos - The Sommelier protocol is built on the Cosmos network - meaning faster transactions, lower fees, and a universe of interoperability.
- Uniswap - Sommelier began as a tool for LP positions on Uniswap. More AMM integrations are coming soon!
- The Graph - Sommelier uses a custom implementation of the Uniswap V2 Subgraph for indexing and query Uniswap event data.
- Infura - We use Infura as our Ethereum provider, with a roadmap for adding additional providers and redundancies on our backend.
- web3js - used for connecting to client wallets (e.g. Metamask) and transaction construction and signing.
Sommelier has a standard monorepo setup using Yarn Workspaces and Lerna. This allows one to run commands at the project root and apply that command to all packages.
To set up the app for local development:
git clone https://github.com/PeggyJV/il-loss-charts
cd il-loss-charts
yarn config set workspaces-experimental true # Use to enable yarn workspaces
yarn # Running 'yarn' once at workspace roots installs all dependencies for each package
### Local Development
# Requires a local redis server at port 6379
yarn dev # starts both express server and CRA webpack server in same shell, with re-compile on save for both server and client
### Building and Running
yarn build # builds each package
yarn prod # runs the server only, which serves the client bundle
### Linting
yarn lint # lints each package serially
Lerna infers package topology to ensure that all lint/build tasks run in the proper order based on inter-package dependencies.
The server
package uses OpenAPI for documentation. You can see compiled documentation at https://app.sommelier.finance/api/explorer/ or http://localhost:3001/api/explorer (when running locally).
The documentation source is at packages/server/src/docs/api.yml
. When adding a new API route, make sure to update this file. The server uses Express OpenAPI Validator so if your route is not correctly documented, it will not be validated correctly and will not work as expected.
You can see all TODOs for this repo in the Issues section. Feel free to submit any suggestion as an issue!