# 🌿 Grateful Journal

> *A minimal, private-first gratitude journaling app. Write what you're grateful for. Nothing more, nothing less.*

---

## ✨ What is this?

Grateful Journal is a personal journaling app built around one simple habit — writing down what you're grateful for each day. No social feeds, no algorithms, no sharing. Just you and your thoughts.

The app is designed to get out of your way. Open it, write a sentence or a page, save it. Done.

---

## 🔐 Privacy by Design

Every journal entry is **end-to-end encrypted** before it ever leaves your device. The server stores only ciphertext — it has no ability to read your entries, even if compromised.

**How it works:**

- 🔑 You sign in with Google. Your Firebase UID is used to derive a 256-bit master key via Argon2i key derivation.
- 🛡️ Your entries are encrypted client-side using XSalsa20-Poly1305 (libsodium) before being sent to the backend.
- 📦 The backend stores only the encrypted blob (ciphertext + nonce). No title, no content, no plaintext.
- 🧠 Decryption happens entirely in your browser using the in-memory master key.
- 🔒 Logging out clears the key from memory. Your device key persists so the next login is seamless.
- 🌐 The same Google account works across devices — the master key is deterministically derived from your credentials, so your entries are always accessible.

> **What the server can never see:** your entry titles, your entry content, anything you write.

---

## 🚀 Features

| Feature | Description |
|---------|-------------|
| ✍️ **Write** | A clean, distraction-free writing area. Give your entry a title and write your thoughts. |
| 📅 **History** | A calendar view of all your past entries. Green dots mark the days you wrote. |
| ⚙️ **Settings** | Change your display name, profile photo, and app theme (light / dark). |
| 🧭 **Onboarding Tour** | A guided walkthrough on first login to show you around. |
| 🔐 **Encrypted Storage** | Every entry encrypted end-to-end with industry-standard cryptography. |

---

## 🛠️ Tech Stack

| Layer | Technology |
|-------|-----------|
| 🖥️ Frontend | React 19 + TypeScript, Vite |
| 🔑 Auth | Firebase (Google Sign-In) |
| 🔐 Encryption | libsodium — XSalsa20-Poly1305, Argon2i |
| ⚙️ Backend | FastAPI (Python) |
| 🗄️ Database | MongoDB |
| 🐳 Deployment | Docker — nginx, FastAPI, MongoDB |

---

## 💭 Philosophy

Most journaling apps are over-engineered. Prompts, streaks, mood tracking, sharing — all noise. This app exists for one thing: a private place to write what you're grateful for.

The encryption isn't a feature, it's a requirement. A journal is personal. It should stay that way.

---

<!-- *Built by Jeet Debnath* -->
