A Polymarket-inspired prediction market platform for squads. Create and bet on personal life events with virtual money!
Experience the full prediction market platform with sample data and user accounts!
- Multiple Market Types: Binary (YES/NO) and Multiple Choice markets
- Responsive Betting Interface: Large, intuitive buttons with real-time price display
- Smart Auto-Selection: Automatically highlights highest probability options
- Interactive Charts: Live price history with Recharts integration
- Market Maker Algorithm: Automatic price adjustments based on volume
- Virtual Money: Start with $100, track performance with detailed analytics
- Buy/Sell Modes: Full trading capabilities with position management
- Comments System: Threaded discussions with likes and replies
- Enhanced User Positions: See actual YES/NO share counts next to usernames
- Top Holders: Rankings with crown icons for leaders and detailed position breakdowns
- Activity Feed: Real-time trading activity with bet details
- User Profiles: Comprehensive trading history and performance metrics
- Personal Dashboard: Betting history and performance stats
- Leaderboard: User rankings with comprehensive metrics
- Portfolio Tracking: Win rates, ROI, and profit/loss
- Dropdown Search: Real-time market search with rich previews
- Ongoing Events: Support for events without end dates
- Category Filtering: Organize by Career, Relationships, Personal, etc.
- Fully Mobile Responsive: Desktop and mobile optimized interfaces
- Touch-Friendly: Large buttons and modal-based mobile trading
- Admin Panel: Market management and user administration tools
- Modal Animations: Smooth slide-up and fade-in transitions
- Responsive Betting Interface: Large, intuitive YES/NO buttons with side-by-side layout
- Smart Auto-Selection: Highest probability options automatically selected on page load
- Mobile-First Design: Touch-friendly buttons that open modals on mobile
- Enhanced Position Display: Show actual share counts instead of just spending amounts
- Improved Color System: Muted backgrounds for better visual hierarchy
- Modal Animations: Smooth transitions and better UX
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone https://github.com/yourusername/squadodds.git cd squadodds -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Add your values:
NEXTAUTH_SECRET=your-secret-here NEXTAUTH_URL=http://localhost:3000 DATABASE_URL="file:./dev.db"
-
Set up the database
npx prisma db push npx ts-node scripts/seed.ts # Optional: Add sample data -
Start the development server
npm run dev
Visit http://localhost:3000 to see your app!
If you run the seed script, you can sign in with:
- alice@example.com / password123
- bob@example.com / password123
- charlie@example.com / password123
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Database: SQLite with Prisma ORM
- Authentication: NextAuth.js
- Styling: Tailwind CSS
- Charts: Recharts
- UI Components: Custom component library
src/
├── app/ # Next.js app router pages
│ ├── admin/ # Admin panel for user management
│ ├── api/ # API routes
│ │ ├── auth/ # NextAuth.js API routes
│ │ ├── events/ # Market CRUD operations
│ │ └── users/ # User management APIs
│ ├── auth/ # Authentication pages
│ ├── create/ # Market creation interface
│ ├── dashboard/ # User dashboard and portfolio
│ ├── leaderboard/ # User rankings and stats
│ ├── market/[id]/ # Individual market pages
│ └── profile/ # User profile management
├── components/ # Reusable UI components
│ ├── ui/ # Base UI components (Button, Modal, etc.)
│ ├── AddOptionModal.tsx # Multiple choice option creation
│ ├── BettingCard.tsx # Desktop trading interface
│ ├── BettingModal.tsx # Mobile trading modal
│ ├── MarketCard.tsx # Market display cards
│ ├── MarketComments.tsx # Comments and activity feed
│ ├── Navigation.tsx # App navigation header
│ ├── PriceChart.tsx # Interactive price charts
│ └── SearchDropdown.tsx # Real-time market search
├── lib/ # Utilities and configurations
│ ├── positions.ts # Position calculation utilities
│ └── utils.ts # General utility functions
prisma/ # Database schema and migrations
scripts/ # Database seeding and utilities
- Sign Up: Create an account to get $100 virtual money
- Browse Markets: Explore betting opportunities on the homepage
- Place Bets: Click any market to see details and place YES/NO bets
- Create Markets: Add new events for your squad
- Engage: Comment on markets and see live trading activity
- Track Performance: Monitor your portfolio and leaderboard ranking
- All sensitive data is in
.env(not committed to git) - Passwords are hashed with bcrypt
- Session management via NextAuth.js
- Input validation on all API endpoints
Ready to deploy on Vercel, Netlify, or any Node.js hosting platform.
For Vercel:
npm run build
vercel deployMIT License - feel free to use this for your own friend group!
Found a bug or have a feature idea? Open an issue or submit a PR!
Built with ❤️ for squad drama 😄