Sparkd is a gamified quiz app that turns your PDFs into interactive battles. Upload a PDF, let the system generate questions, and play through a quiz with health bars, sound effects, and animated enemies while your progress and achievements are tracked in your profile. Check it out here https://sparkd-gamma.vercel.app/.
- PDF-powered quizzes: Upload a PDF and generate multiple-choice questions from its content.
- Gamified gameplay: Answer questions in a battle-style UI with player/enemy health and sound effects.
- Score history: View past quiz results and track your performance over time.
- Profile page: See your account details, best score, and basic quiz stats.
- Badge system: Earn badges for milestones like first quiz, quiz count, and high scores; badges are shown on your profile.
- Framework: Next.js App Router (React, TypeScript)
- Auth & data: Firebase Auth + Firestore
- Storage: Firebase Storage for uploaded PDFs
- Styling: Tailwind-style utility classes
-
Install dependencies:
npm install
-
Set up Firebase config:
Create a
.env.localfile with your Firebase credentials:NEXT_PUBLIC_FIREBASE_API_KEY=... NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=... NEXT_PUBLIC_FIREBASE_PROJECT_ID=... NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=... NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=... NEXT_PUBLIC_FIREBASE_APP_ID=...
-
Run the dev server:
npm run dev
-
Open
http://localhost:3000in your browser.
src/app: Next.js app routes and UIpage.tsx: Landing / entry screendashboard/page.tsx: Library of generated quizzesupload/page.tsx: Upload PDFs and create quizzesquiz/[id]/page.tsx: Quiz gameplay experiencequiz/[id]/results/page.tsx: Quiz results and breakdownscores/page.tsx: Score historyprofile/page.tsx: User profile and badgescomponents/: Shared UI likeHeader,Footer, modals, animations
src/lib/firebase.ts: Firebase initialization and shared typessrc/app/services: Quiz and auth related service helpers
- Quiz completions are stored per user under
users/{uid}/scores. - Badges are stored under
users/{uid}/badgesand are automatically awarded whensaveQuizruns. - The profile page reads these collections to show your stats and badge collection.
You can deploy Sparkd to any platform that supports Next.js (such as Vercel). Make sure your environment variables are configured in the hosting provider, then build and start:
npm run build
npm start