Interactive presentation deck for the Slice AI hackathon, with an optional realtime quiz mode powered by PartyKit.
- presenter deck:
/ - audience join page:
/join/[code] - PartyKit room server:
partykit/session.ts - realtime spec:
docs/realtime-quiz-spec.md
Install dependencies:
npm installRun the Next.js app:
npm run devRun the PartyKit room server locally in a second terminal:
npm run partykit:devThe realtime quiz flow expects a PartyKit deployment and these public env vars in the Next.js app:
NEXT_PUBLIC_PARTYKIT_HOST=your-app.your-name.partykit.dev
NEXT_PUBLIC_PARTYKIT_ROOM_PREFIX=session
NEXT_PUBLIC_APP_URL=http://localhost:3000Notes:
NEXT_PUBLIC_PARTYKIT_HOSTis required for presenter and audience socketsNEXT_PUBLIC_PARTYKIT_ROOM_PREFIXis optional and defaults tosessionNEXT_PUBLIC_APP_URLis used to generate the QR join URL in the presenter panel- websocket room URLs are built as
/party/<prefix>-<CODE>for the default PartyKit server
The repo includes:
partykit.jsonpartykit/session.ts
Local commands:
npm run partykit:dev
npm run partykit:deploy
npm run partykit:tailDeploy flow:
- Create a PartyKit account and log in with the CLI.
- Deploy the room server:
npm run partykit:deploy- Note the deployed PartyKit host.
- Set
NEXT_PUBLIC_PARTYKIT_HOSTin Vercel to that host. - Set
NEXT_PUBLIC_APP_URLin Vercel to your frontend URL. - Redeploy the frontend.
Deploy that service with PartyKit so the Vercel-hosted frontend can connect to it over WebSocket.
Set these in the Vercel project:
NEXT_PUBLIC_PARTYKIT_HOST=your-app.your-name.partykit.dev
NEXT_PUBLIC_PARTYKIT_ROOM_PREFIX=session
NEXT_PUBLIC_APP_URL=https://your-frontend.vercel.app- Open the deck on
/ - Click
Startin the live session panel - Scan the QR code or open the join URL on a phone
- Advance through slides as normal
- When the active slide is a quiz slide, phones receive the question automatically
- Reveal or reset the current question from the live session panel
- Create the PartyKit account.
- Run
npm run partykit:deploy. - Set the Vercel public env vars from
.env.example. - Deploy the frontend to Vercel.
- Open the presenter deck and confirm the live panel shows
Connected. - Join from a phone and verify slide sync, voting, reveal, and reset.
npm run build
npm run lint