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.
This monorepo includes the following packages/apps:
web
: a Next.js appconfig
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)tsconfig
:tsconfig.json
s used throughout the monorepodatabase
: stores additional metadata and user informationcontracts
: contains the smart contract for a betting market
Each package/app is in TypeScript. Contracts are written in Solidity.
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- shadcn/ui and Radix for customizable UI components
- NextAuth for user authentication
- RainbowKit for wallet connection
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 usehttp://localhost:3000
. -
Update
NEXT_PUBLIC_WALLET_CONNECT_ID
with your own Wallet Connect ID. You can get one for free here.
To build all apps and packages, run the following command:
yarn run build
To develop all apps and packages, run the following command:
yarn run dev