HuskyBids is a full-stack sports betting simulation platform designed specifically for the University of Washington community. It allows users to place risk-free bets on live UW Huskies games using a virtual currency system ("pts"), featuring real-time odds integration and competitive leaderboards.
Live Website: huskybids.me
- Live Game Integration: Real-time fetching of UW Huskies game schedules, scores, and odds via the ESPN API.
- Virtual Economy: Complete risk-free betting system with currency management ("pts"), transaction history, and balance tracking.
- Interactive Dashboard: Specific views for upcoming matches, live stats, and user performance analytics.
- Social Competition: Global leaderboards and daily engagement tasks to foster community interaction.
- Secure Authentication: Robust user management and profile security powered by Clerk.
- Framework: Next.js 14 (App Router)
- UI/Styling: React 18, Tailwind CSS, Framer Motion
- Data Fetching: SWR (Stale-While-Revalidate)
- Visualization: Recharts
- Icons: Phosphor Icons, Lucide React
- Database: MongoDB (M5 cluster) with Mongoose ODM
- API: Next.js API Routes (Serverless)
- Services: Custom service layer architecture (
src/server/services) for encapsulation of business logic.
- Authentication: Clerk
- Testing: Jest, React Testing Library
- Code Quality: ESLint, Husky (Pre-commit hooks)
The project follows a modern modular architecture:
src/
├── app/ # Next.js App Router pages and layouts
├── components/
│ ├── experimental/ # Modern UI component system (Design System)
│ ├── shared/ # Reusable functional components
│ └── ui/ # Base UI elements
├── server/
│ ├── models/ # Mongoose database schemas
│ ├── services/ # Business logic layer (Betting, Games, Stats)
│ └── middleware/ # API middleware and error handling
└── shared/ # Shared utilities, constants, and helpers
- Node.js 18+
- MongoDB Database URI
- Clerk Account (for authentication keys)
-
Clone the repository:
git clone https://github.com/isaiahrivera/HuskyBids.git cd HuskyBids -
Install dependencies:
npm install
-
Configure environment variables: Create a
.env.localfile in the root directory:MONGODB_URI=your_mongodb_connection_string NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key CLERK_SECRET_KEY=your_clerk_secret
-
Run the development server:
npm run dev
The application will be available at http://localhost:3000.
- Service Layer: Business logic is separated from API routes into specific services (
BettingService,GameService) to ensure maintainability and testability. - Optimistic UI: Utilizes SWR for data fetching to provide instant feedback and background revalidation.
- Design System: Implements a custom "Experimental" component set to maintain visual consistency across the application.
Yonie Isaiah Rivera Aguilar
- GitHub: @isaiahrivera
- LinkedIn: Yonie Rivera Aguilar
Built for the University of Washington community.