Backend Aug 22-25: AI analysis, welcome-packet templating, LetterStream, DocuSeal, staff RBAC + tier gate

- analysis.py: deterministic claim scorer + /analyze /approve /letter /advance-tier endpoints (auto-runs on intake)
- packet.py + packet_fields.json: welcome-packet templating engine (6 onboarding docs, field catalog)
- letterstream.py + letters.py: certified-mail send pipeline + letter lifecycle (webhook verified)
- docuseal.py: DocuSeal signing integration
- staff.py/models.py/schema.sql/auth.py: approval actor from staff key, tier gate (APPROVED+ACTIVE+onboarding docs), onboarding_docs table
- frontend/: dependency-free static portal (intake, magic-link login/verify, dashboard)
- landing-mockups/: 4 design-stance mockups + favicons
- legal/: aup/privacy/sms-terms/terms HTML
- docs/: letter-queue scope, letterstream API contract, 6 welcome-packet templates
- review-dre-landing-2026-08-21.md: 3-variant landing feedback sprint
- compliance/DRE_Compliance_Manual.md: updated

Source synced from deployed /opt/dre-portal/app/ (was 4 days ahead of git).
This commit is contained in:
root
2026-08-26 02:26:33 -04:00
parent 7a5603b495
commit 7a62b0b340
46 changed files with 11004 additions and 35 deletions
+52
View File
@@ -684,6 +684,35 @@ DRE must verify the following BEFORE initiating collection:
- Are documents legible and authentic?
- Are electronic records timestamped?
### 11.4 Post-Approval Onboarding Packet
Upon claim approval (post AI analysis and leadership sign-off), DRE sends the
client an electronic-only onboarding packet. Each form may be signed and
submitted separately, but **recovery does not begin until ALL required documents
are received**. The claim holds in an "onboarding pending" state until the gate
clears; no tier escalation or debtor contact fires before completion.
Fee disclosure is a **signed schedule attached to the Terms of Service** — not a
standalone document. Texas requires contingency-fee disclosure in writing; an
attached schedule satisfies it and keeps the packet to one fewer signature.
| Group | Document | Purpose |
|---|---|---|
| **A. Engagement** | LPOA (executed + notarized via Proof RON) | Core authorization to collect (TX Est. Code § 751.0021) |
| | Fee disclosure schedule (attached to ToS) | Required-in-writing fee disclosure |
| | Executed Terms of Service | Engagement terms |
| | Third-party sharing consent | Proof.com / LetterStream / partner law firm |
| **B. Evidence** | Statement of account / aging report | Exact amount + age |
| | Contract, invoice, PO, change orders | Proves the debt and terms |
| | Proof of delivery / signed receipts / completion sign-off | Defeats "never received it" |
| | Full correspondence chain (email/text) | Shows debtor acknowledgment |
| | Payment history | Separates paid vs outstanding |
| **C. Debtor dossier** | Debtor information sheet | Entity name, type, agent, addresses, contacts |
| | Personal guarantee (if any) | Unlocks consumer credit reporting (FCRA) |
| | Known assets / banking relationships | Feeds skip tracing / asset scans |
| **D. Financial** | IRS Form W-9 | Required before any disbursement (Stripe Connect) |
| | ACH / disbursement authorization + banking details | Destination for client share |
---
## 12. DOCUMENT HANDLING & RETENTION
@@ -980,6 +1009,29 @@ DRE shall maintain a separate **Trust Account** (IOLTA or equivalent) for client
- Trust account must be interest-bearing (if appropriate)
- Interest earned on trust accounts must be accounted for per client agreement
#### 17.1.1 Two-Account Structure (approved 2026-08-22)
DRE operates two bank accounts, both checking (do NOT use a savings account for
client funds — Reg D withdrawal limits and funds that must move quickly are a
bad match):
| Account | Type | Holds | Permitted activity |
|---|---|---|---|
| Operating | Checking | DRE's own money — fees, payroll, software | Never receives client funds |
| Client trust/escrow | Checking | Recovered funds before disbursement | Fee sweep to operating + client disbursement only |
- **Same bank is acceptable** (instant/free transfers); the segregation of the
account itself is what matters, not the institution.
- The trust account must be **labeled trust/escrow** at the bank so the account
type is on record and client funds are insulated from any levy/freeze against
the operating account.
- **Stripe Connect settlement routing:** all recovery proceeds settle into the
client trust account, NOT operating. DRE's fee is then swept to operating;
the client's share is disbursed from the trust account. If Stripe Connect does
not support automatic split, perform a manual sweep on each settlement.
- Texas Finance Code Ch. 392 does not expressly mandate a separate trust account
the way some states do, but the LPOA fiduciary relationship makes segregation
the defensible posture. Confirm with attorney/CPA during compliance review.
### 17.2 Disbursement Timeline
| Milestone | Deadline |