Project Info
Inspiration
As UC Berkeley students, we've all experienced the anxiety of waiting for Gradescope scores to be released. The anticipation, the speculation about how we performed, and the collective stress of midterms and finals. We thought: what if we could make this experience more engaging and fun? What if students could bet on their own performance and that of their peers? GambleScope was born from the idea of gamifying the academic experience - turning the stress of waiting for grades into an exciting, community-driven betting platform where students can predict test scores, compete with friends, and earn virtual rewards for their accuracy.
What it does
GambleScope is a comprehensive betting platform that allows UC Berkeley students to: ๐ฏ Bet on Test Scores: Students can place bets on whether they or their peers will score above or below a certain threshold on upcoming exams. The platform supports any course with realistic grade distributions. ๐ฐ Virtual Wallet System: Each user starts with $100 in virtual currency, with a complete transaction history and wallet management system. ๐ Achievement System: GambleScope features 20+ unique achievements and 8 different titles (from Novice to Legendary Bettor) that users can unlock through various betting activities, win streaks, and risk-taking behaviors. ๐ Live Market: Real-time betting interface where users can see all open bets, current odds, and place their wagers with instant updates. ๐ Admin Panel: Comprehensive admin dashboard for managing bets, revealing scores, and overseeing the platform. ๐ Dashboard: Personal betting history, statistics, win rates, and performance tracking. ๐ฒ Open New Bets: Users can create their own betting opportunities for any course or test. ๐ Berkeley Time Integration: Mock integration with Berkeley Time for realistic course data and grade distributions.
How we built it
Frontend: Built entirely with React.js using modern hooks and context API for state management. The UI features a responsive design with custom CSS styling and a professional gradient theme. State Management: Implemented a custom AuthContext for user authentication, wallet management, and betting state. All data is persisted using localStorage for demo purposes. Betting Algorithm: Developed a sophisticated betting system using the Logarithmic Market Scoring Rule (LMSR) for fair payout calculations, ensuring that winners receive proportional rewards based on their stake. Achievement System: Created a comprehensive gamification system with 20+ achievements across categories: Financial (High Roller, Big Winner, Millionaire) Risk-based (Risk Taker, Cautious Player) Streak-based (On a Roll, Lucky Streak, Unstoppable) Activity-based (Active Bettor, Dedicated Bettor) Social (Social Butterfly) Time-based (Night Owl, Early Bird) Secret achievements (including a special $67 bet easter egg) Real-time Updates: Implemented custom event dispatching for live betting updates and instant UI refreshes.
Challenges we ran into
Complex State Management: Managing betting state across multiple components while maintaining data consistency was challenging. We solved this by implementing a centralized AuthContext with proper state updates and localStorage persistence. Fair Payout Algorithm: Creating a fair betting system that prevents exploitation while rewarding winners appropriately required research into prediction market algorithms. We implemented LMSR (Logarithmic Market Scoring Rule) to ensure mathematical fairness. Achievement Logic: Building a comprehensive achievement system with complex conditions and proper state tracking required careful planning of user statistics and achievement checking logic. Real-time UI Updates: Ensuring the betting interface updates instantly when users place bets required implementing custom event systems and proper React state management. Responsive Design: Making the platform work seamlessly across desktop and mobile devices while maintaining the professional aesthetic.
Accomplishments we're proud of
๐ฎ Complete Gamification: Successfully implemented a full achievement and title system that keeps users engaged and motivated to continue betting. โก Real-time Experience: Created a truly live betting experience with instant updates and smooth user interactions. ๐ฏ Fair Betting System: Implemented a mathematically sound betting algorithm that ensures fair payouts and prevents gaming the system. ๐ฑ Professional UI/UX: Designed a polished, responsive interface that feels like a real betting platform with smooth animations and intuitive navigation. ๐ง Comprehensive Admin Tools: Built a full admin panel for managing the platform, revealing scores, and overseeing user activity. ๐ Rich Analytics: Created detailed user statistics and betting history tracking with win rates, streaks, and performance metrics.
What we learned
React Context Management: Gained deep understanding of React Context API and how to properly manage complex application state across multiple components. Prediction Market Algorithms: Learned about LMSR and other prediction market mechanisms for creating fair betting systems. Gamification Design: Discovered the psychology behind achievement systems and how to create engaging progression mechanics that keep users motivated. Real-time UI Patterns: Mastered techniques for creating responsive, real-time user interfaces with proper state synchronization. User Experience Design: Learned how to balance functionality with usability, creating an intuitive betting platform that's easy to use but feature-rich.
What's next
๐ Real Backend Integration: Replace localStorage with a proper database and REST API for persistent data storage and multi-device synchronization. ๐ฑ Mobile App: Develop a native mobile application for iOS and Android to make betting more accessible on-the-go. ๐ Berkeley Time API: Integrate with the actual Berkeley Time API for real course data and grade distributions. ๐ฅ Social Features: Add friend systems, leaderboards, and social betting features to increase community engagement. ๐ Course Integration: Expand beyond test scores to include betting on assignment grades, project outcomes, and other academic milestones. ๐ Advanced Analytics: Implement machine learning predictions and advanced statistical analysis of betting patterns. ๐ Tournament System: Create seasonal tournaments and competitions with special rewards and recognition. ๐ Premium Features: Add premium subscriptions with exclusive betting opportunities and enhanced features.
Analysis
View
Metric
- 6
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- ReactIn code
- Node.jsClaimed
4 of 5 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
209 KB
Source files
34
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
EthanGu4/gamblescope
45 files ยท 1.9 MB ยท @ 0285fc9
Structure
Interface
20 files ยท 44%Screens, components and styles rendered to the user.
Application logic
10 files ยท 22%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here โ open the file browser to check anything the diagram implies.
Languages
- JavaScript71%
- CSS27%
- Markdown2%
- HTML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
gamblescope/package.json
npm ยท 8- @testing-library/dom
- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- react
- react-dom
- react-scripts
- web-vitals
Declared in the repositoryโs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectโs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.