Loading...
Loading...
An engaging quiz game platform focusing on HP questions with competitive features, friend challenges, and smart insights to help players improve their knowledge and performance quickly.
The Swedish Högskoleprovet (HP) is a high-stakes university entrance exam taken by over 100,000 students annually. Traditional study methods lack engagement, competitive motivation, and real-time feedback. Students struggle to identify weak areas, track progress across 8 different question categories, and maintain consistent practice habits.
We built HPSpelet.se as a competitive 1v1 multiplayer quiz platform with an ELO-style rating system calibrated to mirror Sweden's official HP scoring. The platform features real-time matches, friend challenges, comprehensive analytics, and AI-powered tutoring to help students identify and improve weak areas.
HPSpelet uses a modern full-stack architecture with Next.js 14 App Router, PostgreSQL database, and real-time multiplayer via Server-Sent Events. The system includes 66+ API endpoints, comprehensive session management, and Stripe payment integration.
React-based SPA with real-time game updates, responsive design, and advanced accessibility
Next.js 14 App Router, TypeScript, Tailwind CSS 4, Radix UI, 40+ custom animations
Real-time multiplayer system with lobby management, SSE streaming, and game state synchronization
Server-Sent Events, Game lobbies, 60-second timers, Tie-breaker logic
Comprehensive schema with 11+ core tables tracking users, matches, statistics, and achievements
PostgreSQL 15, pgcrypto UUIDs, Connection pooling (50 max), Automatic timestamps
Dual auth with email/password and Google OAuth, secure sessions, and CSRF protection
NextAuth.js 4.24, Firebase Auth, bcryptjs, JWT sessions
The core innovation is a sophisticated real-time game engine combined with an ELO-style rating system calibrated to match Sweden's official HP scoring distribution. The system handles concurrent matches, ensures fair matchmaking, and provides meaningful performance metrics.
Custom K-factor (0.05) calibrated for HP score distribution: expectedScore = 1/(1+10^((opponent-player)*500/400)), with ranks from Nybörjare (0.00) to Mästare (2.00)
Real-time updates via SSE with heartbeat every 1 second. Events: init, players_update, game_started, next_question, opponent_answered, game_completed
6-step flow: Create Lobby → Join → Ready Up → Start Game → Answer Loop (7 questions) → End Game with HP delta calculation
Analytics across all 8 categories: Quantitative (XYZ, KVA, NOG, DTK) and Verbal (ORD, MEK, LÄS, ELF) with accuracy percentages and improvement trends
Real-time lobby chat, friend system with direct challenges, and competitive leaderboards with daily/weekly/all-time rankings
HPSpelet.se is a production-grade educational gaming platform with enterprise-level reliability and comprehensive features designed to help students improve their Högskoleprovet performance through competitive, engaging gameplay.
Next Project
Polymarket Trading Bot →