# Personal Gemini Journal: A Secure AI Reflection App

> Source: <https://dev.to/jidnya_26/personal-gemini-journal-a-secure-ai-reflection-app-28hp>
> Published: 2026-08-30 13:23:29+00:00

🧠 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](https://personal-journal-491827.ai.studio)

💻 **Source Code:**

[https://github.com/Jidnya-0926/personal-gemini-journal](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 pause, explore what they're thinking, recognize meaningful patterns, and identify what they can do next.

Write. Reflect. Understand. Grow.
