DCS UPT is now a data-driven training site with an admin CMS for managing sections, learning paths, and content items from the frontend.
- Added a Node/Express server with SQLite persistence.
- Added admin authentication with session-based access control.
- Added CMS entities:
- Sections
- Learning Paths
- Content Items
- Content Links
- Audit Logs
- Converted phase pages (
/phases/*.html) to render from API data. - Added read-only fallback JSON on phase pages if API is unavailable.
- Added admin UI:
/admin/login.html/admin/index.html
cd /tmp/workspace/joemurrell/dcsupt
npm install
npm startApp runs on http://localhost:3000 by default.
Set your own in env vars for production.
- username:
admin - password:
admin123!
PORT(default3000)DATABASE_PATH(default./data/dcsupt.sqlite)SESSION_SECRET(set a strong random value in production)ADMIN_USERNAME(defaultadmin)ADMIN_PASSWORD(defaultadmin123!, used only for first seed)
npm testRailway is the best fit for this app because it needs server-side auth and a database.
- Connect this repo to Railway.
- Set environment variables (
SESSION_SECRET, admin credentials). - Deploy with start command
npm start. - Attach persistent volume or managed DB path for
DATABASE_PATH.
GitHub Pages can only host static files, so admin login + CMS write operations are not supported there by themselves.
You can still host static pages on GitHub Pages in read-only mode and point them to a separate backend API hosted on Railway.
From the admin dashboard you can:
- Add/edit/delete sections and learning paths
- Add/edit/delete content items
- Move items between sections/paths
- Reorder items (drag and drop + save)
- Publish/unpublish content
- Add/edit/delete related links per item
- This repository remains framework-light and keeps the original site design.
- Existing phase URLs are preserved.