Skip to content

Migrate to SSR with archive system, auth, and EC2 deployment#30

Open
jploskey wants to merge 80 commits into
mainfrom
ssr-migration-and-archives
Open

Migrate to SSR with archive system, auth, and EC2 deployment#30
jploskey wants to merge 80 commits into
mainfrom
ssr-migration-and-archives

Conversation

@jploskey

@jploskey jploskey commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Migrates the dashboard from a static SPA to a server-rendered Nuxt app running on EC2, and adds a full archive and authentication system.

  • SSR enabled with Nitro server engine, Caddy reverse proxy, and systemd service
  • SQLite database with auto-migrations for users, sessions, and archive records
  • Cookie-based auth with scrypt password hashing, admin/viewer roles, login page, and user management UI
  • S3 proxy middleware for plot images, discrete data, spectrograms, echograms, and archives
  • Three archive types: scheduled (automatic daily via cron), event (user-created), and internal (admin-only, auth-gated)
  • Archives stored in S3 under archives/<type>/<key>/QAQC_plots/ with automatic retention policy
  • Archive viewer with sidebar dropdown, banner, type filter tabs persisted in URL, and conflict detection
  • Archives page with create/delete dialogs, role-based visibility, and SSR-compatible data loading
  • Centralized useAuth Pinia store with SSR state hydration via callOnce
  • usePersisted composable reads URL query params during SSR to avoid hydration mismatches
  • Trailing slash redirect middleware to prevent 404s from cached redirects
  • Scheduled tasks for archive cleanup, database backup to S3, and session expiry
  • Configurable archive schedule via QAQC_ARCHIVE_SCHEDULE environment variable
  • CI/CD workflow builds on GitHub Actions and deploys built output to EC2 via SCP
  • Documentation covering environment variables, S3 bucket structure, auth, server logs, and troubleshooting

@jploskey jploskey added the enhancement New feature or request label May 11, 2026
jploskey added 29 commits May 10, 2026 18:48
jploskey added 18 commits May 13, 2026 15:13
…er, drop `triggered_by` and `image_count` columns
@jploskey jploskey added the documentation Improvements or additions to documentation label May 16, 2026
@jploskey jploskey changed the title Add archive system with auth, S3 snapshots, and EC2 deployment Migrate to SSR with archive system, auth, and EC2 deployment May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant