Skip to content

natedemoss/papermarket

Repository files navigation

PaperMarket

PaperMarket

CURRENTLY DOWN DUE TO BACKEND SERVER COSTS

Trade on real-world events with free play money. No risk, pure strategy.

papermarket-web.vercel.app



PaperMarket



Markets Leaderboard


PaperMarket is a paper-trading prediction market platform built on live data from Polymarket. Every account starts with $1,000 in play money to trade on politics, crypto, sports, tech, and more. Markets sync every 10 minutes — probabilities are always real.


Features

Live Markets Synced from Polymarket every 10 minutes across all categories
Paper Trading $1,000 free starting balance, no real money involved
Price Impact Each trade shifts the market probability in real time
Portfolio Track open positions, P&L, and full trade history
Leaderboard Global ranking by portfolio value
Auth Email/password and Google OAuth sign-in
Admin Panel Resolve markets, adjust balances, sync market data

Stack

Layer Technology
Frontend React 18, TypeScript, Tailwind CSS, Vite
Backend Node.js, Express, Prisma ORM
Database PostgreSQL
Auth JWT + Google OAuth 2.0
Data Polymarket Gamma API
Hosting Vercel (web), Railway (API + database)

Local Development

Prerequisites: Docker Desktop, Node.js 18+

1. Clone the repo

git clone https://github.com/natedemoss/papermarket.git
cd papermarket

2. Configure environment

cp .env.example .env

Fill in JWT_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and ADMIN_PASSWORD.

3. Start services

docker-compose build
docker-compose up -d

4. Initialize the database

docker exec papermarket-api npx prisma db push \
  --schema /app/apps/api/prisma/schema.prisma --accept-data-loss

docker exec papermarket-api node prisma/seed.js

5. Open http://localhost:3000


Environment Variables

Variable Description
DATABASE_URL PostgreSQL connection string
JWT_SECRET Secret used to sign JWT tokens
GOOGLE_CLIENT_ID Google OAuth app client ID
GOOGLE_CLIENT_SECRET Google OAuth app client secret
GOOGLE_CALLBACK_URL Absolute URL for the OAuth callback route
FRONTEND_URL Frontend origin (used for CORS and redirects)
ADMIN_EMAIL Email address for the admin account
ADMIN_PASSWORD Password for the admin account
POLYMARKET_SYNC_ENABLED Set to true to enable automatic market sync

How Payouts Work

When you buy YES at 34¢ you receive shares priced at that probability. If the market resolves YES, your payout is calculated from your average entry price — not the price at resolution. Early bettors are rewarded for conviction.


Data sourced from Polymarket

About

Paper-Trading prediction market

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors