Historical design: operational diagnostics now use New Relic. Follow the current observability runbook rather than provider-specific steps below.
Production Launch Readiness Audit - 2026-07-03¶
Verdict: Almost ready for first production launch, with selected audit risks skipped.
This audit reviewed the MamNajem backend, mobile/web app, web-admin app, infrastructure, CI/CD, tests, deployment configuration, security posture, privacy posture, core flows, data integrity, observability, operations, and release readiness.
Stack Discovered¶
| Layer | Stack |
|---|---|
| Backend | Spring Boot 3.5.15, WebFlux, Spring Security OAuth2 Resource Server, R2DBC PostgreSQL, Liquibase |
| Mobile/web app | Expo 54, React Native 0.81.5, React 19, Expo Router, React Query, Amplify Cognito |
| Admin app | Vite, React 19, TypeScript, Amplify Cognito, retiredDiagnostics React |
| Database | PostgreSQL, Liquibase migrations |
| Auth | AWS Cognito customer pool and separate admin pool |
| Storage | AWS S3 public/private buckets |
| Push | Firebase/FCM, SNS platform endpoints, Expo/Firebase messaging |
| Payments | Stripe subscriptions, Stripe Connect rent payments, App Store and Google Play subscription paths |
| SES and Cognito email delivery paths | |
| Background jobs | Spring scheduling for reminders, webhook retry/reconciliation/retention, observability snapshots |
| Observability | retiredDiagnostics, CloudWatch metrics/logs, health checks, GitLab job artifacts |
| Infra | Terraform/CDK, integration Lightsail/Postgres, production ECS Fargate/ALB/RDS/Amplify/Cognito/S3/SES/SNS |
| CI/CD | GitLab CI across backend, mobile, web-admin, and architecture repos |
Verification Run¶
| Repo | Command | Result |
|---|---|---|
backend |
mvn -B verify |
Pass: 5589 tests, 0 failures, 6 skipped, coverage checks met, SpotBugs clean |
mobile-frontend |
CI=true pnpm install --frozen-lockfile |
Pass |
mobile-frontend |
pnpm check |
Pass |
mobile-frontend |
pnpm exec jest --runInBand |
Pass: 501 suites, 2334 tests |
mobile-frontend |
pnpm build |
Pass with Expo warnings about default iOS plist and retiredDiagnostics native config |
mobile-frontend |
pnpm audit --prod |
Pass |
web-admin |
CI=true pnpm install --frozen-lockfile |
Pass |
web-admin |
pnpm build |
Pass with large chunk warning |
web-admin |
pnpm test |
First run timed out once; targeted rerun and full rerun passed 102 tests |
web-admin |
pnpm audit --prod |
Pass |
architecture |
npm ci |
Pass |
architecture |
npm run build |
Pass |
architecture |
npm test -- --runInBand |
Pass: 10 suites, 104 tests |
architecture |
npm audit |
Pass: 0 vulnerabilities |
| Integration smoke | agent-browser against https://web-integration.mamnajem.pl |
Public landing/auth routes loaded; API health was UP |
Launch Blockers¶
| Severity | Area | Evidence | Issue | Fix | Verify |
|---|---|---|---|---|---|
| None | - | - | No remaining launch blockers in this working audit after selected skips and implemented fixes. | - | - |
Resolved During Review¶
| Area | Evidence | Change | Verify |
|---|---|---|---|
| Admin Cognito IaC drift | architecture/terraform/aws-production/main.tf:212, :215, :216, :249, :323, :326; live AWS check 2026-07-03 |
Production Terraform now matches the live hardened admin Cognito setup: MFA on, deletion protection active, TOTP configured, no hosted admin OAuth flows/callback/logout, provider COGNITO, and SRP auth allowed. No import was needed because production state already contained the admin pool and client. |
terraform plan -target=aws_cognito_user_pool.admin -target=aws_cognito_user_pool_client.admin -detailed-exitcode -input=false -no-color returned no changes. |
| Architecture dependency audit | architecture/package.json, architecture/package-lock.json, architecture/bin/app.ts, architecture/test/cognito-auth-email.test.ts |
Upgraded CDK, AWS SDK, and related infra tooling dependencies, removed the unused aws-lambda runtime package, and adjusted CDK Terraform-retirement bucket synthesis for the newer CDK validation rules. |
npm ci, npm audit, npm run build, and npm test -- --runInBand all pass. |
| Integration domain alignment | architecture/bin/app.ts, architecture/terraform/aws-integration/main.tf, architecture/terraform/stripe-integration/main.tf, architecture/terraform/google/main.tf, architecture/scripts/finalize-terraform-migration.sh, architecture/README.md |
Active integration infrastructure, Stripe, Google RTDN, Cognito redirects, Amplify env vars, smoke scripts, and architecture docs now use canonical .pl integration domains. |
Architecture focused tests pass; Terraform validates for AWS integration, Stripe integration, and Google roots; live AWS DNS/Amplify/Cognito checks are .pl; Google RTDN live push endpoint is .pl; Stripe Terraform state has .pl webhook and portal URLs. |
| Active lease overlap DB guard | backend/src/main/resources/db/changelog/2026-07-04-active-lease-overlap-constraint.sql, backend/src/test/java/pl/mamnajem/integration/LeasePropertyLifecycleIntegrationTest.java |
Added a PostgreSQL GiST exclusion constraint that prevents overlapping ACTIVE lease date ranges for the same property while still allowing PENDING leases. |
RED test failed before the migration; targeted lifecycle test passes; full backend mvn -B verify passes with 5,590 tests, coverage, packaging, and SpotBugs. |
Production-Readiness Checklist¶
| Area | Status | Notes | Evidence |
|---|---|---|---|
| Backend build/tests | Pass | Backend verification is strong. | mvn -B verify |
| Mobile install/check/test/build | Pass with warnings | Main gates pass; Expo build warnings remain. | pnpm check, Jest, pnpm build |
| Web-admin | Pass with flake risk | Full suite timed out once, then passed on rerun. | pnpm test, pnpm build |
| Architecture | Partial | Build/tests/audit pass; production Terraform full-plan cleanup is still needed before rollout. | npm ci, npm audit, npm run build, Jest; production Terraform caveat above |
| Auth/session | Pass | Backend JWT validation is strong; live admin Cognito is hardened and Terraform now matches it. | SecurityConfig, Terraform, AWS Cognito live checks 2026-07-03 |
| Authorization/object access | Pass | Shared fail-closed authorization service and many auth edge-case tests. | AuthorizationService, backend integration tests |
| Payments/webhooks | Partial | Stripe signature/idempotency/retry are present; integration Stripe Terraform state points at the .pl webhook. |
StripeWebhookController, migrations, Stripe Terraform state |
| Privacy/GDPR | Pass | Privacy policy, data export, account deletion, IBAN handling, and retention policy are aligned for pilot. | privacy-policy-v1.md, DATA_RETENTION.md, UsersController; mvn -q -Dtest=RetentionPolicyConsistencyTest,DataExportServiceTest test |
| Data integrity | Pass | Strong constraints/idempotency; active lease overlap is now DB-enforced for ACTIVE leases. |
2026-05-01-concurrency-hardening.sql, 2026-07-04-active-lease-overlap-constraint.sql |
| Observability/ops | Partial | retiredDiagnostics scrubber and health exist; production alerting and diagnostics were not fully exercised. | application.yml, Terraform |
| UX/live smoke | Partial | Public integration routes load; authenticated flows not manually exercised live. | agent-browser smoke |
Minimum Launch Plan¶
- Deploy to integration, wait for successful CI/CD, then run authenticated owner/tenant smoke before manual production rollout.
Suggested Test Plan¶
Automated minimum before launch:
- Backend:
mvn -B verify, dependency-check, gitleaks, semgrep, API compatibility. - Mobile: install,
pnpm check, Jest, Playwright real-backend lifecycle. - Web-admin: Vitest full suite, production build, admin auth/MFA tests.
- Infra: Terraform production plan.
Manual/E2E scenarios:
- New owner signup, email verification, legal acceptance, onboarding, bank account, first property.
- Lease creation, tenant invitation, tenant signup/acceptance, tenant visibility only to assigned lease.
- Document/photo upload, download, delete, cross-user denial.
- Payment request, Stripe checkout/webhook success/failure/refund/dispute path.
- Messaging, notifications, push permission denial/approval.
- Early termination, handover, final settlement, deposit ledger.
- Account export and account deletion with active lease blocked and inactive account deleted.
- Admin login with MFA, list/search users/payments/webhooks, reveal flow requires reason, logout.
- Expired session, offline/poor network, 403 states, empty account states.
Risk Register¶
- Local
architecturecheckout is divergent fromorigin/production; do not use it for rollout until clean fast-forward sync.