Technology Sep 06, 2026 · 2 min read

Building Personal Gemini Journal: A Secure AI Sanctuary Powered by Cloud Run & Gemini API

Submission for the Accelerate AI with Cloud Run APAC Ideathon 2026 Personal reflection and journaling are most effective when private, intuitive, and insightful. For the Accelerate AI with Cloud Run APAC Ideathon, I built Personal Gemini Journal—a full-stack journaling application combining conve...

DE
DEV Community
by Nirvik K.C.
Building Personal Gemini Journal: A Secure AI Sanctuary Powered by Cloud Run & Gemini API

Submission for the Accelerate AI with Cloud Run APAC Ideathon 2026

Personal reflection and journaling are most effective when private, intuitive, and insightful. For the Accelerate AI with Cloud Run APAC Ideathon, I built Personal Gemini Journal—a full-stack journaling application combining conversational AI, real-time voice input, automated mood analytics, and external automation webhooks, all backed by Google Cloud serverless infrastructure.

🛠️ System Architecture & Google Cloud Integration

The application combines serverless scale with security-first architecture:

  1. Google Cloud Run: Hosts the stateless web application container with auto-scaling from zero.
  2. Gemini API (via Google AI Studio): Powers multi-turn conversational processing, automated reflection summaries, dynamic mood tag extraction, and sentiment trajectory calculations with resilient multi-model failover.
  3. Firebase Authentication: Handles user identity via Google OAuth SSO to guarantee that every journaling session is tied to an authenticated UID.
  4. Cloud Firestore: Provides per-user database isolation via strict security rules (/users/{userId}/journals/{document=**}). Cross-tenant data leaks are blocked at the database tier.
  5. Google Cloud Secret Manager: Manages server-side runtime secrets and keys safely outside client bundles.

✨ Key Features & Enhancements

  • 🔒 Per-User Data Isolation: Database-level rules guarantee total user privacy.
  • 🎙️ Voice-to-Text Dictation Mode: Native speech-to-text integration using the browser's Web Speech API.
  • 📊 Mood Analytics & Sentiment Arc Tracker: Automatically extracts emotional tags and plots mood trajectories across historical entries in the Archive view.
  • 🔔 External Webhook Notifications: Dispatches asynchronous JSON payloads (entry snippet, mood tag, timestamp) to configured Discord/Slack endpoints or HTTP receivers without blocking user actions.

📸 Application Walkthrough

1. Conversational Journaling & Voice Input

Gemini Journal Active Session

2. Automated AI Summary & Mood Analytics

Gemini Journal AI Summary

🛡️ Security Architecture & Firestore Rules

To enforce strict security and user privacy, Cloud Firestore access is restricted exclusively to authenticated owners:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{userId}/journals/{document=**} {
      allow read, write: if request.auth != null && request.auth.uid == userId;
    }
  }
}

Note: Webhook notification triggers execute in non-blocking try/catch wrappers to ensure third-party network failures never interrupt journaling.

🔗 Try the Project

Live Prototype: https://geminijournalnirvik2026.ai.studio

GitHub Repository: https://github.com/Nirvik-49/personal-gemini-journal

AccelerateAIwithCloudRun

DE
Source

This article was originally published by DEV Community and written by Nirvik K.C..

Read original article on DEV Community
Back to Discover

Reading List