Skip to content

Phase 2: production database, backups, account security and recovery - #3

Merged
ashutoshpalhare merged 23 commits into
mainfrom
phase-2-production-readiness
Oct 27, 2026
Merged

ashutoshpalhare merged 23 commits into
mainfrom
phase-2-production-readiness

Conversation

@ashutoshpalhare

Copy link
Copy Markdown
Owner

Phase 2 — Production readiness

Included

  • Add optional PostgreSQL support through DATABASE_URL, connection health checks, and production TLS enforcement.
  • Add optional Redis shared cache configuration for multi-worker rate limiting.
  • Protect login against repeated failures with Django Axes and rate-limit signup POSTs by IP.
  • Add token-based password recovery pages and SMTP configuration. Unknown email addresses receive the same confirmation response.
  • Add privacy-conscious auth event logging that does not record usernames, passwords, session tokens, or note content.
  • Add SQLite integrity-checked backup and explicit-confirmation restore commands. Restore creates a safety copy of the existing database first.
  • Expand README deployment, SMTP, rate-limit, PostgreSQL, backup/restore, and recovery guidance; ignore backup files in Git.
  • Add password recovery tests.

Validation

GitHub Actions runs tests, manage.py check, and migration consistency checks. The PR's checks must pass before merge. Hosting-specific database provisioning, SMTP delivery, Redis availability, and an actual restore drill still require configuration in the target environment.

Operational cautions

  • SQLite backup/restore commands are deliberately limited to SQLite.
  • PostgreSQL should use managed snapshots/PITR or a tested pg_dump/pg_restore process.
  • Backups contain private note/account data and must be encrypted, access-controlled, and kept outside the app host.
  • Signup rate limiting requires a shared Redis cache in multi-worker deployments for consistent cross-worker enforcement.

@ashutoshpalhare
ashutoshpalhare merged commit 2cb14ad into main Oct 27, 2026
1 check passed
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