Puppr is a playful swipe app that pairs the dopamine loop of dating apps with AI-generated dog bios. It serves as an approachable case study for CS students who want to see how a clear spec plus AI tooling can take an idea from 0 → 1 in a single afternoon: ~2 hours refining specs, <1 hour of live coding, and ~1 hour of polish/deployment.
Build highlights
- Spec‑driven workflow: requirements in
specs/powered the entire implementation and kept scope realistic - AI-assisted implementation: Claude Code + Warp IDE handled most of the typing while humans steered, debugged, and reviewed
- Delight-first UX: expressive bios, swipe interactions, and cached likes make the demo feel real despite the tight timeline
✅ Required:
- Node.js 20+ (Download)
- Anthropic API key (Get one free)
📚 You should know:
- React basics (components, hooks)
- Node.js basics (npm, Express)
| Step | Command | Why it matters |
|---|---|---|
| Install deps | npm install |
Installs both workspaces via the root npm workspace |
| Configure env | npm run configure-env |
Copies .env.sample if missing and stores your ANTHROPIC_API_KEY |
| Run dev servers | npm run dev |
Launches backend + frontend together with shared logging |
| Smoke test API | curl -s http://localhost:3001/api/healthcurl -s http://localhost:3001/api/dog |
Confirms the server can serve health and profile data |
Need a clean rebuild? Run npm run setup. Default URLs: API http://localhost:3001, web app http://localhost:5173 (configure via .env / VITE_API_URL as needed).
About · How It Works · SDD · Workflow · Getting Started · API · Troubleshooting · License · Credits
Two external services power every swipe:
- Dog CEO API – returns a random image and lets us infer the breed from the URL path
- Anthropic TypeScript SDK – calls Claude Haiku 4.5 with a JSON-only prompt, retries on errors, and outputs the profile details (name, age, bio, interests, goals, traits)
Flow
- Request
GET /api/dog - Backend pulls an image from Dog CEO and extracts the breed from the URL
- Breed name feeds a Claude prompt; the SDK enforces JSON structure, strips code fences, and retries on rate limits/server hiccups
- The server merges
{ image, breed, profile }and returns it to the client - Frontend keeps the “next dog” prefetched so swipe latency stays near-zero
SDD treats the spec as the executable blueprint: describe the product crisply, then let AI agents implement against that contract. Puppr leaned on this approach to keep the rapid build on-rails.
SDD loop
- Specify outcomes and UX
- Plan architecture + constraints
- Taskify the spec for reviewable chunks
- Implement with AI + human oversight
Why it works – minimizes hallucinations, keeps architecture intentional, and makes pivots as simple as editing the spec.
For Puppr, about two hours were spent co-researching with Claude Code to evolve
specs/mvp-specification.mdinto the tighterspecs/rapid-prototype-spec.mdbefore any code was generated. Handing that lean spec to the agent made the live coding session a true “one-shot.”
More to read: Spec-Driven Development (Medium) · GitHub Spec Kit · Microsoft Spec Kit deep dive
| Folder | Purpose | Highlights |
|---|---|---|
client/ |
Vite + React UI | Swipe flow, likes gallery, prefetched cards |
server/ |
Express API | Orchestrates Dog CEO + Claude calls with retries |
specs/ |
Living requirements | mvp-specification (vision) → rapid-prototype (build-ready scope) |
ai-docs/ |
Local API references | Downloaded docs give AI agents deterministic, offline context |
Workflow snapshot
- Draft spec → refine until it fits a “one-shot” build
- Feed spec + local docs into Claude Code to implement tasks
- Review/patch outputs, then polish UX
- Keep specs + README updated so future changes start with intent, not guesswork
Why ai-docs/ matters
- Local copies of API docs and SDKs keep the LLM grounded while offline
- Agents can cite exact interfaces/examples without hallucinating
- Students can drop new documentation there to guide future AI-assisted work
- Rapid prototyping playbook – translate a spec directly into a shippable MVP
- AI integration pattern –
server/services/profileGenerator.jsshows guarded prompts, retries, and JSON validation - Data flow trace – follow SwipeView →
api.js→ Express → Dog CEO + Anthropic → client cache - Spec hygiene – compare
mvpvsrapid-prototypespecs to see how scope was trimmed without losing intent - Tooling stack – Claude Code + Warp IDE for implementation, npm workspaces for orchestration
-
Puppr itself was built using Claude Code (as the agent) and Warp (as the terminal/IDE). The tools below are additional options if you want to experiment; each has different strengths and tradeoffs.
-
Cursor 2.0 – VS Code-style editor with inline/chat agents; great when you want tight IDE integration
-
Replit Agent 3 – browser-based agent that can scaffold projects and deploy to Replit-hosted infra quickly
-
Gemini CLI – Google’s command-line assistant for multi-model workflows and tight GCP integration
-
OpenAI Codex CLI – classic code-generation CLI with strong autocomplete; handy for quick script prototyping
- 🐕 Random Dog Profiles - Fetches random dog images from Dog.CEO API
- 🤖 AI-Generated Bios - Claude Haiku 4.5 creates witty, breed-appropriate dating profiles
- 👍 Swipe Interface - Simple button-based swiping (Pass/Like)
- 📱 Mobile-First - Optimized for mobile viewports (375px-428px)
- 💾 Session Storage - Liked dogs persist during your session
- ⚡ One-Ahead Prefetching - Next dog loads in background for instant swiping
- ✨ Smooth Animations - CSS-based transitions for cards and views
- React 18
- Vite (build tool)
- Vanilla CSS (mobile-first)
- Node.js 20+
- Express.js
- Anthropic SDK (Claude Haiku 4.5)
- Dog.CEO API
puppr/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/
│ │ │ ├── SwipeView.jsx
│ │ │ ├── DogCard.jsx
│ │ │ ├── LikesGallery.jsx
│ │ │ └── BottomNav.jsx
│ │ ├── services/
│ │ │ ├── api.js
│ │ │ └── storage.js
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── index.css
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
├── server/ # Node/Express backend
│ ├── services/
│ │ ├── dogService.js
│ │ ├── dogAPI.js
│ │ └── profileGenerator.js
│ ├── errors.js
│ ├── server.js
│ └── package.json
├── specs/ # SDD specifications
│ ├── mvp-specification.md
│ └── rapid-prototype-spec.md
├── ai-docs/ # Local API documentation for AI context
│ ├── dog-ceo-api/
│ └── anthropic-sdk-typescript/
├── .env.sample
├── .gitignore
└── README.md
- Node.js 20+ installed
- Anthropic API key (Get one here)
TL;DR: run
npm installfrom the repo root to install both workspaces (clientandserver). The manual steps below are available if you prefer installing each project yourself.
- Clone the repository
gh repo clone king-of-the-grackles/Puppr
cd Puppr- Set up environment variables
Create a .env file in the root directory:
# Copy the sample file
cp .env.sample .envEdit .env and add your Anthropic API key:
ANTHROPIC_API_KEY=your_api_key_here
PORT=3001
NODE_ENV=development
CORS_ORIGIN=http://localhost:5173
- Install backend dependencies
cd server
npm install- Install frontend dependencies
cd ../client
npm installnpm run devThis single command uses concurrently to launch the backend and frontend, prints service URLs, and restarts when files change.
Open your browser to http://localhost:5173 and:
- You should see a dog card with an AI-generated profile
- Click "Pass" or "Like" to see the next dog
- Click the heart icon (💙) in the bottom nav to view your likes
- Each profile includes: name, age, bio, interests, relationship goals, and personality traits
For mobile testing:
- Use Chrome DevTools (F12) and toggle device toolbar
- Select iPhone SE, iPhone 12 Pro, or iPhone 14 Pro Max
- Or test on a real device at your local IP
- Server (
.envin repo root)ANTHROPIC_API_KEY(required): server will not start without a valid keyPORT(default3001): backend portNODE_ENV(defaultdevelopment): enables request logging in devCORS_ORIGIN(default allowshttp://localhost:5173andhttp://localhost:5174): set to your frontend origin in production- Run
npm run configure-envfor an interactive prompt that writes to.env
- Client (
client/.env)VITE_API_URL(defaulthttp://localhost:3001): base URL for API requests; set to your deployed backend in production
GET /api/health- Health checkGET /api/dog- Fetch random dog with AI-generated profile
Response Format:
{
"success": true,
"data": {
"id": "1699383820123-abc",
"imageUrl": "https://images.dog.ceo/breeds/retriever-golden/n02099601_100.jpg",
"breed": "Golden Retriever",
"profile": {
"name": "Charlie",
"age": 4,
"bio": "Athletic golden boy who believes every stranger is just a friend they haven't met yet.",
"interests": ["Swimming", "Fetching", "Making friends", "Belly rubs"],
"lookingFor": "Someone who throws the ball... and then throws it again",
"traits": ["Loyal", "Energetic", "Friendly"]
},
"timestamp": 1699383820123
}
}🔴 Blank screen in browser? → Check that both servers are running (you should see "Backend at :3001, Frontend at :5173" in your terminal)
🔴 "Failed to generate profile" error?
→ Verify your ANTHROPIC_API_KEY is set correctly in the .env file
🔴 "Finding more dogs..." stuck for >10 seconds?
→ Check server logs for API errors, restart with npm run dev
-
Server fails to start with Anthropic error
- Cause:
ANTHROPIC_API_KEYnot set or invalid - Fix: Set a valid key in
./.env(server requires it at startup)
- Cause:
-
Browser CORS error calling API
- Cause: Frontend origin not allowed by server CORS
- Fix: Set
CORS_ORIGINin./.env(e.g.,http://localhost:5173or your deployed frontend URL)
-
GET /api/dogreturns 500- Cause: Upstream rate limiting, network timeout, or JSON parse failure
- Fix: Retry; verify
ANTHROPIC_API_KEY; check server logs; the server includes retry/backoff and JSON validation
-
Frontend calls wrong API URL
- Cause:
VITE_API_URLnot set for production - Fix: Set
VITE_API_URLto your deployed backend (e.g.,https://api.example.com)
- Cause:
-
Port already in use
- Cause: Another process on
3001or5173 - Fix: Change
PORTin server.envor pass--portto Vite dev server
- Cause: Another process on
MIT
- Dog images: Dog.CEO API
- AI profiles: Anthropic Claude
- Built with 💙 for dog lovers everywhere
Note: This is a rapid prototype demo application demonstrating Spec-Driven Development and AI-assisted coding workflows. See the spec files for full technical details and implementation notes.


