2. Constraints
2.1 Technical Constraints
| Constraint | Background |
|---|---|
| .NET 8 / C# backend | Decided via ADR-001. Closest heritage to PowerBuilder (strongly typed, OOP). Superior decimal precision for financial calculations. Excellent SQL Server interop via EF Core. |
| React + TypeScript frontend | Decided via ADR-002. Aligns with PowerSeller X frontend stack. AG Grid (or similar) for data-heavy views. |
| Azure SQL Managed Instance | Existing infrastructure. MWFI production database already runs on SQL MI. Database-per-tenant model (ADR-005). |
| Docker containers | All services containerized. Local development via Docker Compose. Production deployment via Azure Container Apps. |
| Existing database schema | ~170 tables with pscat_/rmcat_/pxcat_ prefixes must be preserved initially (ADR-006) for side-by-side validation and desktop app coexistence. |
2.2 Organizational Constraints
| Constraint | Background |
|---|---|
| Small team | CTO (Sawyer) is the primary developer during architecture and early implementation. AI-assisted development (Cursor + agents) maximizes individual output. |
| Tom stays on PowerBuilder | Tom maintains the desktop app exclusively. He is a source of legacy knowledge but will not write SaaS code. ~5 years to retirement. |
| Rudy transitions gradually | Rudy is currently on TFS → Git migration and value-add projects with Greg. He will be exposed to SaaS development organically — no forced handoff. |
| Greg is time-limited | Greg's deep domain knowledge (hedging, risk, business rules) must be captured in documentation and specs before his contract ends. |
| Specs before code | Every feature requires a written specification before implementation begins (ADR-010). |
2.3 Business Constraints
| Constraint | Background |
|---|---|
| Desktop app coexistence | Existing PowerBuilder customers must be supported indefinitely (ADR-015). No forced migration timeline. Both apps can run against the same database during transition. |
| MWFI is design partner | MWFI Holdings is the first adopter and provides real-world validation. They are a production secondary marketing operation — not a test environment. |
| Odoo handles billing/CRM | The SaaS App does not build its own billing, CRM, customer management, or subscription handling. Odoo is the commercial layer (ADR-012). |
| New customers first | UX and feature prioritization targets new customers who expect modern SaaS, not desktop-app replicas (ADR-007). |
2.4 Legal / Regulatory Constraints
| Constraint | Background |
|---|---|
| Mortgage data privacy | Loan-level data contains PII (borrower names, SSNs, property addresses). Must be handled with appropriate controls. |
| Tenant isolation | Each customer's data must be strictly isolated. Database-per-tenant provides the strongest guarantee. No cross-tenant data leakage permitted. |
| SOC 2 target | Long-term goal is SOC 2 compliance for the SaaS platform. Architecture decisions should align with this target. |
| Agency requirements | Fannie Mae, Freddie Mac, and Ginnie Mae have specific data format and delivery requirements for pool commitments and delivery. |