π§ Personal Gemini Journal: A Secure AI Reflection App with Gemini, Firebase & Cloud Run
Write β Reflect β Understand β Act
I built Personal Gemini Journal as part of the Google Cloud Run AI Challenge.
Traditional journaling helps us record our thoughts, but it doesn't always help us understand them. I wanted to build a private AI-powered journaling experience where users can reflect, have meaningful conversations with AI, and turn their thoughts into actionable insights.
Users often struggle with:
Most AI chat applications also aren't designed around persistent, user-isolated reflection sessions.
Personal Gemini Journal combines private journaling with Google Gemini.
Users can create a reflection session and have a multi-turn conversation with Gemini. After reflecting, the application can generate structured insights from the complete session.
The core experience is:
Write β Reflect β Understand β Act
Users can continue a contextual conversation with Gemini instead of receiving only a single AI response.
Gemini analyzes a completed reflection session and generates:
The Synthesis feature creates a higher-level understanding of the complete session, including:
Journal sessions and interactions are stored in Cloud Firestore, allowing users to:
Users can search previous reflections and organize them using mood categories.
The generated Action for Tomorrow can be copied instantly.
Users can export their personal journal data as a JSON archive.
Privacy is a core part of the application because journal entries can contain personal information.
Users authenticate through Firebase Authentication with Google Sign-In.
Journal data is organized using Firebase UID-based paths:
/users/{uid}/sessions
/users/{uid}/interactions
/users/{uid}/insights
Firestore Security Rules enforce that authenticated users can only access their own data.
Gemini requests are handled through the trusted Express backend.
The Gemini API key is kept server-side and is not hardcoded into frontend code.
The deployment uses secure server-side secret handling with Google Cloud Secret Manager.
The backend includes:
ββββββββββββββββββββ
β USER β
β BROWSER β
ββββββββββ¬ββββββββββ
β
βΌ
βββββββββββββββββββββββ
β React Frontend β
β React + TypeScript β
βββββββββββ¬ββββββββββββ
β
ββββββββββββββ΄βββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββ βββββββββββββββββββ
β Firebase Auth β β Express Backend β
β Google Sign-In β β API β
ββββββββββββββββββ ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Google Gemini β
β β
β Chat β
β Insights β
β Synthesis β
βββββββββββββββββββ
βββββββββββββββββββββββββββββββ
β Cloud Firestore β
β β
β UID-based private storage β
βββββββββββββββββββββββββββββββ
β
βΌ
Google Cloud Run
User
β
βΌ
Google Sign-In
β
βΌ
Private Dashboard
β
βΌ
Create Reflection
β
βΌ
Multi-Turn Gemini Conversation
β
βΌ
Save Session to Firestore
β
ββββββββββββββββββββ
βΌ βΌ
Reflection Session
Insights Synthesis
β β
ββββββββββ¬ββββββββββ
βΌ
Actionable Takeaways
β
βΌ
Persistent Journal
| Technology | Purpose |
|---|---|
| React 19 | Frontend |
| TypeScript | Application development |
| Tailwind CSS | UI styling |
| Lucide React | Icons |
| React Markdown | AI response rendering |
| Express | Backend API |
| Google Gemini | AI reflection and analysis |
@google/genai |
|
| Gemini SDK | |
| Firebase Authentication | Google Sign-In |
| Cloud Firestore | Persistent user data |
| Google Cloud Secret Manager | Secret management |
| Google Cloud Run | Deployment |
| Vite | Frontend build |
| esbuild | Backend bundling |
The application was deployed from Google AI Studio to Google Cloud Run.
personal-gemini-journal
asia-southeast1
dev-tutorial=cloud-run-ai-challenge
The Cloud Run deployment provides the production environment for the application, while the Express backend handles server-side Gemini requests.
The application was tested for:
π Live App:
https://personal-journal-491827.ai.studio
π» Source Code:
https://github.com/Jidnya-0926/personal-gemini-journal
This project was built for the Google Cloud Run AI Challenge.
The application demonstrates how:
Google Gemini + Firebase Authentication + Cloud Firestore + Express + Google Cloud Run
can be combined to create a secure, authenticated and persistent AI application.
The focus was not just on connecting an AI model to a UI, but on building the surrounding architecture:
Authentication β Authorization β Data Isolation β Secure API Access β AI β Persistent Experience
Personal Gemini Journal is designed to make journaling more than simply storing thoughts.
It helps users , explore what they're thinking, recognize meaningful patterns, and identify what they can do next.
Write. Reflect. Understand. Grow.