Inspiration
Living as an iOS developer in Tainan, the cultural capital of Taiwan, my life is deeply intertwined with historic sites and ancient temples. Every day, passing by the Grand God of War Temple (Wu Miao) and smelling the grounding scent of incense, I often wondered: In this era of AI explosion, can traditional "blessing" rituals find a new digital carrier?
2026 is the Year of the Horse (Fire Horse). In traditional numerology, the Fire Horse symbolizes momentum and change. I observed that modern people's emotional reliance on "pets" often exceeds their prayers to deities. Many even view their furry friends as family members or spiritual guardians.
"What if my cat could transform into the God of Wealth to protect me?"
This thought struck me. Traditional ceremonies like "An Tai Sui" (pacifying the presiding god) require queuing and writing paper petitions. But in the digital age, we can write petitions with code and invite gods with AI. Thus, "Lucky Pet AI" was born—not just an image generation app, but a "Digital Temple in your pocket," an experiment merging technology, culture, and faith.
What it does
Lucky Pet AI is a digital amulet app that combines Google Gemini Generative AI with Taiwanese Temple Culture.
AI Transformation Ritual: Users upload photos of their pets. Utilizing Gemini 3 Pro's multimodal capabilities, the app transforms them into 3D Pop Mart-style auspicious guardians (e.g., an Orange Cat in a God of Wealth costume, or a French Bulldog in Red Hare armor).
Precision Calligraphy: We solved the common pain point of AI generating garbled Traditional Chinese text. The app inscribes the user's Pet Name and New Year Wish onto the amulet in authentic Gold Brush Calligraphy style.
Digital Divination Experience: Using iOS Core Motion technology, users must physically shake their phone to cast the divination blocks (Jiaobei). The generation ritual only begins after receiving a "Divine Answer" (Saint Cup), recreating the authentic temple prayer process.
Consecration Animation: During the generation wait time, the screen displays a "Consecration" animation with golden light and swirling incense smoke, transforming the waiting anxiety into a sacred ritual experience.
How we built it
As a solo developer, I adopted a Serverless architecture to maximize efficiency:
iOS Frontend (Swift + UIKit): Built with MVVM architecture and implemented physical motion detection via CoreMotion. The UI design fuses modern aesthetics with traditional temple elements (Red paper & Gold ink textures).
AI Core (Google Vertex AI): We chose Gemini 3 Pro as the generation engine. Leveraging its strong multimodal capabilities, I designed a "Template Locking" prompt strategy to ensure consistent style and accurate text rendering.
Backend Automation (Firebase Cloud Functions): We implemented a "Firestore Trigger" architecture. Once a user successfully pays and the record is written to Firestore, a Cloud Function is automatically triggered to generate the image and save it to Storage. This ensures that even if the user's phone disconnects, the order is never lost ("Zero-Drop").
Identity & Payment (SIWA & RevenueCat): Integrated Sign in with Apple for privacy and security, and used RevenueCat to manage consumable in-app purchases (The "Offering").
Challenges we ran into
AI Text Hallucinations: Early AI models struggled to render correct Traditional Chinese characters on images. I developed a "Smart Text Integration" prompt logic, explicitly instructing the AI: "If there is a scroll, replace the text; if not, generate a floating gold plaque in the empty space." This significantly improved text accuracy.
Managing User Expectations: Users sometimes felt the AI-generated guardian didn't look exactly like their pet. I learned the importance of "Expectation Management." I added a cultural disclaimer in the UI, emphasizing that the result captures the "Spirit and Aura, not just the physical form," reframing a technical limitation as a concept of "Fate" and "Destiny."
App Store Review: Apps with AI generation and IAP face strict scrutiny. I successfully passed the review by providing detailed "Testing Guides" (instructing reviewers to use their own Apple ID) and highlighting the "Native Interaction (Phone Shaking)" feature, proving that this wasn't just a simple web wrapper.
Accomplishments that we're proud of
The "Code Consecration" Ritual: I physically took the MacBook Pro containing the source code to the Tainan God of War Temple and performed a consecration ritual in front of the Red Hare statue. This became the app's strongest trust endorsement and marketing story.
Zero-Drop Architecture: Successfully implemented an asynchronous Webhook + Firestore Trigger workflow. Even if the user's phone runs out of battery immediately after payment, the cloud automatically generates the image and notifies the user via FCM push notification when it's ready.
Fusion of Culture and Tech: We successfully packaged cold AI technology into a warm "Temple Ritual," allowing users to feel the depth of traditional Taiwanese culture while interacting with the app.
What we learned
Prompt Engineering is the New Coding: Learning how to precisely instruct the AI (e.g., "Gold Lacquer Calligraphy," "No Human Faces") became more critical than writing Swift UI code.
The Value of Rituals: Technology solves problems, but Culture soothes the soul. Users are willing to pay not just for the image, but for the complete process of "Consecration" and "Prayer."
Embracing Imperfection: AI generation always involves randomness. As developers, our job isn't to eliminate all variables, but to build guidance within the variables, ensuring users feel surprised rather than shocked
What's next for 萌寵守護
AR Manifestation Mode: Using ARKit to let users project their 3D Guardian Beast onto their real-world desk for interaction.
Temple Collaborations: Planning to partner with more famous Taiwanese temples (e.g., God of Wealth temples, Matchmaking God temples) to launch exclusive "Co-branded Divine Templates."
Physical Merch: Integrating cloud printing services, allowing users to print their digital amulets into physical stickers or cards and have them delivered to their homes.
Log in or sign up for Devpost to join the conversation.