# Debt Eliminator / CutTheCard — Personal Debt Tracking Service
Device Type: **Docker application hosted on NAS16**\
Host: **NAS16 (`192.168.150.40`)**\
VLAN: **50 --- Lab / Servers**\
Documentation Updated: **2026-10-11**
> **2026-10-11 (later) update:** Home Page Swap built against the **v2.1.21** QA backup
> (`debteliminator-v2_1_21-backup-2026-10-11_15-59-10`) - the new "Start Here" page now
> lives at `/`; see §0e. Package `home-page-swap-v2.1.22.tar.gz` was **delivered but its QA
> deployment had not been confirmed** at the time of writing. v2.1.21's own contents were
> not itemized. **§3a is a standing rule: every delivery of files must open with the SCP / cp /
> restart commands.**
> **2026-10-11 update:** reconciled against the **QA** backup
> `debteliminator-v2_1_20-backup-2026-10-10_23-51-34.tar.gz` (DevLog
> **v2.1.20**, MANIFEST "Site Version v2.1.20"). **Scope note:** this
> archive is a **QA** backup (project source `/Kingdezignsnas16/debteliminator-qa`),
> not the usual Production-only backup, so Production's compose file and
> database were **not** inspected this round. Features added since v2.1.7
> are documented at **summary level** from the code's own module docstrings
> and DevLog task titles (§0d, §12i-12j) - not line-by-line. The sidebar
> navigation was regrouped (§8b).
>
> **2026-09-30 update:** reconciled against the 2026-09-30 production
> backup `debteliminator-v2.1.3-backup-2026-09-30_08-47-16.tar.gz`
> (DevLog **v2.1.3**) plus the work designed/built in the following
> sessions (Blog Engine, blog scheduling, subscription admin tiles, unified
> Revenue ledger/page). See §0b for what changed. **Honest scope note:** the
> SitePay (subscriptions) and Email Campaign modules were first seen in
> this backup; §0b records what their source states (module docstrings,
> endpoints, file names) but they have **not** been reconciled line-by-line
> the way §1–§29 were for v2.0.19 — treat those two areas as summary-level
> until a dedicated pass is done.
>
> **Earlier source note (2026-09-15):** This document was reconciled against the
> 2026-09-15 production backup
> `debteliminator-v2.0.19-backup-2026-09-15_00-00-01.tar.gz`, the
> production PostgreSQL dump contained in that archive, and the prior
> KingDezigns project documentation (last reconciled at DevLog v2.0.3 /
> app source v1.9.5 on 2026-09-03).
>
> **This update covers a large amount of new ground** — the app has grown
> from a pure debt-tracking tool into a small public-facing product
> (CutTheCard.net) with donations, a support desk, SEO/educational
> content, and account self-service. See §0 for a fast summary of what
> changed since the last reconciliation.
>
> **Version distinction still applies and has drifted further:** the
> backup filename is now `v2.0.19` (latest deployed DevLog version). The
> application source (`main.py`) now reports **1.10.1**. The frontend
> shared-asset cache marker is **no longer a single consistent value** —
> see §25 for detail. Treat these as three independent identifiers, per
> the existing project convention.
---
## 0. What Changed Since the Last Reconciliation (v2.0.3 → v2.0.19)
This is the highest-level summary; full detail is in the sections below.
- **Public rebrand to CutTheCard.net is now complete — confirmed, not
just observed, and covers both environments.** Production
`PUBLIC_BASE_URL` is `https://www.cutthecard.net`; QA moved to
`https://debt.qa.cutthecard.net`. The user has confirmed NPM on HAS and
Dreamhost DNS were both updated, for both hostnames. `cutthecard.org`
redirects to `cutthecard.net` at Dreamhost only (not in NPM).
`debt.kingdezigns.com` and `debt.qa.kingdezigns.com` are now deprecated
hostnames. See §2a and the reminder tracker in §0a — there are still
stray `debt.kingdezigns.com` references to clean up in this doc set and
in the app's own generated text.
- **Stripe donations** (one-time and recurring/subscription), with full
structured donation records, donor tracking on the User model, an
anonymous public donate page, and an admin Donations log. (§12a)
- **Support / Contact request form**, public-facing, with a 48-hour SLA,
admin request queue, and automatic confirmation emails. (§12b)
- **Self-service account suspension and deletion** — distinct from
admin-managed disable/delete. (§17a)
- **Privacy Statement** as a second, independently-versioned legal
document alongside Terms of Use, plus a new **Affiliate Disclosure**
view-only legal document (affiliate links themselves are not live yet
— see §12c). (§17b)
- **Records Archive** — downloadable year-end .xlsx/.docx exports,
grouped by account type and paid-off/delinquent status. (§13a)
- **SEO foundation + a public "Learning Center"** of six educational
articles, `robots.txt`/`sitemap.xml`, and an about/contact/donate page
set that's intentionally open to search crawlers while the app itself
stays gated. (§12d)
- **Dark/light theme**, per-user with an admin-set site default. (§8a)
- **Dev Log** gained assignment/due-date/on-hold fields with a weekly
overdue-item email digest, a permanent deployment history table
(separate from the single-generation file backup), and a
default-collapsed "last 5 releases" view. (§20)
- Application source version bumped **1.9.5 → 1.10.1**; DevLog deployed
version **v2.0.3 → v2.0.19** (17 releases).
- **Known issue is still open:** `APP_SECRET_KEY` is still not set in the
Production compose file. This is now more urgent — see §26.
- **New finding:** live Stripe secret keys are stored in plaintext in the
Production compose file, alongside the same issue. See §26.
---
## 0a. ⏰ Standing Reminders — Open Follow-Up Items
**Instructions for whoever (or whichever AI) reads this file next:** the
two items below are open, user-acknowledged action items, not just
observations. Re-surface them to the user under the stated cadence until
each is marked resolved or explicitly abandoned. Once an item is
resolved, delete its entry from this table (and, for the domain item,
strike the now-irrelevant reference-scrubbing note from §2a/§26 — it
won't be relevant any longer).
| Item | First flagged | Remind | Status |
|---|---|---|---|
| **`APP_SECRET_KEY` unset in Production + live Stripe keys sitting in plaintext in `debteliminator.yml`.** User has acknowledged this and said "we will circle back to this." Re-remind every ~5 days (or the next time this file is read, if more than 5 days have passed) until fixed or explicitly abandoned. See §26 for the full recommendation. | 2026-09-15 | Every 5 days | 🔴 Open — **still unset as of the v2.1.3 backup (2026-09-30)**; **also absent from the QA compose file in the v2.1.20 backup (2026-10-10)**; Production not re-checked. 26 days since first flagged (2026-10-11) - overdue for a reminder |
| **Stray `debt.kingdezigns.com` / `debt.qa.kingdezigns.com` references need to be scrubbed and replaced with `cutthecard.net` / `debt.qa.cutthecard.net`** — both in this documentation set (now mostly done in this pass, see §2a) and in the application's own generated text (`routers/devlog.py`'s two hardcoded manual-recovery strings still reference the old Production hostname). Remind until confirmed fully clean, then remove this row and the related callouts in §2a/§26. **2026-09-30 update:** the v2.1.3 source no longer contains either old hostname in `routers/devlog.py` (verified by search; the only remaining `kingdezigns.com` string in app code is the legitimate Fund Tracker link in `main.py`). The remaining mentions in this doc set are intentional "deprecated" notes. Awaiting the user's confirmation that the doc set/NPM are clean, then delete this row. | 2026-09-15 | Until user confirms | 🟡 Code clean — awaiting confirmation |
---
## 0b. What Changed Since 2026-09-15 (→ v2.1.3, 2026-09-30)
**Built in these sessions (fully documented below):**
- **Blog Engine** with revisions, archive, preview and **scheduling** — §12f.
- **Unified revenue ledger** (`donations.payment_kind`), **Subscriptions
admin summary tiles + per-user monthly/yearly amounts + year selector**,
**Sync Payments from Stripe**, and a combined **Admin → Revenue** page —
§12g.
- Admin sidebar gained **Blog** and **Revenue** links.
**Present in the v2.1.3 backup, summary-level only (not yet reconciled):**
- **SitePay / subscriptions** — `routers/subscribe.py` (real paid
subscription Checkout + Stripe Customer Portal: `GET /subscribe/status`,
`POST /subscribe/create-checkout-session`, `POST /subscribe/portal-session`),
`subscription_reconcile.py` (daily Stripe reconciliation + trial-ending
emails), `User.access_status` computed property, `static/subscribe.html`,
`static/billing-locked.html` (lockout page), admin
`GET /admin/billing/subscriptions`, reconciliation/migration endpoints
(`POST /admin/billing/reconcile-subscriptions`,
`/send-trial-ending-soon-emails`, `/migrate-onetime-donors`) and trial /
price / launch-date / enforcement settings on Admin → Subscriptions.
Plan and intent: `debteliminator_subscription_model.md`.
- **Email Campaigns** — `routers/campaigns.py` (admin; throttled,
per-recipient background sends, default 30 s apart, suppressed in QA,
`/test-send` for QA), `routers/email_prefs.py` (per-user preferences +
no-login one-click unsubscribe), `email_templates.py`,
`static/admin/campaigns.html`.
- DevLog production version is **v2.1.3** (was v2.0.19).
**Version identifiers (unchanged convention):** DevLog deployment **v2.1.3**;
application source string still reads **1.10.1** in `main.py` (not bumped
despite the added modules) and the startup log line still says
`"Starting CutTheCard v1.9.2"`; frontend cache marker has moved to
`?v=1.8.5` on the pages touched in these sessions — re-verify all pages
share one marker at the next `shared.css`/`shared.js` change (§4.3/§25).
---
## 0c. What Changed Since 2026-09-30 (→ v2.1.7 backup, 2026-10-01; analytics added 2026-10-02)
- The 2026-10-01 backup (`debteliminator-v2.1.7-backup-2026-10-01_16-35-01.tar.gz`)
reports **DevLog v2.1.7**. Versions **v2.1.4 – v2.1.7** were deployed
between 2026-09-30 and 2026-10-01; their contents are **not itemized in
this document** (sections above were last reconciled at v2.1.3, and the
DevLog task titles for 2.1.4–2.1.7 were not reviewed). Reconcile when
convenient.
- **New:** site-wide script loader + Umami analytics (§12h). Changes are one
edit to `routers/blog.py` (`_page()` shell), two new static files, and one
loader tag added to 21 static pages. No new Python dependencies, no compose
changes, no new tables, no application version bump.
- **In flight (not documented here):** an external demo of the Debt Reduction
Plan flow was being built in QA at the same time. Any new demo pages need
the loader tag if they should be tracked.
---
## 0d. What Changed Since 2026-10-02 (-> v2.1.20, 2026-10-10)
DevLog versions **v2.1.8 - v2.1.20** shipped between 2026-10-02 and
2026-10-10 (titles below are from the DevLog task table in the QA database
dump). Application source string in `main.py` is **still `1.10.1`** and the
startup log still says `"Starting CutTheCard v1.9.2"` (neither bumped).
| DevLog | Deployed | Task |
|---|---|---|
| 2.1.4 | 2026-09-30 | Integrated Blog Engine; HTML Builder; blog links on login/nav |
| 2.1.5 | 2026-09-30 | Combined donation + subscription modeling (revenue ledger, §12g) |
| 2.1.6 | 2026-09-30 | **Role Playing** - Admin Roles v2 (`routers/roles.py`, `roles`/`user_roles` tables) |
| 2.1.7 | 2026-10-01 | UI: Developer drop-down in DevLog project form |
| 2.1.8 | 2026-10-01 | **Demo Calculator** - public `/debt-payoff-calculator` (§12i) |
| 2.1.9 | 2026-10-02 | Umami analytics loader (§12h) |
| 2.1.10 | 2026-10-04 | Debt Reduction Plan - fine tuning #1 |
| 2.1.11 | 2026-10-05 | Triggering Balance Transfers |
| 2.1.12 | 2026-10-06 | **Milestones and Progress Dashboard** (§12i) |
| 2.1.13 | 2026-10-06 | Bug: monthly interest on the Accounts page |
| 2.1.14 | 2026-10-06 | **Windfall Allocator** (§12i) |
| 2.1.15 | 2026-10-10 | **CSV / Statement Import** (§12i) (+ a no-version bug fix) |
| 2.1.16 | 2026-10-09 | **ADA / WCAG 2.2 AA accessibility** layer - see `accessibility_standards.md` |
| 2.1.17 | 2026-10-10 | **Due-Date and Promo-Expiry Reminders** (§12i) |
| 2.1.18 | 2026-10-10 | **Credit Utilization Tracker** (§12i) |
| 2.1.19 | 2026-10-10 | **Budget-to-Payoff Cash Flow** (§12i) |
| 2.1.20 | 2026-10-11 | **Household Sharing** (§12j) |
Also in this window (not DevLog versions): **blog auto-archive / rotating
archive picks** (`blog_rotation.py`, §12i) and the **sidebar navigation
Phase 1 regroup** (§8b - front-end only, built after the v2.1.19 backup; the
DevLog queue item "Nav grouping" is still `pending` in the QA database dump,
i.e. the work had not been logged/promoted yet).
**Dates caveat:** the v2.1.15 / v2.1.16 deploy timestamps in the raw table
are not monotonic with their version numbers (v2.1.15 shows 2026-10-10 after
v2.1.16's 2026-10-09). Recorded as found.
**Operational facts from the QA compose file (values never recorded):**
`APP_SECRET_KEY` is **not** set in the QA compose file either; the QA
compose file now contains a `STRIPE_SECRET_KEY` entry (earlier docs said
only Production had Stripe configured - see `debteliminator_subscription_model.md`
Phase 1). Whether those are test-mode keys was not checked.
---
## 0e. Home Page Swap - "Start Here" at `/` (built 2026-10-11, package v2.1.22)
**What changed**
- The old About page is now the **site home page**, titled **Start Here**, served at
**`https://www.cutthecard.net/`** (also answers at `/index.html`; canonical is `/`).
Source: `public_pages/home.html`, served by new `routers/home.py` (same pattern as the public
calculator page; `__BASE_URL__` / `__ROBOTS__` placeholders; `Cache-Control: no-cache`).
QA renders `noindex, nofollow`; Production `index, follow`.
- `GET /` **no longer redirects** to `/dashboard/` (the `root()` redirect was removed from `main.py`).
- The Accounts page is unchanged at **`/dashboard/index.html`** (`/dashboard/`).
- `/dashboard/about.html` is a **301 -> `/`** (query string preserved, e.g. `?suspended=1`),
registered *before* the `/dashboard` static mount so it wins even if a stale
`static/about.html` remains on disk. `static/about.html` was deleted from QA; **Production keeps
an orphan copy after the file-copy deploy** (harmless, the route takes precedence; clean up
whenever convenient).
- **Login landing:** `deDoLogin()` in `shared.js` sends the user to `/` after sign-in when they
signed in from an entry page (`/`, `/index.html`, `/dashboard/`, `/dashboard/index.html`, no query
string); on any other page (deep links) it reloads in place so the destination is kept. Logout now goes to `/`.
- **Nav:** logo click -> `/`; sidebar footer link renamed **About CutTheCard -> Start Here**
(`/`); onboarding-modal text updated; `DE_ACCESS_ALWAYS_ALLOWED` now lists `/` (so
expired/locked users can still reach Start Here); suspended-account redirect is `/?suspended=1`.
- **Page layout/copy:** hero cut to one heading ("Start here: your debt-free date in 3 steps") plus a
one-line summary (hero logo and tagline removed; the sidebar already shows the logo); **"3 Simple
Steps" moved above "How CutTheCard Helps You Win"** (steps + CTA are fully above the fold at
1280x720); feature headings un-numbered so they don't clash with the numbered steps; section labels
are real `
`, feature headings `
`, emoji icons `aria-hidden`. CTA button: "Go to Accounts".
- **Links:** every "About" link in the blog shell (`routers/blog.py`), Learning Center,
calculator and accessibility pages now points at `/`.
- **SEO:** `sitemap.xml` lists `/` (priority 1.0) instead of `/dashboard/` and `about.html`;
`robots.txt` allows `/$` and `/index.html` instead of `about.html`; the Accounts page's
canonical now points at `/` (signed-out visitors see the same login screen at both URLs).
- **Cache marker:** `shared.js` changed, so `shared.css`/`shared.js` moved **`?v=1.9.5` ->
`?v=1.9.6`** on every app/public static page, including `household.html`, which was found still on
`1.9.4`. `blog.py` and `public_pages/debt-payoff-calculator.html` still reference `shared.css?v=1.9.2`
(no sidebar; unify at the next `shared.*` change).
- Files touched: new `routers/home.py`, `public_pages/home.html`; changed `main.py`, `seo_router.py`,
`shared.js`, `routers/blog.py`, `public_pages/debt-payoff-calculator.html`, `static/index.html`,
accessibility/learn pages and all pages carrying the cache marker; deleted `static/about.html`.
No new dependencies, tables or compose changes -> **restart-only** deploy.
**Verified in a headless Chromium test (not on the live QA site):** `/` 200, `/index.html` 200,
`/dashboard/about.html?suspended=1` 301 -> `/?suspended=1`, QA vs Production robots meta, signed-in
dark/light/mobile and signed-out rendering. **Not run:** `a11y_audit.py`, the manual keyboard /
screen-reader pass (see `accessibility_standards.md` §4).
---
## 1. Role & Purpose
Debt Eliminator (branded as **CutTheCard**, now primarily presented at
**`https://www.cutthecard.net`**) is a self-hosted, per-user debt
tracking application for credit cards, auto loans, personal loans,
student loans, mortgages, medical debt, and other liabilities. It has
grown beyond an internal tool into a small public product with its own
donation/support/SEO surface, while remaining hosted on KingDezigns
infrastructure.
The application provides:
- Current debt balances, minimum/current payment tracking, due-day tracking
- Per-account payment/transaction history
- Charge-level interest rates and promotional APR tracking
- Debt-avalanche and snowball payoff projections; estimated debt-free date
- 0% Balance Transfer opportunity evaluation with promo balance protection
- Encrypted account-number storage
- User self-service account management, including **self-suspend and
self-delete** (new — §17a)
- Administrator account/security management
- Versioned **Terms of Use, Privacy Statement, and Affiliate Disclosure** (new — §17b)
- Security/audit logging
- A year-at-a-glance Payment Register
- A **Records Archive** downloadable year-end export (new — §13a)
- A Debt Reduction Plan page
- **Stripe-powered donations**, one-time and recurring (new — §12a)
- A **public Support/Contact request form** (new — §12b)
- A **public SEO/Learning Center content section** (new — §12d)
- **Dark/light theme** (new — §8a)
- A QA → Production Dev Log and automated deployment pipeline, now with
assignment/due-date tracking and permanent deployment history (§20)
Debt Eliminator does **not** execute payments. Payments, charges, fees,
refunds, and balance corrections are entered manually and become ledger
transactions.
---
## 2. Deployment / Environment Architecture
Unchanged at the infrastructure level — Production and QA remain
independent environments on NAS16.
| Item | Production | QA |
|---|---|---|
| Public URL | `https://www.cutthecard.net/` | `https://debt.qa.cutthecard.net/` |
| Internal URL | `http://192.168.150.40:8002/dashboard/` | `http://192.168.150.40:8003/dashboard/` |
| API container | `debteliminator_api` | `debteliminator_qa_api` |
| PostgreSQL container | `debteliminator_db` | `debteliminator_qa_db` |
| Host port | 8002 | 8003 |
| App port inside container | 8000 | 8000 |
| App source | `/Kingdezignsnas16/debteliminator/api/` | `/Kingdezignsnas16/debteliminator-qa/api/` |
| PostgreSQL data | `/opt/debteliminator/pgdata` | `/opt/debteliminator_qa/pgdata` |
| `APP_ENV` | `production` | `qa` |
| Email/scheduled behavior | Enabled | Suppressed |
| QA banner | No | Amber QA banner |
| Automated deploy pipeline | Not available | Available (see §20) |
### 2a. Public domains — CONFIRMED: both Production and QA moved to `cutthecard.net` (2026-09-15)
As of this backup, the Production compose file sets:
```text
PUBLIC_BASE_URL=https://www.cutthecard.net
```
**Confirmed with the user (2026-09-15):** this is a deliberate,
completed rebrand covering **both environments**, not just an
in-progress application-side change to Production.
- **Production:** NPM on HAS has been updated — the proxy host for this
service now serves `cutthecard.net` (and `www.cutthecard.net`)
directly, not `debt.kingdezigns.com`.
- **QA:** NPM has likewise been updated — the QA proxy host now serves
**`debt.qa.cutthecard.net`**, not `debt.qa.kingdezigns.com`.
- Dreamhost DNS has been updated to point both `cutthecard.net` and
`debt.qa.cutthecard.net` at the KingDezigns network.
- `cutthecard.org` still exists but is **not** configured in NPM — it
302-redirects to `cutthecard.net` entirely at the Dreamhost DNS/domain
level, before traffic ever reaches the KingDezigns network.
- Both `debt.kingdezigns.com` (Production) and `debt.qa.kingdezigns.com`
(QA) are now **deprecated old hostnames**. Every remaining reference
to either in this documentation set (and in the application's own
generated text — see below) needs to be scrubbed and replaced with the
corresponding `cutthecard.net` hostname.
Every outward-facing piece of the application already agrees with the
new Production domain:
- All password-reset/support/donation-confirmation email links are built
from `PUBLIC_BASE_URL`.
- `robots.txt`/`sitemap.xml` default to `https://cutthecard.net` if the
env var is ever unset.
- Canonical/Open Graph tags on `about.html` and other public pages
hard-code `cutthecard.net`.
- Support inbox and no-reply addresses are `support@cutthecard.net` /
`noreply@cutthecard.net`.
- **No occurrence of `kingdezigns.com` remains in any static HTML page.**
(QA's own `PUBLIC_BASE_URL` — presumably `https://debt.qa.cutthecard.net`
— is not visible in this backup, since this archive is Production-only
per §22. Worth a quick confirmation the next time QA's compose file is
touched, so QA's password-reset/email links agree with the new QA
hostname too.)
**One inconsistency found — still needs a code fix:** `routers/devlog.py`
still generates manual-recovery/verification instructions referencing
`https://debt.kingdezigns.com` in two places. This is cosmetic (it only
affects text shown to an admin during a manual deployment fallback) but
is now confirmed stale, not just possibly stale. See the reminder tracker
in §0a.
Traffic path (internal architecture unchanged):
```text
Internet
↓
UCG Max
↓
Nginx Proxy Manager on HAS (192.168.150.30)
├── cutthecard.net / www.cutthecard.net → 192.168.150.40:8002 (Production)
└── debt.qa.cutthecard.net → 192.168.150.40:8003 (QA)
↓
NAS16
├── :8002 → Debt Eliminator Production API
└── :8003 → Debt Eliminator QA API
```
`cutthecard.org` → `cutthecard.net` redirect happens entirely at
Dreamhost, upstream of NPM — it never appears in NPM's proxy host list
and has no KingDezigns-side configuration to document.
### Site Branding & Alternate Domains
The application is branded **CutTheCard** (FastAPI title and all page
`` elements). **Current (2026-09-15) domain relationship:**
`cutthecard.net` (and `www.cutthecard.net`) is the primary, NPM-proxied
Production hostname; `debt.qa.cutthecard.net` is the equivalent for QA.
`cutthecard.org` 302-redirects to `cutthecard.net` at the Dreamhost DNS
level only — not in NPM. Both `debt.kingdezigns.com` and
`debt.qa.kingdezigns.com` are deprecated and should be scrubbed from
documentation and from the application's own generated text (see §0a).
Internal documentation continues to use "Debt Eliminator" as the service
name for infrastructure purposes.
---
## 3. Deployment Policy — QA First, Then Automated Pipeline to Production
### 3a-0. ⚠️ STANDING RULE — every delivery starts with the deploy commands (mandatory)
Whenever Claude (or any AI) hands over files for this project — a tarball, a patch, a single
file — the **reply must open with the SCP / cp / restart command block, before any explanation
of what changed.** Not "at the end", not "on request", not only the first time. At minimum:
```bash
# 1. On KingDezigns001 (file already downloaded to ~/Downloads)
scp ~/Downloads/.tar.gz rufusking@192.168.150.40:deploys/
# 2. On NAS16 - unpack, copy into QA, restart
ssh rufusking@192.168.150.40
cd ~/deploys && rm -rf && mkdir && tar -xzf .tar.gz -C
sudo cp -r ~/deploys//api/app/. /Kingdezignsnas16/debteliminator-qa/api/app/
sudo rm # only if the package deletes files
sudo docker restart debteliminator_qa_api
# 3. Verify
sleep 5 && sudo docker logs debteliminator_qa_api --tail 15
curl -sI http://192.168.150.40:8003/ | head -1
```
Rules for the block:
- **Stage in `~/deploys/`, never `/tmp`** (NAS16: `/home/rufusking/deploys/`, auto-cleaned after 14 days by `/etc/tmpfiles.d/deploys.conf`: `d /home/rufusking/deploys 0755 rufusking rufusking 14d`). Never delete anything in `/tmp/systemd-private-*` or `/tmp/bg*` - they belong to running services (monit, rsyslog, OMV); removing monit's breaks `omv-salt` Apply with 226/NAMESPACE until `sudo systemctl restart monit`. Permanent backups go in `~/backups/`, not `~/deploys/`.
- Use the **real file name** and real QA paths (project `/Kingdezignsnas16/debteliminator-qa/`, container `debteliminator_qa_api`, port 8003), never placeholders in a live reply.
- State explicitly whether the change is **restart-only** or needs a **rebuild** (`requirements.txt`, `Dockerfile` or compose changes → `docker compose build` / `up -d --force-recreate`, never plain `docker restart`), and give that command when a rebuild is needed.
- List any files the package **deletes** as `sudo rm` lines (the copy never removes anything).
- The project directory is root-only: always `sudo cp` / `sudo rm`, never plain `cp` or `cd` into it.
- Add curl/log checks specific to the change. After QA passes, promotion to Production is the Dev Log **Deploy to Prod** pipeline (below), not a manual copy, unless the pipeline is being bypassed.
- Give the whole sequence in **one** block (not one command per message) — see `claude_token_efficiency_tips.md`.
- Do this even when the user does not ask, even for a one-file change, and again on every follow-up revision of the package.
Unchanged in mechanism from the prior reconciliation — see the original
automated pipeline description (preview → confirm → execute via
`deploy_engine.py`, `plan_token` binding, `orphaned_in_prod` reporting,
one-generation-deep `backup/api/` snapshot) — all confirmed still
accurate against this backup's `deploy_engine.py` and `devlog.py`.
**What's new in the Dev Log itself (v2.3.0, deployed as part of the
v2.0.x train — see §20):**
- Queue items can now be **assigned to a developer** (`assigned_to`,
free text), given a **due date**, and put **on hold**.
- A background thread fires a **weekly overdue-item digest email**
(checks every 7 days regardless of `APP_ENV`; QA suppression is
bypassed intentionally via `force=True` since this is an operational
admin email, not a QA-suppressed feature email). An item is skipped if
it's unassigned, on hold, not yet due, or was already alerted on in the
last 7 days.
- A new **permanent deployment history table** (`deployment_records`)
separate from the single-generation `backup/api/` file snapshot — see
§20a.
- The Dev Log page now **defaults to showing only the 5 most recent
releases** (and the 5 most recent entries in the Deployed section),
with a toggle to reveal the rest — a UI change to stop the page from
scrolling indefinitely as release history grows.
Manual fallback deployment steps are unchanged from prior documentation.
---
## 4. Versioning — Three Identifiers Must Be Kept Separate
### 4.1 DevLog deployment version
The 2026-09-15 backup's production database reports the latest deployed
DevLog version as **v2.0.19**. Archive filename:
```text
debteliminator-v2.0.19-backup-2026-09-15_00-00-01.tar.gz
```
17 DevLog releases were deployed between the last reconciliation
(v2.0.3) and this one (v2.0.19) — see §27 for the full changelog.
### 4.2 Application version
`api/app/main.py` reports:
```text
version="1.10.1"
```
up from 1.9.5 at the last reconciliation.
**Inconsistency found:** the startup log line in `main.py` still reads
`"Starting CutTheCard v1.9.2"` — a stale hardcoded string, out of sync
with both the FastAPI `version=` field (1.10.1) and reality. Cosmetic
only (log output), but worth a one-line fix.
### 4.3 Frontend cache-busting marker
**No longer a single value.** As of this backup:
| Marker | Pages |
|---|---|
| `?v=1.8.4` | `about.html`, `donate.html`, `donate-public.html`, `payoff-strategy.html` |
| `?v=1.8.3` | `index.html`, `account.html`, `contact.html`, `donate-cancel.html`, `donate-success.html`, `help.html`, `records-archive.html`, `register.html`, and all six `learn/*.html` pages |
This is a drift from the project's own documented Cache-Busting Rule
(§25), which requires every page referencing `shared.css`/`shared.js` to
be bumped together. It's not currently causing a functional bug (all
pages point at the same physical files, just different cache-busting
query strings), but it means a browser that cached `shared.css` under
one marker won't necessarily get a fresh copy when navigating to a page
still on the other marker, if a real style change landed in between.
Recommend reconciling both groups to the same marker on the next
`shared.css`/`shared.js` change.
### Documentation rule (unchanged)
> **DevLog deployment v2.0.19 — application source version 1.10.1**
---
## 5. Environment Credentials
**Do not treat this document as a place to record real values.** The
current Production compose file (`debteliminator.yml`) was inspected as
part of this backup and confirmed to still follow the same PostgreSQL/
SMTP credential pattern documented previously (do not change without a
deliberate rotation). It now **also contains a live Stripe secret key,
publishable key, and webhook signing secret in plaintext** — see §26,
which is a new and more serious version of the pre-existing "credentials
sitting in an unencrypted compose file" pattern.
### Production PostgreSQL / SMTP
Unchanged in structure from prior documentation — see Vaultwarden for
actual values. Do not add real values here.
### Stripe (new — v1.10.0)
Three new environment variables were added to the Production `api`
service, consumed by `config.py`:
```text
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
STRIPE_WEBHOOK_SECRET=
```
`STRIPE_SECRET_KEY` gates `STRIPE_CONFIGURED`; without it the donate
endpoints return 503. `STRIPE_WEBHOOK_SECRET` gates whether
`/donate/webhook` can verify a real Stripe request; without it, the
webhook endpoint returns 503 (donations can still complete via the
client-side success-page redirect, but the server-side confirmation/
audit trail is skipped).
**These are live production payment credentials and must be treated with
at least the same care as the database password — ideally more, given
real donor card data flows through them.** See §26 for the specific
recommendation.
> These credential *categories* are documented intentionally as part of
> the operational record (same convention as the rest of this file).
> Actual values are never written into Markdown documentation.
---
## 6. Application Stack
Backend/database/frontend stack is unchanged (FastAPI/Python 3.12/
Uvicorn/SQLAlchemy/PostgreSQL 16/Pydantic; vanilla HTML/JS/CSS, no build
step; `StaticFiles` mount at `/dashboard/`).
**New Python dependencies** (in `requirements.txt`, confirmed present):
```text
stripe==11.1.1
openpyxl==3.1.5
python-docx==1.1.2
```
`stripe` backs the donation flow (§12a). `openpyxl` and `python-docx`
back the Records Archive .xlsx/.docx export (§13a). All three require a
`docker compose build` (not just a restart) on first deploy if they
weren't already present in a given environment's image.
### Encryption — still unresolved
**`APP_SECRET_KEY` is still not explicitly set in the Production compose
file**, confirmed by direct inspection of `debteliminator.yml` in this
backup. `security.py` falls back to a hardcoded
`"fallback-dev-key-change-in-prod"` string when the env var is absent.
This was flagged as a critical open item at the last two reconciliations
and remains open. See §26 for why this is now a higher priority than
before.
---
## 7. Docker Configuration
Structurally unchanged — same `Dockerfile` (Docker CLI + compose plugin
layer, inert in Production), same compose file locations and pgdata
paths, same `debt_engine`-style env-var gating for the automated
deployment pipeline (QA-only).
**Production `api` service — new environment entries observed:**
```yaml
environment:
# ...existing DB/SMTP/session/proxy vars unchanged...
- PUBLIC_BASE_URL=https://www.cutthecard.net # changed — was debt.kingdezigns.com
- STRIPE_SECRET_KEY=
- STRIPE_PUBLISHABLE_KEY=
- STRIPE_WEBHOOK_SECRET=
```
`APP_SECRET_KEY` remains absent from this list — see §6 and §26.
---
## 8. Dashboard (Accounts Deck)
Unchanged in core layout (progress bars, stat banner, due-day-first
ordering, overflow-menu row actions) — this section of the prior
documentation remains accurate.
### 8a. Dark / Light Theme (new — v2.0.19)
- Per-user `theme` field on `User` (`dark` / `light` / `NULL`). `NULL`
means "use the site default."
- Site-wide default is admin-configurable: **Admin → Settings →
`default_theme`**, one of `dark` / `light`. New installs preserve the
previous all-dark look by defaulting to `dark`.
- A user's own explicit choice (set from **My Account**) always overrides
the site default.
- Logos were switched between dark/light variants alongside this
(`cutthecard-dark-logo.png`, `cutthecard-light-logo.png`,
`cutthecard-dark-small.png`, `cutthecard-light-small.png`/`.jpg`,
`cutthecard-black.png` for the sidebar brand mark).
---
### 8b. Sidebar Navigation - Grouped (Phase 1, built 2026-10-11)
The sidebar (`deRenderSidebar()` in `static/shared.js`, styles in
`shared.css`) changed from one flat list of ~18 links to **task-based
collapsible groups**. This is **Phase 1 of 2**; Phase 2 (merging pages with
similar content, e.g. Budget + Credit Utilization, Accounts + Import
Transactions) is **not started**.
**Structure as built** (order as deployed - Track precedes Plan):
| Top-level | Contains |
|---|---|
| **Accounts** (standalone link) | `/dashboard/` - the home page |
| **Track** (group) | Payment Register, Import Transactions, Budget |
| **Plan** (group) | Debt Reduction Plan, Windfall Allocator, Credit Utilization, Milestones |
| **Learn** (group) | Learning Center (`matchPrefix`), Blog (`/blog`, a public server-rendered page) |
| **Help** (group) | Help Center, Contact / Support |
| **Account** (group) | My Profile, Household, Subscription, Records Archive |
| **Admin** (label, admins only) | **People** (User Accounts, Support Requests), **Money** (Revenue, Donations, Subscriptions), **Content** (Blog, Email Campaigns), standalone **Dev Log** |
- The user-facing link formerly labelled **My Account is now "My Profile"**
(same page, `account.html`). "User Accounts" (admin) is unchanged and
deliberately distinct from "Accounts" (a user's tracked debts).
- **Sidebar footer link is now "Start Here"** (was "About CutTheCard", renamed in the home-page swap, §0e); it and the logo both go to `/`.
**Free Calculator is intentionally not in the logged-in nav** - it is the
public logged-out demo (§12i) and stays at `/debt-payoff-calculator`.
- Each destination appears **exactly once**. Admin items are filtered by the
existing per-page permission map (`DE_PAGE_PERMS`); a group left with one
visible page renders as a plain link.
- **Behaviour:** collapsed by default; the group containing the current page
is open on load; opening a group closes the others (accordion). On a page
that is in no group (e.g. donate), the last group the user opened this
session (`sessionStorage` key `de_nav_open_group`) is restored. In the
collapsed icon rail, clicking a group icon expands the rail and opens that
group. The Milestones "new" dot also shows on the **Plan** header while that
group is collapsed.
- **Accessibility:** group headers are real `