- JavaScript 58.6%
- CSS 21.5%
- HTML 14.2%
- Shell 5.7%
- Add login page (public/admin/login.html) with scrypt-hashed auth - Session tokens in-memory Set; HttpOnly cookie; 30-day expiry - requireAuth middleware on all write routes + GET /admin - Display page and read-only APIs remain open (TV doesn't log in) - Set/change/remove password from Display tab > Admin Password section - Logout button in admin header when protection is active - admin_password_hash never exposed via any API response - Bump version to 2.5.0; update CHANGELOG, TASK.md, CLAUDE.md |
||
|---|---|---|
| public | ||
| scripts | ||
| .gitignore | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| database.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| server.js | ||
| TASK.md | ||
Digital Calendar Display
A full-screen digital calendar designed to run on a wall-mounted TV or monitor. Built with Node.js + Express, vanilla JS, and SQLite — no build step required.
Features
- Live clock with seconds display
- Month mini-calendar with event indicators
- Upcoming agenda — next 14 days of events
- Real-time updates via WebSocket — the display refreshes instantly when you add an event
- Web admin — add, edit, and delete events from any browser on your network
- iCal / Google Calendar sync — paste a secret iCal URL; events auto-sync hourly
- Colour-coded events with 8 colour presets
Quick Start
Prerequisites
- Node.js v18 or later
Install & run
git clone https://github.com/your-username/Digital_Calendar.git
cd Digital_Calendar
npm install
npm start
Open your browser:
| Page | URL |
|---|---|
| Display | http://localhost:3000/ |
| Admin | http://localhost:3000/admin |
Development (auto-restart on file changes)
npm run dev
Change the port
PORT=8080 npm start
Google Calendar sync (no API key needed)
- Open Google Calendar → Settings → click your calendar name on the left
- Scroll to "Secret address in iCal format" → copy the URL
- Paste it into the iCal Sync field on the Admin page → click Sync now
- Events will auto-sync every hour
Server install / update (Debian / Ubuntu)
One command installs everything — Node.js, the app, and a systemd service — or updates an existing install to the latest version:
curl -fsSL https://git.bennellit.com.au/sb/Digital_Calendar/raw/branch/main/scripts/install.sh | sudo bash
Re-running the same command is always safe; it pulls the latest code and restarts the service.
After the script finishes it prints the display and admin URLs for your server's IP. The service is named digital-calendar and starts automatically on boot.
Useful commands after install:
systemctl status digital-calendar
journalctl -u digital-calendar -f # live logs
systemctl restart digital-calendar
Change the port: edit /etc/systemd/system/digital-calendar.service, uncomment the PORT= line, then run sudo systemctl daemon-reload && sudo systemctl restart digital-calendar.
Kiosk / TV setup (Raspberry Pi)
- Install Node.js on the Pi and run
npm start - Open Chromium in kiosk mode:
chromium-browser --kiosk --noerrdialogs --disable-infobars http://localhost:3000 - Use a second device (phone/laptop) to visit
/adminand manage events
Project structure
server.js Backend (Express + WebSocket + iCal sync)
database.js SQLite data layer
public/
display/ Full-screen display page
admin/ Admin UI
calendar.db SQLite database (auto-created, gitignored)
License
MIT © 2026 sb