Inspiration
PetTwin began with a very personal idea: dogs are family, but their care is often scattered across people, messages, memory, and routine.
I was inspired by my late Siberian Husky and by the reality of caring for a dog across a household. One person feeds them, another takes them for a walk, someone else gives medication—and nobody is always completely sure what has already been done.
I wanted to create something warmer than a traditional pet tracker: a living digital twin of your real dog that gives the whole care experience a face, a personality, and a shared sense of responsibility.
What PetTwin does
PetTwin turns a photo of your real dog into a personalised soft-3D digital twin.
The owner reviews and confirms important information before the twin is created. AI can suggest visible details, but the owner remains the source of truth. PetTwin does not certify breed, infer medical facts, or diagnose the dog.
Once the twin is created, PetTwin helps a household:
- see today’s care plan;
- assign a task to a family member or caregiver;
- record walks, feeding, medication, grooming, and observations;
- preserve who completed each action and when;
- review recent care history;
- read a factual Daily Recap;
- prepare a seven-day Vet Report;
- earn treats and unlock digital rewards through completed care.
The digital twin is the emotional centre of the experience, but every summary, reward, and report is backed by the same structured care ledger.
PetTwin has two clearly separated modes:
- Normal Mode uses an owner-selected dog photo, authenticated AI analysis, and personalised twin generation.
- Deterministic offline Demo Mode uses bundled Mika sample data so judges can experience the complete care loop without network access, API credentials, or a new generation request.
The current hackathon build is local-first. Care records are stored on-device with SwiftData.
The Preview as Grandma experience is intentionally presented as a local caregiver simulation. It is not a claim of remote accounts, live household sync, or multi-device collaboration.
How I built it
PetTwin is a native iOS application built with SwiftUI and SwiftData.
The app is organised around a structured, append-only local care ledger. Screens such as Today, History, Daily Recap, Care Pass, Treat Jar, rewards, and Vet Report all derive from the same recorded events rather than creating separate versions of what happened.
The main technologies include:
- Swift;
- SwiftUI;
- SwiftData;
- PhotosUI and UIKit;
- Swift Testing and XCTest;
- Supabase anonymous authentication;
- Supabase Edge Functions;
- Deno and TypeScript;
- OpenAI GPT-5.6;
gpt-image-2;- Codex;
- Xcode and iOS Simulator tooling.
For Normal Mode, the iOS app authenticates anonymously through Supabase and sends minimal, action-specific requests to a JWT-protected Edge Function.
The OpenAI API key is never included in the iOS application. It remains a managed server-side secret, and the app never calls OpenAI directly.
The AI roles are deliberately separated:
- GPT-5.6 Terra analyses visible photo traits through a structured contract and can help organise a factual Vet Report. It does not certify breed or diagnose health.
- GPT-5.6 Luna produces optional missions and recap language from approved structured facts.
gpt-image-2creates the personalised soft-3D twin from the owner’s dog photo.- Deterministic local care facts remain available even when AI or networking is unavailable.
How Codex accelerated the project
Codex was used throughout the project—not only as a code generator.
It helped me:
- turn the product idea into a locked user journey and technical plan;
- implement the SwiftUI and SwiftData architecture;
- build onboarding, persistence, care logging, rewards, and reporting;
- integrate the authenticated Supabase AI gateway;
- create focused unit and UI tests;
- run repeatable Simulator build and QA loops;
- verify offline Demo behaviour;
- inspect accessibility and adaptive layouts;
- diagnose defects discovered during owner testing;
- keep changes scoped to approval gates;
- organise the repository, evidence, and submission documentation.
Codex significantly shortened the loop between identifying a problem, implementing a correction, and verifying that the correction did not disturb already approved areas.
The most important product decisions remained owner-controlled.
I defined and approved the problem, scope, user journey, visual direction, dog identity, local-first policy, caregiver-simulation boundary, AI safety rules, reward behaviour, wording, and final acceptance criteria.
Codex implemented and tested those decisions. It did not replace owner review.
Challenges
The hardest challenge was balancing emotional character design with trustworthy care information.
PetTwin needed to feel playful and alive without turning serious care information into a game that could mislead people. The twin, treats, and rewards create emotional engagement, but the underlying care record remains factual and traceable.
Another major challenge was maintaining honesty across the two runtime modes.
Demo Mode needed to be polished and repeatable while clearly remaining bundled local sample data. The app never presents Grandma as a real remote account and never suggests that the offline Demo performed live AI requests.
Personalised image generation created another important constraint. The generated twin must preserve the real dog’s identity without transferring Mika’s blue eyes, markings, or mascot identity to another dog. Identity preservation takes priority over forcing every dog into the same stylisation.
Generation is also not instantaneous. The demo openly discloses the measured generation delay rather than pretending the result appears immediately.
The final challenge was scope.
Real caregiver accounts, live sync, notifications, custom tasks, multiple pets, and production account recovery would all be valuable, but including them in the hackathon build would have weakened the reliability of the core care journey.
Accomplishments that I’m proud of
I am proud that PetTwin is more than an image-generation demo.
The final build includes:
- a complete photo-to-twin onboarding journey;
- a deterministic offline Demo Mode;
- an isolated Normal Mode store;
- structured caregiver and task provenance;
- Quick Log with toilet and unusual-event observations;
- ledger-backed treats and rewards;
- History, Daily Recap, Care Pass, and Vet Report;
- Reduce Motion support;
- VoiceOver semantics;
- Accessibility XXXL support;
- representative iPhone and iPad adaptive layouts;
- a secure server-side OpenAI boundary.
The frozen product build passed:
- 61 unit tests;
- 27 distinct UI tests;
- the complete offline Demo journey;
- Normal onboarding smoke testing;
- accessibility and adaptive-layout verification;
- repository and built-application secret scans.
Manual owner testing was equally important.
One late issue caused the Favourite Ball reward to unlock too early because the same persisted care event was effectively counted twice. Hands-on testing exposed it, Codex helped isolate the cause, and focused regression testing verified the correction before the product was frozen.
What I learned
The biggest lesson was simple:
Approve the experience first. Engineer the approved experience second.
For future projects, I would begin with the complete UI/UX journey and a realistic interactive prototype before investing deeply in persistence and backend architecture.
I also learned that AI is most useful when it operates inside clear product boundaries.
PetTwin does not ask AI to decide what is true. Owners provide and confirm the facts. AI helps organise, personalise, explain, and present those facts.
Finally, I learned that a passing test suite does not automatically mean a product feels correct.
Automated tests verified technical behaviour, but hands-on owner testing exposed usability, factuality, and emotional-coherence issues that only became visible when using the complete app as a real person.
What’s next
The next version of PetTwin would expand both the practical care system and the emotional relationship with the digital twin.
Practical additions could include:
- real caregiver accounts and invitations;
- live multi-device sync;
- custom household tasks such as buying food or collecting medication;
- reminders and notifications;
- automatically derived age from an optional date of birth;
- multiple-pet households;
- production account recovery and privacy controls.
The larger vision is a deeper, care-driven Tamagotchi-style companion built around real care rather than arbitrary gameplay.
The digital twin could respond to recorded routines through changes in:
- mood;
- energy;
- animation;
- environment;
- milestones;
- unlocked toys and accessories.
Future gamification could include:
- care streaks and household goals;
- animated reactions to completed routines;
- collectible toys, trophies, accessories, and environments;
- new milestones after each reward;
- personalised missions based on the dog’s routine;
- seasonal challenges and family achievements.
These reactions would reflect recorded care activity only. They would never diagnose the real dog or invent health information.
The long-term goal is for PetTwin to feel like a living digital companion: emotionally engaging enough to make people want to return every day, while helping everyone who loves the dog provide more consistent, visible, and connected care.
Built With
- auth
- codex
- deno
- edge
- functions
- gpt-5.6
- gpt-image-2
- openai
- photosui
- supabase
- swift
- swiftdata
- swiftui
- testing
- typescript
- uikit
- xcode
- xctest

Log in or sign up for Devpost to join the conversation.