A decentralized prediction market platform that combines the viral mechanics of pump.fun with prediction markets on Solana
https://prediction-pump-1m43ige5w-parvez-mosharafs-projects.vercel.app
- Program ID:
2vi9hVuYBws8GwFqPG6eRQRFoEMGfkCny2Lbvf3pFuzu
- Network: Devnet
- Explorer: https://explorer.solana.com/address/2vi9hVuYBws8GwFqPG6eRQRFoEMGfkCny2Lbvf3pFuzu?cluster=devnet
- Repository: https://github.com/mosharaf6/predictPump
- Branch: main
- License: MIT
- Visit the live app: https://prediction-pump-1m43ige5w-parvez-mosharafs-projects.vercel.app
- Install a Solana wallet: Phantom or Solflare
- Switch to Devnet in your wallet settings
- Get test SOL: Visit Solana Faucet for free devnet SOL
- Start trading on prediction markets!
- Dynamic Pricing: Bonding curve pricing that responds to market sentiment in real-time
- Prediction Markets: Create and trade on any future event
- Social Trading: Follow top traders, share predictions, and climb leaderboards
- Automated Settlement: Oracle-based automatic market resolution
- Real-time Updates: Live price feeds and market data
- PWA Support: Install as mobile/desktop app
- Wallet Integration: Support for all major Solana wallets
- Mobile Responsive: Optimized for all devices
- Dark/Light Mode: Theme switching support
- Offline Mode: Basic functionality without internet
- Push Notifications: Price alerts and market updates
- User Profiles: Track performance and achievements
- Leaderboards: Compete with other traders
- Social Feed: Share predictions and insights
- Follow System: Follow successful traders
- Achievement System: Unlock badges and rewards
- Blockchain: Solana
- Framework: Anchor 0.30.1
- Language: Rust
- Features: Bonding curves, market settlement, oracle integration
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- State Management: Zustand
- Wallet Integration: Solana Wallet Adapter
- PWA: Next-PWA
- Testing: Jest + React Testing Library + Playwright
- Runtime: Node.js + Express
- Database: PostgreSQL
- Cache: Redis
- Real-time: WebSocket connections
- APIs: RESTful APIs with TypeScript
- Frontend Hosting: Vercel
- Smart Contract: Solana Devnet
- CI/CD: GitHub Actions
- Monitoring: Health checks and metrics
- Documentation: Comprehensive guides
- Visit: https://prediction-pump-1m43ige5w-parvez-mosharafs-projects.vercel.app
- Install Phantom or Solflare wallet
- Switch to Devnet in wallet settings
- Get test SOL from Solana Faucet
- Start trading on prediction markets!
- Node.js 18+
- Rust + Solana CLI
- Anchor CLI 0.30.1
- Git
- Clone the repository:
git clone https://github.com/mosharaf6/predictPump.git
cd predictPump
- Install dependencies:
npm install
cd frontend && npm install
cd ../backend && npm install
- Set up environment variables:
# Frontend
cd frontend
cp .env.local.example .env.local
# Edit .env.local with your configuration
# Backend
cd ../backend
cp .env.example .env
# Edit .env with your configuration
- Start development environment:
# Build and deploy smart contracts
anchor build
anchor deploy --provider.cluster devnet
# Start frontend (in new terminal)
cd frontend && npm run dev
# Start backend (in new terminal)
cd backend && npm run dev
anchor build # Build smart contracts
anchor test # Run smart contract tests
anchor deploy # Deploy to configured network
solana program show <ID> # Verify deployment
cd frontend
npm run dev # Start development server
npm run build # Build for production
npm run test:unit # Run unit tests
npm run test:e2e # Run E2E tests with Playwright
npm run lint # Lint code
cd backend
npm run dev # Start development server
npm run build # Build for production
npm run test # Run tests
npm run migrate # Run database migrations
npm run docker-up # Start all services with Docker
npm run docker-down # Stop all services
npm run test:all # Run all tests
predictPump/
├── 📁 programs/
│ └── prediction-pump/ # 🦀 Anchor smart contracts (Rust)
│ ├── src/lib.rs # Main program logic
│ ├── src/bonding_curve.rs # Bonding curve implementation
│ └── src/settlement.rs # Market settlement logic
├── 📁 frontend/ # ⚛️ Next.js frontend (TypeScript)
│ ├── src/app/ # App router pages
│ ├── src/components/ # React components
│ ├── src/hooks/ # Custom hooks
│ ├── src/stores/ # Zustand stores
│ └── src/types/ # TypeScript types
├── 📁 backend/ # 🚀 Node.js backend services
│ ├── src/services/ # Business logic services
│ ├── src/routes/ # API routes
│ └── src/controllers/ # Request controllers
├── 📁 tests/ # 🧪 Smart contract tests
├── 📁 .github/workflows/ # 🔄 CI/CD pipelines
├── 📁 monitoring/ # 📊 Monitoring configuration
├── 📄 docker-compose.yml # 🐳 Docker services
├── 📄 Anchor.toml # ⚓ Anchor configuration
└── 📄 package.json # 📦 Root dependencies
graph TB
A[User] --> B[Frontend - Next.js]
B --> C[Wallet Adapter]
C --> D[Solana RPC]
D --> E[Smart Contract]
B --> F[Backend API]
F --> G[PostgreSQL]
F --> H[Redis Cache]
F --> I[WebSocket]
I --> B
- Program ID:
2vi9hVuYBws8GwFqPG6eRQRFoEMGfkCny2Lbvf3pFuzu
- Bonding Curve: Automated market maker with dynamic pricing
- Market Settlement: Oracle-based resolution system
- Access Control: Role-based permissions and security
- Framework: Next.js 14 with App Router
- State Management: Zustand for global state
- Wallet Integration: Solana Wallet Adapter
- Real-time: WebSocket connections for live updates
- PWA: Service worker for offline functionality
- API Layer: RESTful APIs with Express.js
- Database: PostgreSQL for persistent data
- Cache: Redis for session and real-time data
- WebSocket: Real-time price feeds and notifications
- Services: Modular business logic services
- ✅ Smart Contract Tests: Comprehensive Anchor tests
- ✅ Frontend Unit Tests: Jest + React Testing Library
- ✅ Frontend E2E Tests: Playwright automation
- ✅ Backend API Tests: Integration and unit tests
- ✅ Performance Tests: Load testing and optimization
# All tests
npm run test:all
# Smart contract tests
anchor test
# Frontend tests
cd frontend && npm run test:unit
cd frontend && npm run test:e2e
# Backend tests
cd backend && npm run test
- Frontend: Deployed on Vercel with automatic deployments
- Smart Contract: Deployed on Solana Devnet
- CI/CD: GitHub Actions for automated deployments
# Production Environment Variables
NEXT_PUBLIC_PROGRAM_ID=2vi9hVuYBws8GwFqPG6eRQRFoEMGfkCny2Lbvf3pFuzu
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
# Deploy smart contracts
anchor deploy --provider.cluster devnet
# Deploy frontend
vercel --prod
# Deploy via CI/CD
git push origin main # Triggers automatic deployment
- Frontend: ~178 kB First Load JS (optimized)
- Smart Contract: 398,624 bytes program size
- Response Time: <200ms average API response
- Uptime: 99.9% availability target
- Health Checks:
/api/health
endpoint - Metrics:
/api/metrics
Prometheus endpoint - Error Tracking: Comprehensive error handling
- Performance: Real-time performance monitoring
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Test your changes:
npm run test:all
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
- TypeScript: Strict type checking enabled
- ESLint: Code linting and formatting
- Prettier: Code formatting
- Testing: Comprehensive test coverage required
- Documentation: Update docs for new features
- 🎯 New prediction market categories
- 📱 Mobile app development
- 🔧 Performance optimizations
- 🎨 UI/UX improvements
- 📊 Analytics and reporting features
- 🔐 Security enhancements
- GitHub Issues: Report bugs or request features
- Discussions: Join community discussions
- Documentation: Check our comprehensive guides in
/docs
- Discord: Join our developer community (coming soon)
- Twitter: Follow for updates (coming soon)
- Blog: Read about development updates (coming soon)
This project is licensed under the MIT License - see the LICENSE file for details.
- Solana Foundation for the amazing blockchain infrastructure
- Anchor Framework for smart contract development tools
- Vercel for seamless frontend deployment
- Next.js Team for the incredible React framework
- Open Source Community for the tools and libraries that made this possible
- 🚀 Mainnet Launch: Deploy to Solana mainnet
- 📱 Mobile App: Native iOS and Android apps
- 🏛️ DAO Governance: Community-driven governance
- 🌍 Multi-chain: Expand to other blockchains
- 🤖 AI Integration: AI-powered market insights
- 📊 Advanced Analytics: Comprehensive trading analytics