Git Product home page Git Product logo

dex-backend's Introduction

Beethoven X Backend

Contributions

Project setup

Prepare .env file

Run cp env.local .env

For the sanity content to work, you need to set the SANITY_API_TOKEN.

Generate gql types

There are 2 kinds of graphql types to generate. We have types for interacting with the different subgraphs, and the types for our exposed graphql api schema. Run yarn generate to generate all gql types

Setup database & Prisma

Start docker container (or manually set up your database)

First we need to spin up the database, there is a docker-compose file with a postgres database configured. Spin it up by running docker-compose up -d.

Apply prisma migrations

Run yarn prisma migrate dev to apply all database migrations.

Generate prisma client

Run yarn prisma generate to generate the prisma client. Usually this is already done by applying the migrations

Run mutations to initialize fill database with intial data

Trigger the following mutations when you start from a clean DB:

poolSyncAllPoolsFromSubgraph
poolReloadStakingForAllPools
userInitWalletBalancesForAllPools
userInitStakedBalances

Branching and deployment environments

We run a canary and a production (called main) deployment environment. The canary environment is built from the v2-canary branch and the production deployment is built from the v2-main branch. The environments can be accessed through the following links:

https://backend-v2.beets-ftm-node.com/graphql

https://backend-v2-canary.beets-ftm-node.com/graphql

https://backend-optimism-v2.beets-ftm-node.com/graphql

https://backend-optimism-v2-canary.beets-ftm-node.com/graphql

Contributing

We follow the model of gitflow using the following naming for branches:

  • main: v2-main
  • development: v2-canary
  • feature: feature/*
  • release: release/*
  • hotfix: hf/*

To contribute, branch from v2-canary (which is our development branch) and open a PR against v2-canary once the feature is complete. It will be reviewed and eventually merged into v2-canary.

dex-backend's People

Contributors

danielmkm avatar franzns avatar 0xskly avatar mikemcdonald avatar alter-eggo avatar

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.