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
?entry=idprivate view?share=idpublic viewhistory.pushState, no page reloads
04 · Hard parts
- P-01
Login on phones.
signInWithPopupfailed on mobile browsers. Fix: a separate mobile flow withsignInWithRedirectandgetRedirectResult()on load. My first lesson in environment-specific behavior. - 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 topublicEntries. - P-03
Events on a dynamic UI.
The detail view is rendered with
innerHTML, and listeners went missing or got duplicated. Fix: onebindDetailEvents(), called once after each render. - 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. - P-05
Copying links in Safari.
navigator.clipboardisn't always available. Fix: a fallback withexecCommand, then a prompt.
05 · Self-audit
When the app worked, I audited my own code and fixed what would break later.
| ID | Problem | Fix | Status |
|---|---|---|---|
| A-001 | ProblemopenEntry() set ?entry= even in public view | FixSkip it in public view | Done |
| A-002 | ProblemListeners attached inside the render | FixOne bindDetailEvents() after render | Done |
| A-004 | ProblemrenderEntries() called in many places, even before login | FixOne source of truth for rendering | Done |
| A-005 | ProblemshowListView() mixed navigation with data | FixViews only switch; render runs only when entries change | Done |
| A-006 | ProblemTwo different save flows | FixOne persistEntry() for both | Done |
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.