Skip to content

Production deploy: PostgreSQL migration, Arctic Aurora UI, CI/CD pipeline#1

Merged
GraysonCAdams merged 9 commits intomainfrom
deploy/initial-production
Feb 19, 2026
Merged

Production deploy: PostgreSQL migration, Arctic Aurora UI, CI/CD pipeline#1
GraysonCAdams merged 9 commits intomainfrom
deploy/initial-production

Conversation

@GraysonCAdams
Copy link
Copy Markdown
Contributor

Summary

  • Migrate database from SQLite to PostgreSQL (dual-driver PGlite/pg setup)
  • Add production hardening: security headers, rate limiting, token encryption, env validation
  • Add Spotify dev mode with conservative rate limits and 5-user cap
  • Overhaul polling system with listen detection and sync auditing
  • Complete UI redesign with Arctic Aurora theme (glassmorphism, gradients)
  • Add new features: playlist tabs, liked/outcast views, notification preferences
  • Set up CI/CD pipeline with lint/type-check/build gate, migration step, Fly.io deploy
  • Add health check endpoint, structured logging, deploy-init script

Test plan

  • Security sweep passed (no leaked secrets)
  • Pre-commit hooks pass (eslint + prettier)
  • Local build succeeds with all 27 routes
  • CI pipeline passes (lint, type-check, build)
  • Database migration runs against Neon PostgreSQL
  • Fly.io deployment succeeds
  • DNS configured for swapify.312.dev

🤖 Generated with Claude Code

GraysonCAdams and others added 9 commits February 19, 2026 13:10
Switch from better-sqlite3 to a PGlite (local dev) / node-postgres
(production) dual-driver setup. Both speak native Postgres SQL so
migrations work identically in both environments.

- Rewrite schema from sqliteTable to pgTable (boolean, timestamptz)
- Add PGlite/pg dynamic driver selection in src/db/index.ts
- Add dual-driver-aware migration runner (src/db/migrate.ts)
- Regenerate Drizzle migrations for PostgreSQL dialect
- Archive old SQLite migrations to drizzle-sqlite-archive/
- Update drizzle.config.ts to postgresql dialect
- Update seed.ts for new schema shape

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, env validation

- Add Content-Security-Policy, HSTS, X-Frame-Options, and other
  security headers in next.config.ts
- Add serverExternalPackages for PGlite/pg/pino bundling
- Add in-memory token-bucket rate limiter (src/lib/rate-limit.ts)
- Add AES-256-GCM token encryption at rest (src/lib/crypto.ts)
- Add Zod environment validation with lazy proxy (src/env.ts)
- Add Pino structured logging (src/lib/logger.ts)
- Add spotify_client_id to session type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Spotify dev mode config (5-user cap, conservative rate limits,
  longer poll intervals, global API budget tracker)
- Overhaul polling system with listen detection, sync auditing, and
  Spotify change detection
- Add rate limiting to all API routes (per-profile token bucket)
- Add /api/health endpoint for Fly.io health checks
- Add /api/auth/me, /api/profile/preferences, /api/email/unsubscribe
- Add liked-playlist endpoint for per-user liked tracks
- Enhance track routes with vibe-sort and batch operations
- Add vibe name generation, notification preferences, push client utils
- Update auth flow with dev mode user cap and token encryption

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add deploy workflow with CI gate, migration step, and Fly.io deploy
- Update CI workflow to run on PRs only (deploy handles main pushes)
- Remove SQLite data volume mount from fly.toml, add health check
- Set min_machines_running=1 for zero-downtime
- Remove SQLite data dir creation from Dockerfile
- Add deploy-init.sh script for generating production secrets
- Add dependabot.yml for automated dependency updates
- Update .env.example with dev mode and AI config
- Add color-previews and public/videos to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- @electric-sql/pglite: Embedded Postgres for local development
- pg + @types/pg: node-postgres for production
- pino: Structured JSON logging
- zod: Runtime environment validation
- @anthropic-ai/sdk: Vibe name generation
- cal-sans: Display font
- Add db:migrate and db:generate npm scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implement dark-only Arctic Aurora color palette (sky blue brand,
  aurora green accent, deep navy gradients)
- Add glassmorphism design tokens, gradient backgrounds, pill buttons
- Redesign all pages: landing, dashboard, playlist detail, settings,
  profile, activity, join flow
- Add PlaylistTabs with Active/Liked/Outcasts/History views
- Add LikedTracksView, OutcastTracksView for per-user track filtering
- Add NowPlayingIndicator, SpotifyChangesBanner, SpotifySetupWizard
- Add custom icon components (AudioLines, Flame, HandMetal, Users)
- Add useAlbumColors hook and color extraction for dynamic theming
- Add loading skeletons for dashboard, playlist, activity, profile
- Update BottomNav, PlaylistCard, TrackCard, ShareSheet, GlassDrawer
- Enhance ProfileClient with notification preferences UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace app icons with new Swapify branding (192px, 512px)
- Add SVG logo (swapify-logo.svg)
- Add landing page and mockup images
- Update manifest.json with Swapify name and theme colors
- Update icon generation script for new design

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ecklist

- CLAUDE.md: Comprehensive project context for AI-assisted development
- DEPLOYMENT.md: Fly.io deployment guide with secrets management
- PRODUCTION_CHECKLIST.md: Pre-launch checklist with task tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix prettier formatting in dialog.tsx
- Scope dependency scan to --omit=dev (eslint transitive vuln is
  dev-only, not a production risk)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@GraysonCAdams GraysonCAdams merged commit 180a32c into main Feb 19, 2026
7 checks passed
@GraysonCAdams GraysonCAdams deleted the deploy/initial-production branch February 19, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant