Submission for the Google Cloud x Hack2Skill Ideathon Challenge: Build a Secure "Personal Gemini Journal" — Gen AI Academy APAC Edition, Cohort 3.
The Challenge
Most AI-generated apps look great in a demo and fall apart in production — hardcoded keys, no auth boundaries, shared databases with zero isolation. The challenge: configure Google AI Studio to think like a security engineer before writing a single line of code, then ship a real, production-grade application on top of that foundation.
Phase 1 — Configuring AI Studio as a Security-First Foundation
Before generating any code, I set up Google AI Studio with custom System Instructions establishing a standing "constitution" for the build: threat-model every feature before implementing it, never hardcode secrets, enforce per-user database isolation by default, and apply secure coding standards throughout.
Phase 2 — What I Built
A full-stack Personal Gemini Journal: React (Vite) frontend, Node.js/Express backend.
- Real Firebase Authentication — email/password sign-in via the Firebase client SDK. Every backend API call carries the resulting ID token, verified server-side with the Firebase Admin SDK before any data is touched.
- Multi-turn AI journaling — real conversations with the Gemini API, with cascading model fallback for resilience.
- Isolated Firestore storage — every user's data lives at /users/{uid}, keyed strictly by the server-verified UID — never a client-supplied field. Matching firestore.rules enforce the same boundary.
- Secure key management — the Gemini API key is designed to be retrieved via Google Cloud Secret Manager at runtime, never hardcoded.
Phase 3 — Feature Enhancements Beyond the Base Spec
- Multi-tab conversations — each chat tab is an independent thread, so a user can hold several parallel reflections without losing context.
- Smart RAG semantic search — query past entries by meaning, not keyword matching.
- Autonomous goal-extraction agent — synthesizes unstructured journal logs into milestones, roadblocks, and a prioritized action checklist.
- Emotional trend analytics — aggregated positivity scoring with an on-demand Gemini-generated deep-dive.
Architecture
Dockerized with a multi-stage build (React frontend compiled and served by the same Express container as the API), Cloud Run–ready, health-check-safe on Cloud Run's injected $PORT.
Repo: https://github.com/Nikita-Parjane27/personal-gemini-journal-fullstack
Video walkthrough: https://youtu.be/ECT_7hqBh3w





Top comments (0)