A full-stack prediction platform for Polymarket with web client, mobile app support, and secure Express backend.
polyfield-app/
├── client/ # React Web Client (Vite + TypeScript)
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── vite.config.ts
│
├── server/ # Express Backend (TypeScript)
│ ├── src/
│ │ ├── routes/
│ │ └── index.ts
│ ├── package.json
│ └── tsconfig.json
│
├── mobile/ # React Native Mobile App (Future)
│ ├── android/
│ ├── ios/
│ └── src/
│
├── shared/ # Shared types and utilities
│ └── types/
│
└── package.json # Root workspace configuration
- Node.js 20+
- npm 9+
# Install all dependencies (root, client, server)
npm run install:all
# Or install individually
npm install # Root workspace
cd client && npm install # Client dependencies
cd server && npm install # Server dependencies# Run client only (frontend)
npm run dev
# Run server only (backend)
npm run dev:server
# Run both client and server
npm run dev:all# Build everything
npm run build
# Build individually
npm run build:client
npm run build:serverThe project is structured to support React Native mobile apps:
- Web Client (
client/) - React web app - Mobile App (
mobile/) - React Native (to be set up) - Shared Code (
shared/) - Common types and utilities
cd mobile
npx react-native init PolyFieldMobile --template react-native-template-typescriptEdit client/.env (already created, just add your Privy App ID):
VITE_PRIVY_APP_ID=your_privy_app_id
VITE_API_BASE_URL=http://localhost:3000Edit server/.env (already created):
PORT=3000
NODE_ENV=development
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000- Client README - Web client documentation
- Server README - Backend server documentation
- Mobile Setup - Mobile app setup (coming soon)
- Integration Guide - Polymarket API integration
- Usage Examples - Code examples
- React 18 - UI framework
- TypeScript - Type safety
- Vite - Build tool
- Tailwind CSS - Styling
- Privy - Authentication
- Framer Motion - Animations
- Express - Web framework
- TypeScript - Type safety
- Axios - HTTP client
- Helmet - Security
- CORS - Cross-origin support
- React Native - Mobile framework
- TypeScript - Type safety
- Shared codebase with web client
This project uses npm workspaces for monorepo management:
client- Web applicationserver- Backend API server
- Authentication via Privy
- Secure API key handling on backend
- CORS protection
- Rate limiting
- Helmet security headers
MIT