← Back

PROJECT 002 · 2025–26 · JS · FIREBASE

Journalist

A journaling app with Google login, a real database and public share links. My first project built without a tutorial, and the first app I use every day.

lines of JavaScript
~1,100
commits
30
built
Dec 2025 – Mar 2026
in use
Daily

00 · Summary

WHAT
Journaling and notes app for the phone and the web
MY ROLE
Solo: idea, design, code, deployment
STACK
Vanilla JavaScript, Firebase Auth (Google), Firestore, Firebase Hosting, service worker
STATUS
Live. Used every day instead of the default notes app.

01 · Why I built it

Courses taught me pieces of JavaScript, but not how they fit together. Small topics, small examples, no context. So I decided to build something real, with a real purpose and real problems.

I wanted an app simple enough to finish and useful enough to use every day: notes, plans, shopping lists, learning. No framework on purpose. I wanted to understand the DOM, events, state, rendering and data flow first.

02 · What it does

  • Google login, popup on desktop and redirect on mobile
  • Write, edit and delete entries
  • Search and filter by category
  • Full detail view
  • Public read-only share link
  • Draft saved automatically while typing
  • Category dropdown built from existing entries
  • Light and dark theme
  • App shell cached by a service worker

03 · Architecture

DATABASE → STATE → UI

FirestoreloadEntriesFromFirestore()entries (app state)refreshListUI()renderEntries()UI
UIpersistEntry()Firestorereloadrender
FIG. 1 — DATA FLOWNTS
users/{uid}/entries/{entryId}private entriespublicEntries/{entryId}shared copy, read-only
FIG. 2 — DATA MODELNTS
boot()URL has ?share=?yesloadSharedEntry()public read-only view (no login)noinitAuth()logged inload entrieslist viewnot logged inlogin view
  • ?entry=id private view
  • ?share=id public view
  • history.pushState, no page reloads
FIG. 3 — BOOT AND ROUTINGNTS

04 · Hard parts

  1. P-01

    Login on phones.

    signInWithPopup failed on mobile browsers. Fix: a separate mobile flow with signInWithRedirect and getRedirectResult() on load. My first lesson in environment-specific behavior.

  2. P-02

    Shared links.

    A link had to open one entry directly, without login and without edit buttons. Fix: boot() checks ?share= before auth, initAuth() never overrides the public view, and the entry is copied to publicEntries.

  3. P-03

    Events on a dynamic UI.

    The detail view is rendered with innerHTML, and listeners went missing or got duplicated. Fix: one bindDetailEvents(), called once after each render.

  4. P-04

    Mobile-only bugs.

    Scroll jumps while typing, sticky hover states, tap highlight, long words breaking cards. Fix: overflow-wrap, word-break, touch states and reworked textarea behavior.

  5. P-05

    Copying links in Safari.

    navigator.clipboard isn't always available. Fix: a fallback with execCommand, then a prompt.

05 · Self-audit

When the app worked, I audited my own code and fixed what would break later.

IDProblemFixStatus
A-001ProblemopenEntry() set ?entry= even in public viewFixSkip it in public viewDone
A-002ProblemListeners attached inside the renderFixOne bindDetailEvents() after renderDone
A-004ProblemrenderEntries() called in many places, even before loginFixOne source of truth for renderingDone
A-005ProblemshowListView() mixed navigation with dataFixViews only switch; render runs only when entries changeDone
A-006ProblemTwo different save flowsFixOne persistEntry() for bothDone

06 · What I learned

  • Think in systems. Data, state, rendering and events are separate parts.
  • Change data, then re-render. One source of truth makes the app predictable.
  • Real debugging. Bugs without clear reasons, and bugs that only happen on phones.
  • From "make it work" to "make it feel right". Spacing, interactions, small UX details.
  • What it means to finish. Features, fixes, clean-up, documentation, deployment.