Book Notes App

Book Notes — Case Study

A full-stack reading tracker built with Node.js, Express, PostgreSQL, and EJS.
My own private space on the internet to store book notes, ratings, and reading history — complete with automatic book-cover fetching.


Background / Why This Exists

I’ve always wanted a dedicated corner of the internet where I can manage my own reading progress — not Goodreads, not some SaaS app, but something built entirely for me.

I wanted:

That turned into Book Notes, a small but full-stack app with real authentication, database-backed CRUD operations, and a surprisingly fun retro-gold UI theme.


Project Goal

The goal for this project was to build a personal tool that would let me:

It’s a simple idea, but it touches almost every core skill required in real backend development.


My Role

This project is fully built by me — design, backend, frontend, database, deployment.
My responsibilities included:

It’s a solo-build, end-to-end.


Architecture Overview

Stack

Design Philosophy

The app uses traditional server-side rendering instead of React.
Every page is:

It follows the clean MVC pattern:

models/ → database queries
services/ → external APIs
views/ → EJS templates
routes → express logic
index.js → main server

How It Works (Flow)

  1. User logs in using a simple session-based form.
  2. Once authenticated, they can access the dashboard.
  3. Adding a book triggers:
    • validation
    • optional cover lookup from Open Library
    • insert into PostgreSQL
  4. Editing or deleting uses PATCH/DELETE via method-override.
  5. Sorting is done directly at the database level.
  6. EJS templates render the UI with updated results.

A small example of auto-cover fetching:

const fetchCover = async (title) => {
  const url = `https://openlibrary.org/search.json?title=${title}`;
  const res = await fetch(url);
  const data = await res.json();

  return data?.docs?.[0]?.cover_i
    ? `https://covers.openlibrary.org/b/id/${data.docs[0].cover_i}-L.jpg`
    : null;
};

This makes adding new books surprisingly effortless.


Key Challenges & Solutions

1. Handling cover-image fallback logic

Sometimes the Open Library API returned no results, missing indexes, or incorrect cover IDs.

Solution:
Added graceful fallbacks — either use the provided URL or default to a placeholder.
The UI never breaks.


2. Designing an expressive database model

Books needed:

Solution:
Created a clean PostgreSQL schema and abstracted database logic into a separate /models folder.


3. Authentication without any frameworks

I didn’t want Passport.js or heavy OAuth — just a lightweight personal login.

Solution:
Using express-session with a simple credential check stored in .env kept things fast, minimal, and perfect for a private dashboard.


4. Making retro-gold UI look premium

A retro-golden theme can look messy if done wrong.
It needed to feel subtle, modern, and cozy.

Solution:

This gave the app a warm identity instead of looking like boilerplate CSS.


Outcomes / Learnings

Book Notes ended up becoming one of my most practical personal tools.

What I learned:

It’s a small project on the surface, but it taught me a lot about foundational backend engineering.


Final Thoughts

Book Notes wasn’t made for show, it was made for use.
It helped me understand real backend patterns, sharpen my database thinking, and build something I genuinely enjoy opening every day.

It’s not a flashy “API toy”, it’s a full-stack personal tool, and one of my most meaningful builds.