Inspiration

In today's hyper-connected, fast-paced world, burnout, stress, and emotional fatigue are at an all-time high. Finding a moment of true peace or visiting a physical sanctuary is often impossible due to time constraints and geographical borders. We were inspired by the profound tranquility of traditional Thai temples and mindfulness practices. We wanted to build a bridge between ancient spiritual wisdom and modern technology, creating a "Digital Sanctuary" that is instantly accessible to anyone, anywhere in the world, regardless of the language they speak.

What it does

PeaceAI: The Global Sanctuary acts as your personal, on-demand digital monk. When you tell the app how you are feeling (e.g., "I'm overwhelmed with work" or "I need some luck today"), it dynamically generates a fully immersive, multimodal meditation space just for you.

In seconds, the app:

  • Analyzes your emotional state to understand what you truly need.
  • Presents a personalized, comforting prayer translated into beautiful English prose.
  • Generates a hyper-realistic, cinematic 9:16 visual of a serene Thai temple interior.
  • Chants a traditional blessing in a deep, authentic Thai monk voice with a spatial echo effect.
  • Immerses you by using your phone's gyroscope, allowing you to tilt your device and "look around" your newly generated sanctuary.

How we built it

We architected a robust, serverless pipeline that interleaves multiple AI models simultaneously:

  • The Intelligence (Gemini 2.5 Flash): Acts as our core reasoning engine. It extracts emotional keywords from user input and translates ancient Thai texts into English in real-time.
  • The Database (Google Sheets API): We used a RAG (Retrieval-Augmented Generation) approach where a Google Sheet acts as our dynamic CMS, storing our categories, base prompts, and raw Thai prayers.
  • The Vision (Imagen 3): Prompt-engineered to generate highly detailed, cinematic meditation halls based on the emotional category.
  • The Voice (Google Cloud TTS): Utilizes the Neural2-C Thai voice to synthesize the authentic, slow-paced chanting of a monk, reading the raw SSML-tagged Thai text from our database.
  • The Infrastructure: A FastAPI Python backend deployed on Google Cloud Run handles the orchestration, while the frontend is built in React Native (Expo), utilizing device motion sensors for the parallax tilt effect.

Challenges we ran into

  • The "Language Fusion" Puzzle: We wanted the UI to be globally readable (English) but the audio to remain traditionally authentic (Thai). We solved this by splitting our data pipeline in the backend—sending the raw Thai strings to the TTS engine while simultaneously prompting Gemini to translate that same string into English for the frontend display.
  • Multimodal Synchronization: Coordinating three separate APIs (Gemini, Imagen, and TTS) to generate content concurrently without causing massive loading times for the user.
  • Consistent Visual Aesthetics: Imagen 3 is incredibly powerful, but getting it to consistently output "peaceful, cinematic temple interiors" instead of random art required building a prompt-decoration layer in our backend that automatically injects stylistic modifiers (like "8k, golden hour lighting, photorealistic") into the search query.

Accomplishments that we're proud of

We are incredibly proud of moving beyond the standard "text-in, text-out" chatbot model. We successfully orchestrated a truly multimodal AI experience where text, image, and audio generation are fused with device hardware (gyroscope sensors) to create an output that feels like a living, breathing space rather than just a screen of data.

What we learned

Building PeaceAI taught us how to effectively chain different GenAI tools together. We mastered dynamic prompt engineering for both Large Language Models (for intent extraction/translation) and Diffusion Models (for image generation). We also gained deep, hands-on experience navigating Google Cloud IAM permissions and deploying serverless Python applications on Cloud Run.

What's next for PeaceAI: The Global Sanctuary

  • Conversational Spiritual Counseling: Integrating the Gemini Live API to allow users to have a continuous, real-time voice conversation with the AI monk.
  • Wearable Health Sync: Connecting to smartwatches to detect elevated heart rates or stress levels and proactively sending a push notification suggesting a 1-minute digital sanctuary break.
  • Augmented Reality (AR): Allowing users to project their personalized meditation hall directly into their physical room using AR spatial computing.

Built With

  • cloudiam
  • expo-sensors-(gyroscope)
  • expoav
  • fastapi
  • gemini-2.5-flash
  • genai
  • google-cloud-run
  • google-cloud-text-to-speech
  • googlesheetapi
  • imagen-3-(vertex-ai)
  • python
  • react-native
Share this project:

Updates