←
Back to Architecture Directory
File: .antigravity-ai/rebuild-task-backlog.md
Live Disk Read
# Fix Family Courts Rebuild 2026 — Master Task Backlog
*Last Updated: 2026-09-02 (Infrastructure & Storage Architecture Phase)*
---
## 🛑 MANDATORY ARCHITECTURAL POLICY: ALL CASE MANAGEMENT REJECTED
>
> **PERMANENT EXECUTIVE DIRECTIVE:** ALL CASE MANAGEMENT, COURT DOCKET TRACKING, COURT DATE TRACKING, AND LEGAL PRACTICE ITEMS ARE **STRICTLY REJECTED AND PROHIBITED**.
> Fix Family Courts is exclusively an **Educational Consulting and Constitutional Analysis** platform. Tracking court dates or case dockets introduces severe legal malpractice and unauthorized practice of law (UPL) liabilities that Fix Family Courts is not equipped for and does not provide.
---
## Phase 1: Core Foundation & Security (Completed / Verified)
- [x] Multi-panel Filament v4 architecture (`Admin`, `Editor`, `Client`, `Customer`).
- [x] Pure educational consulting and non-attorney legal compliance audit logs.
- [x] Master Layout Wrapper (`layout-master.blade.php`), Google Fonts, Modular Tailwind CSS v4.
- [x] Universal 3-Way Document Routing (`/resources/slug`, `/2193`, `/slug`).
- [x] Universal Fallback Router & Legacy ID Redirect Controller with Admin Consoles.
- [x] Production Duplicate Resolution & User Disambiguation Choice Screen (`choose-duplicate.blade.php`).
- [x] Unified Portal Sign-In (`/login`), Dashboard Hub (`/dashboard`), and 1-Click Role Switchers.
- [x] Published Filament Assets and Self-Healing Vite Engine.
- [x] Dedicated Vite development ports (5123 for default-25, 5124 for rebuild-26).
- [x] 37 automated feature & unit tests passing green (183 assertions).
---
## 🚀 Immediate Next Action (At Top of Queue)
### 1.1 Apply Fresh Migrations & Seeders
- [x] **Completed:** `php artisan migrate:fresh --database=ffc_rebuild_26 --seed` executed successfully. Database schema, sample products, customer entitlements, and updated upward role hierarchy are now stood up in `ffc_rebuild_26`.
### 1.2 Architectural & Features Review (Visual Mindmap & Gap Analysis)
- [ ] **Comprehensive System Mindmap:** Generate an interactive visual mindmap and system architecture diagram documenting every subsystem, role, database model, file pipeline, and user flow built to date.
- [ ] **Visual Feature Inventory & Gap Analysis:** Review all functional areas to help Ron visualize where the system stands and uncover any forgotten operational, administrative, or client-facing elements before initiating data migration.
### 1.2.1 Legal Treatise, Caselaw & Modular Versioning Pipeline
- [ ] **Task: Local Caselaw Library Cross-Linking:**
- Connect every judicial opinion cited in the Table of Authorities and all 14 stages (Troxel, Santosky, In re C.J.C., Holley, Downer, etc.) to direct clickable links pointing to local mirror files in `C:\laragon\www\caselaw` and `C:\laragon\www\caselaw-25`.
- [ ] **Task: Document Version Archive & VS Code-Style Diff Viewer:**
- Maintain historical version archives of the legal treatise (v1.0, v1.1, v2.0) across all independently versioned volumes.
- Provide an interactive side-by-side or inline text diff viewer (similar to VS Code diffs) allowing readers, attorneys, and litigants to trace granular textual and statutory revisions between versions.
### 1.3 Architectural Design: Delegated Technical & Operational Sub-Roles (Granular Scoped Permissions)
- [ ] **Architectural Anticipation (Design Phase — Do Not Build Yet):**
- **Technical Stream:** Anticipate roles below Super Admin (e.g. `Technical Architect`, `Technical Admin`, `Scoped Contractor / Issue Specialist`).
- Standard reasonable defaults + accompanying `.md` explanation note for each role tier.
- Ability to define permissions with granular scoping (e.g., granting temporary, secure access to resolve a single isolated issue/module, comparable to scoped folder-level FTP access).
- **Operational Stream:** Apply identical design pattern below Business Master (e.g. `Operations Assistant`, `Client Coordinator`, `Product Specialist`).
- Standard operational defaults + granular capability restrictions (e.g. access to view consultation notes without access to financial overrides or Stripe data).
### 1.4 Review Feedback & Error Log (Batch TODO Queue)
- [x] **[COMPLETED] Fix `BadMethodCallException: Call to undefined method App\Models\User::isSuperAdmin()` on `/admin`**:
- *URL:* `http://ffc-rebuild-26.test/admin`
- *Resolution:* Added `isSuperAdmin()`, `isBusinessAdmin()`, and updated `isAdmin()` on `App\Models\User`.
- [x] **[COMPLETED] Dashboard 1-Click Launch Buttons Not Working**:
- *URL:* `http://ffc-rebuild-26.test/dashboard`
- *Resolution:* Fixed user model authorization methods and corrected seeder syntax/roles so all 5 role switchers (`super_admin`, `business_admin`, `editor`, `client`, `customer`) authenticate and launch directly into their respective panels.
- [x] **[COMPLETED] Standard Sign-In Form (`/login`) Credentials Out of Date**:
- *URL:* `http://ffc-rebuild-26.test/login`
- *Resolution:* Updated login page with accurate roles for all author accounts (Ron Palmer: Super Admin #1, Fix Family Courts: Super Admin #2, Sherry Palmer: Business Master #3, Bob Palmer: Super Admin #4), added 1-click quick-fill buttons for all author accounts, and explicitly noted default test passwords (`password`).
### 1.5 Members & Portals Dynamic Navigation & Entitlement Segregation (Design Rule 8)
- [ ] **Dynamic Navigation Filtering by Authentication & Role:**
- **Guest State (Unauthenticated):** "Portals" / "Members" menu dropdown renders ONLY a single link pointing to the Members Only description page (`/divorce-child-custody-membership` / Document ID 2127). Public dropdown will never show internal portal links (`/customer`, `/client`, `/editor`, `/admin`).
- **Authenticated State (Logged In):** Dropdown displays ONLY the Members Only description page PLUS the specific portal(s) matching their assigned role / entitlement tier.
- **Customer vs. Member Separation:** Explicitly isolate product purchasers (`customer_entitlements` table) from true members ("Gold Members"). Product customers can access digital downloads in the Customer Hub but are NOT members.
- **Granular Course Entitlements:** "Members Only" is currently a single bucket for "Gold Members", but training courses require granular access purchased separately. Maintain all training under the Members Only login umbrella with discrete course-level entitlement authorization.
---
## Phase 2: Data Sync, Divi Rendered Dump & Content Migration Pipeline
### 2.1 Documents Table Column Reordering & Pruning (Ron's Graphical Baseline)
- [ ] **Ron's Action:** Manually edit the migration file (`2026_09_01_000005_create_documents_table.php`) in `ffc-rebuild-26` to arrange the most commonly used columns into the first visual columns in graphical DB tools and prune legacy columns.
- [ ] **Agent Action:** Adopt Ron's edited migration schema as the definitive new baseline for importing production data.
### 2.2 Production-to-Local Data Sync (Ron's Sync Scripts)
- [ ] **Ron's Action:** Execute manual sync from production DB into `ffc_default_25.documents` (and any other core tables).
- [ ] **Agent Action:** Create any required supplementary sync scripts for additional tables needed for Ron's `ffc-default-25` admin scripts.
- [ ] **Agent Action:** Import documents and necessary baseline data from `ffc_default_25` into `ffc_rebuild_26`.
### 2.3 Legacy WordPress & Divi Rendering Dump
- [ ] **Ron's Action:** Bring up the legacy WordPress local DB server, ensure Divi is active, and confirm Divi code blocks are properly rendering.
- [ ] **Ron's Action:** Provide temporary read access to the legacy WordPress database server.
- [ ] **Agent Action:** Execute a full post and page data dump with the Divi code blocks properly rendered into clean semantic output.
- [ ] **Agent Action:** Load the rendered WordPress data into staging/temporary review tables in `ffc_rebuild_26`.
### 2.4 Content Diff & Visual Review Console (Overwriting vs. Manual Edit vs. Keep)
- [ ] **Agent Action:** Process newly imported rendered WordPress data against legacy `ffc_default_25` posts for content diffs.
- [ ] **Agent Action:** Build a clean HTML/Laravel review interface displaying side-by-side content diffs.
- [ ] **Ron's Decision Matrix per Post:**
- `[A] Overwrite`: Import clean Divi-rendered content directly.
- `[B] Manual Edit`: Flag for author refinement.
- `[C] Leave As-Is`: Retain current version.
### 2.5 Sandboxed Media Upload Engine (`/FFC-WEBSITE-2026-FORWARD/`)
- [x] **SFTP Credentials Configured & Authenticated:** SFTP connection to `home333798556.1and1-data.host` active and tested green.
- [x] **Sandboxed Directory Established:** Ron created and designated `/FFC-WEBSITE-2026-FORWARD/` on `images.fixfamilycourts.com`.
- [x] **Write & HTTP Delivery Verified:** Successfully verified programmatic SFTP write access into `/FFC-WEBSITE-2026-FORWARD/` and confirmed public HTTP 200 OK delivery.
- [ ] **Permanent Invariant Rule 10 (Strict Read-Only & Immutability):**
- All existing images and legacy directories outside `/FFC-WEBSITE-2026-FORWARD/` remain **100% STRICTLY READ-ONLY**.
- **ZERO DELETIONS:** Under no circumstances will any existing image or legacy asset be deleted, unlinked, or removed.
- **ZERO ALTERATIONS:** Under no circumstances will any existing image or legacy asset be edited, overwritten, or modified.
- **APPLICATION-LEVEL SANDBOXING:** The Filament Media Tool, Post/Page image uploaders, and Flysystem SFTP disk are hardcoded to write exclusively inside `/FFC-WEBSITE-2026-FORWARD/`.
- **PRESERVE REMOTE PHP TOOLS:** Never delete, modify, or touch ANY `.php` file on `images.fixfamilycourts.com` (safeguarding Ron's custom standalone image browser).
### 2.6 Image Subdomain Archival, Staged Transition & Production Stabilization Pipeline
- [ ] **Phase 1: Read-Only Exhaustive Audit:**
- Crawl all approved/imported post content and metadata to build a definitive whitelist of active media assets.
- Compare whitelist against full directory listing on `images.fixfamilycourts.com` via read-only inspection.
- [ ] **Phase 2: Double-Verification Archival Gate (Hard Requirement):**
- Create a complete `.zip` archive of the entire image subdomain on the IONOS server.
- Download a full, verified copy of the archive to Ron's local development machine.
- **Gate Check:** Both server-side `.zip` integrity and local archive copy must be confirmed before any pruning or migration actions proceed.
- [ ] **Phase 3: Post-Pruning Duplicate Management & Root Transition (With Permanent Rollback Guarantee):**
- **Full Rollback Guarantee:** ALL currently used legacy image paths, filenames, and directory structures (e.g. `/blog-posts/`, `/pages/`, `/court-opinions/`, `/featured/`, `/common-images/`, etc.) MUST remain intact and untouched in their current locations.
- This guarantees that Ron can **roll back to the old site at any time** with 100% of legacy media paths functioning flawlessly.
- **Zero Path Interference Rule:** Transitioning the Image Tool's upload target to the root directory for new production assets must **NEVER collide with, overwrite, displace, or interfere with any existing legacy file or folder path**.
- Dual-path / fallback duplicate file management: Concurrently supports both legacy URL structures and new rebuild assets during the transition period so that neither the old site nor the new rebuild experience missing media or 404 errors.
- [ ] **Phase 4: Final Legacy Cleanup Gate (Sole Authorization of Ron Post-Stability):**
- All media operations permanently handled through the first-party Image Management Tool.
- **Hard Gate on Deletion / Modification:** No existing legacy file, duplicate, or unreferenced image may be altered, moved, or deleted until:
1. The migration to the new production instance is completed.
2. The new production instance is **proven 100% stable in live production** over an extended evaluation period.
3. **Ron explicitly issues separate, written authorization** to execute the cleanup.
---
## Phase 3: Dev-User Testing & Laravel Cloud Staging/Production Pipeline
### 3.1 Comprehensive Dev-User Testing
- [ ] End-to-end user testing across all 5 roles (`Super Admin`, `Business Master`, `Editor`, `Client`, `Customer`).
- [ ] Verification of digital product downloads, Business Master overrides, search engine queries, and redirects.
### 3.2 Laravel Cloud Staging Setup
- [ ] Configure a dedicated **Staging Environment** on Laravel Cloud for `ffc-rebuild-26`.
- [ ] Set up environment variables, database connections, and private storage on Laravel Cloud.
### 3.3 Git / GitHub Actions CI/CD Pipeline (Staging ➔ Production)
- [ ] Establish branch workflow (e.g. `develop` / `staging` branch ➔ auto-deploys to Staging; `main` branch ➔ deploys to Production).
- [ ] Configure GitHub Actions workflow automating tests, asset compilation (`npm run build`), and deployment steps.
- [ ] Provide clear, beginner-friendly step-by-step guidance on branching, pull requests, and pushing updates safely.
- [ ] **Production Cleanup Checklist:** Remove public `/dev/architecture` route from `routes/web.php` and the dev-only mindmap banner from `resources/views/welcome.blade.php` before production launch.
### 3.4 Admin & Operations Console Documentation Hub Integration
- [ ] **Secure Console Porting:** Port the `/dev/architecture` Documentation Hub into authenticated Filament panels:
- Super Admin Console (`/admin`): Complete system architecture, database isolation, routing engine, and technical audit logs.
- Business Master & Operations Console: Operational workflow map, client compliance protocols, Sherry's override procedures, and media/inode rules.
- [ ] Secure behind `auth` middleware and role authorization gates so only authorized personnel have access in production.
### 3.5 Role-Specific Training & Guidance Pages (`.md` based)
- [ ] **Editor Training Page:** Standard operating procedures for creating, categorizing, and publishing documents, formatting standards, and Divi migration cleanup notes.
- [ ] **Client Onboarding & Guide:** Instructions on scheduling educational consulting, uploading narrative background materials, and reviewing the mandatory "Not An Attorney" disclosure.
- [ ] **Customer Knowledge Base:** Guide on accessing purchased books, digital audio/video vaults, token expirations, and downloading files securely.
- [ ] Render each training guide cleanly inside its respective panel navigation with markdown parsing.
---
## Phase 4: First-Party Marketing & Automation (Post-Launch)
### 4.1 First-Party Social Media Scheduling Engine (Blog2Social Replacement)
- [ ] Database schema: `social_posts` (platform, copy, media_url, scheduled_at, published_at, parent document_id).
- [ ] First-party queue-driven scheduler with a 1-click global kill switch.
### 4.2 First-Party Mass-Email Broadcast Engine (IONOS SMTP)
- [ ] Database schema: `email_campaigns`, `email_subscribers`, and `email_logs`.
- [ ] Throttled queue worker respecting IONOS hourly SMTP limits.
---
## 🧠 System Architecture Mindmap (Task 1.2 Reference)
```mermaid
mindmap
root((Fix Family Courts<br/>Rebuild 2026))
Authentication & Portals
Universal Login [/login]
Dashboard Hub [/dashboard]
Upward Role Inheritance
Ron: Super Admin [Full Technical Control]
Sherry: Business Master [Operations & Overrides]
Staff: Editor [Content Publishing]
Client: Educational Consulting [1-on-1 Sessions]
Customer: Digital Products [Books & Vault]
Universal Routing Engine
Format 1: Full Path [/resources/family-law-reform]
Format 2: Numeric ID [/2193]
Format 3: Direct Slug [/family-law-reform]
Fallback Router & 404 Logging [failed_routes table]
Redirects Manager [/admin-tools/redirects]
Duplicate Disambiguation [/admin-tools/duplicates]
Public Pages & Brand
Master Layout [layout-master.blade.php]
Mandatory Legal Disclaimer [Non-Attorney Notice]
Site-Wide Search Engine [/search]
Keyword search in title, excerpt, content
Type filters: All, Resources, Articles, Products
Navigation End Stubs
/resources, /products, /articles, /videos, /memes, /testimonials, /contact, /subscribe, /cart
Educational Consulting & Compliance
NO Case Management [PERMANENT BOUNDARY]
Double-Validation Email System
48-hour cryptographic token
Immutable legal_compliance_logs table
Email body HTML snapshot & IP/UA capture
Consultation Materials Vault
Client Background Narratives & Questions
Educational Disclaimers
Digital Products & Vault
Laravel Cloud Secure Storage [secure-products disk]
Signed Expiring URLs [/customer/download/{id}]
Configurable Token Expiry [15m, 30m, 60m]
Max Download Attempts Enforcement
Business Master Overrides
max_downloads_override
access_expires_override
is_comped & override_notes
Client Upload Gatekeeper
Zero Liability Default [can_upload_files = false]
Upload Quota Caps [upload_quota_mb = 0, upload_quota_count = 0]
Business Master Manual Toggle
Media Engine & IONOS Inode Relief
IONOS Subdomain [images.fixfamilycourts.com]
Permanent Invariant Rule [PROTECT ALL .PHP FILES]
ImageUsageTracker
Live Production 🟢
Draft 🟡
Unreferenced ⚪
Document ID filename convention [2193_name.webp]
Inode Relief Protocol
Exhaustive crawl -> Zip unreferenced images -> Double verify -> Delete loose files
Database Isolation Boundary
ffc_rebuild_26 [FULL READ / WRITE / MIGRATE]
ffc_default_25 [STRICT READ-ONLY]
Zero Access to Any Other Connections
Mandatory --database=ffc_rebuild_26 migration flag
Future Pipelines
Divi Rendered Data Dump & Visual Content Diff Tool
Laravel Cloud Staging & GitHub Actions CI/CD
First-Party Social Media Scheduler [Blog2Social Replacement]
First-Party Mass Email Broadcast [IONOS SMTP Engine]
```