Live app: https://code-issue-collective.vercel.app/
Turn a Polaroid photo of your friend into a tiny 8-bit companion they can keep on their phone — like a Tamagotchi, but it’s them.
“I can’t be with you all the time, so here’s a little version of me to carry around.”
Built for a hackathon demo: scan a QR code on the back of a Polaroid, land on a pixel friend, tap to interact, hear voice lines and chiptune sounds.
| Feature | Status |
|---|---|
| Mobile-first homepage | ✅ Live on Vercel |
| Take / upload a Polaroid photo | ✅ |
| AI describes the person in the photo | ✅ |
| Generate 8-bit avatar sprites (8 moods) | ✅ |
| ElevenLabs narration + theme music | ✅ (needs API keys) |
| Interactive friend screen (Tap / Pint / Dance) | 🔜 See TODO.md |
| QR code → shareable friend link | 🔜 See TODO.md |
Track full deliverable status in Deliverables.
Hackathon strategy and demo script live in PLAN.md.
Open code-issue-collective.vercel.app on your phone, tap Take polaroid photo, and upload a picture.
Photo processing only works when API keys are configured on Vercel (see below).
git clone https://github.com/willchanpm/code-issue-collective.git
cd code-issue-collective
npm install
cp .env.example .env.localAdd your keys to .env.local, then:
npm run devOpen http://localhost:3000.
Copy .env.example → .env.local (local) or add the same vars in the Vercel dashboard.
| Variable | Required | Purpose |
|---|---|---|
AI_PROVIDER |
Yes | openai or gemini — picks the vision + image provider |
OPENAI_API_KEY |
If using OpenAI | Describes the photo and generates 8-bit sprites |
GEMINI_API_KEY |
If using Gemini | Same as above, via Google Gemini |
ELEVENLABS_API_KEY |
For audio | Narration, pet sounds, and theme music |
ELEVENLABS_VOICE_ID |
Optional | Voice for spoken descriptions (default included) |
Without keys, the homepage loads but photo processing will fail.
When someone uploads a Polaroid, the app runs one API call at a time (serialized on purpose — keeps each Vercel function inside timeout limits):
Photo upload
↓
1. POST /api/analyze-photo → describe the person (OpenAI or Gemini vision)
↓
2. POST /api/generate-avatar → one 8-bit sprite per mood (×8, serial)
↓
3. POST /api/generate-voice → ElevenLabs reads the description aloud
↓
4. POST /api/generate-music → chiptune-style theme music
↓
Results shown on screen (name, description, avatar grid, audio players)
| Route | Method | Purpose |
|---|---|---|
/api/health |
GET | Check which providers are configured |
/api/analyze-photo |
POST | Upload photo → JSON description of the person |
/api/generate-avatar |
POST | { description, mood } → one 8-bit sprite |
/api/generate-voice |
POST | { text } → ElevenLabs TTS audio |
/api/generate-sound |
POST | { prompt } → short pet reaction sound |
/api/generate-music |
POST | { mood } → background chiptune audio |
app/
page.tsx ← Homepage (Tamagotcha landing + photo capture)
api/ ← Serverless API routes (run on Vercel)
components/
PhotoCapture.tsx ← Camera/upload UI + pipeline progress
lib/
client.ts ← Frontend fetch helpers (serialized pipeline)
services/ ← OpenAI, Gemini, ElevenLabs integrations
types.ts ← Shared TypeScript types
PLAN.md ← Hackathon plan + demo script
Deliverables ← Checkbox tracker for what’s shipped
TODO.md ← Next tasks to finish the demo
- Next.js 15 (App Router) — UI + API in one app
- Vercel — hosting (live deploy)
- OpenAI or Google Gemini — vision + 8-bit image generation
- ElevenLabs — voice, sound effects, music
Already deployed at code-issue-collective.vercel.app.
To redeploy after pushing to main:
- Repo: github.com/willchanpm/code-issue-collective
- Vercel auto-builds from
main - Set environment variables in Project → Settings → Environment Variables
- Redeploy if you changed env vars
No separate backend server is needed — Next.js API routes handle everything.
The end-to-end hackathon demo we’re building toward:
- Give someone a physical Polaroid
- They scan the QR code on the back
- Their 8-bit you appears on their phone
- They tap Pint Beer → sprite changes, sound plays
- They tap Dance → sprite changes, music plays
See PLAN.md for the full pitch script.
| Command | What it does |
|---|---|
npm run dev |
Start local dev server at localhost:3000 |
npm run build |
Production build (same as Vercel) |
npm run start |
Run the production build locally |
TBD