Code Monkey home page Code Monkey logo

il-loss-charts's Introduction

Sommelier.finance

This repo houses the web application for Sommelier.finance, a platform for the finest liquidity management tools in DeFi.

Packages

  • 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.

Ecosystem Dependencies

  • 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.

Setup

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.

API Documentation

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.

TODOs

You can see all TODOs for this repo in the Issues section. Feel free to submit any suggestion as an issue!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.