nmemmertandClaude Opus 5.5 0f1a9c3d5b Move chunk builder into SetupPage via useChunkBuilder
- The setup form, active chapter tab, verse range selection, typed/bulk/
  cross-chapter chunk creation, reorder, and delete move out of App.
- Setup now opens on the chapter holding the chunk last studied (e.g.
  after Back to Chunks), and the Add Chapter form suggests the chapter
  after the project's last one instead of repeating the current one.
- openNewProject/goHome/resume/import no longer reset setup state by hand;
  SetupPage starts fresh each time it opens.
- Tests: add-chapter default, Back to Chunks chapter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-22 15:01:53 -04:00

Bible Study App

A self-hosted Bible study tool with notes, projects, and user accounts.


Requirements

  • Node.js v18 or higher — nodejs.org
  • npm (bundled with Node.js)
  • GCC / make (only needed for production/server installs — required to build the better-sqlite3 native module)

Quick Start

git clone https://github.com/nmemmert/study-bible-project.git
cd study-bible-project
bash setup.sh

setup.sh installs dependencies, builds the optimized frontend, and runs one production server (frontend + API) on http://localhost:5173. Set APP_PORT to use a different port. If the build fails, the previously running server is left untouched. bash restart.sh pulls the latest code and does the same.

Stop / logs:

kill $(cat .api.pid)
tail -f .api.log

Development mode (hot reload)

bash setup.sh --dev

Starts the API on http://localhost:3001 and the Vite dev server on http://localhost:5173. Dev mode is much slower, so don't use it for real users.


Production Install (Ubuntu / systemd)

Installs the app as a persistent systemd service under /opt/study-app.

# Install Node.js 20 (if not already installed)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# Install build tools (required for better-sqlite3)
sudo apt-get install -y build-essential python3

# Clone and install
git clone https://github.com/nmemmert/study-bible-project.git
cd study-bible-project
sudo bash deploy/install.sh

The installer will:

  1. Install Node.js dependencies and build the frontend
  2. Create a study-app system user
  3. Register and start a systemd service

Useful commands after install:

systemctl status study-app          # Check service status
journalctl -u study-app -f          # Stream logs
systemctl restart study-app         # Restart after an update

Open the firewall port (if needed):

sudo ufw allow 3001/tcp
sudo ufw reload

The app listens on port 3001 by default. Set the PORT environment variable in the systemd unit to change it.


Updating (Production)

cd /path/to/study-bible-project
git pull
sudo bash deploy/install.sh

The installer preserves the session secret across updates so logged-in users are not signed out.


Migrating to a New Machine

On the old machine — create a backup:

npm run backup

This creates study-app-backup_<timestamp>.zip in the project root.

On the new machine — restore after cloning and installing:

Development:

npm run restore study-app-backup_<timestamp>.zip

Production (after sudo bash deploy/install.sh completes):

sudo bash scripts/restore-data.sh study-app-backup_<timestamp>.zip --production

See scripts/backup-data.sh and scripts/restore-data.sh for details.


Project Structure

├── server/          # Express API + SQLite database
│   └── data/        # projects.db lives here (gitignored)
├── src/             # React frontend (Vite)
├── deploy/          # systemd service unit + install script
├── scripts/         # backup / restore helpers
└── setup.sh         # Development quick-start

License

Private / personal use.

S
Description
No description provided
Readme
29 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 99%
Shell 0.7%
CSS 0.2%