/dpm

Monorepo for a Decentralized Prediction Market web app with the following features:

Primary LanguageTypeScript

DPM - TBW Decentralized Prediction Market

Monorepo for a Decentralized Prediction Market web app with the following features:

  • Create a prediction market
  • Buy and sell shares of a prediction market

You can try out the app at here.

What's inside?

This monorepo includes the following packages/apps:

Apps and Packages

  • web: a Next.js app
  • config: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • tsconfig: tsconfig.jsons used throughout the monorepo
  • database: stores additional metadata and user information
  • contracts: contains the smart contract for a betting market

Each package/app is in TypeScript. Contracts are written in Solidity.

Utilities

Development

Web App Setup

To run the web app, you will need to copy the packages/web/.env.template file to packages/web/.env in order for the app to have the necessary environment variables to run.

cp packages/web/.env.template packages/web/.env

Update the following environment variables in your new .env file:

  • Update the NEXTAUTH_URL in your .env to match the URL of your web app. If you are running locally, you can use http://localhost:3000.

  • Update NEXT_PUBLIC_WALLET_CONNECT_ID with your own Wallet Connect ID. You can get one for free here.

Build

To build all apps and packages, run the following command:

yarn run build

Develop

To develop all apps and packages, run the following command:

yarn run dev