/ WEB APP

TBC Mount Hermon Website

A digital home for the congregation, zero hosting cost, managed by the church team.

Next.jsReactNextAuth v4Drizzle ORMbetter-sqlite3Bulma CSS
TBC Mount Hermon Website interface
0
Source of truth
0
Database tables
0
External DB cost
0
Sermons archived

01 / CONTEXT

Overview

THE CHALLENGE

The church was using a mix of Facebook posts, WhatsApp groups, and a static HTML page to communicate with its congregation. Events were announced in multiple places with conflicting details, the sermon archive was inaccessible to members who missed a service, and there was no central information hub.

THE SOLUTION

A Next.js app with a protected staff portal backed by better-sqlite3, an in-process SQLite library that runs inside the Node.js server with no external database. Drizzle ORM manages six tables: users, sessions, events, sermons, announcements, and gallery. NextAuth v4 credentials provider authenticates staff against bcrypt-hashed passwords stored in the users table. Public pages are statically rendered; revalidatePath flushes the cache after every admin mutation.

THE OUTCOME

The church team now manages all communication through a single platform. Members can find service times, upcoming events, and past sermons without contacting the office.

02 / WHAT IT DOES

Key features

In-Process SQLite (better-sqlite3)

better-sqlite3 runs the database inside the Next.js server process, no network calls to a remote database, no connection pooling, no idle compute cost. Synchronous API fits the Next.js server action model exactly.

Six-Table Drizzle Schema

users, sessions, events, sermons, announcements, and gallery, each with full TypeScript inference from the Drizzle schema. drizzle-kit push applies schema changes without a migration file workflow.

Interactive Event Calendar

Built with react-big-calendar in month, week, and agenda views. Staff add events through the admin dashboard; revalidatePath flushes the static cache so the public calendar reflects changes immediately.

Sermon Archive

A searchable archive by title, speaker, series, and date. Audio files link externally; the database holds metadata for fast client-side filtering without a search backend.

NextAuth v4 Credentials

Credentials provider validates staff username and password against the users table (bcryptjs). Session tokens stored in the sessions table, no third-party auth service or external session store.

03 / STACK

Tech decisions

Tap any item to see why it earned a place.

04 / PROCESS

How it came together

05 / HARD PARTS

Challenges & solutions

Public pages are statically generated for speed, but staff update events and sermons daily. Every server action calls revalidatePath on the affected route immediately after writing to SQLite, the static cache is flushed within the same request, not on a schedule.

better-sqlite3's synchronous API serialises writes naturally, there's no async write queue to manage. For this church's traffic (3 staff editors, low concurrency), SQLite's single-writer model is a feature, not a limitation.

LET'S BUILD SOMETHING TOGETHER

I'm always open to discussing new projects, partnerships, or just a good idea.