RICA Atlas

Internal Test Suite

The RICA Atlas test surface is part of platform discipline.

The RICA Atlas test surface gives technical and diligence readers a view into how database integrity, financial logic, workflow behavior, background jobs, API policy, metrics verification, and browser-level product behavior are protected as the platform evolves.

The suite does not yet represent a complete end-to-end certification matrix. It does provide meaningful coverage across the systems that matter most to project, loan, note, reporting, and workflow coherence.

Atlas uses layered confidence.

Typechecking protects interface consistency. API and service tests protect core behavior. Scenario and seed tests protect generated-world assumptions. Worker tests protect background processing. Browser tests protect complex user-facing workflows.

This matters because Atlas is not a static website. It is the operating layer for a market. Changes to project records, loan modeling, metric verification, permissions, or note waterfalls can affect investor-facing views.

The current regression surface is command-driven.

npm run typecheck
npm run build
npm run test:demo-seed --workspace apps/api
npm run test --workspace apps/api
npm run test:web:metrics-panel

Additional environment and data setup commands:

npm run db:migrate --workspace apps/api
npm run db:seed:scenario --workspace apps/api -- --apply --json
Surface Current Confidence Mechanism
Database schema and migrations SQL definitions, migration scripts, migration status checks, and route or service tests that exercise real query paths.
Generated scenarios Demo-seed validation for chronology, economics, cash-flow timelines, inventory, and schema consistency.
Worker behavior Job queue, reporting jobs, document scans, and reconciliation tests inside the API suite.
API routes Route tests across notes, portfolios, project financials, project loans, metrics, access, and list scoping.
Financial modeling Service tests for project waterfalls, loan modeling, servicing, note waterfalls, and distribution ledger allocation.
Metrics workflow Tests for metric assignments, submissions, review queues, approval flows, dashboards, and KPI fallbacks.
Web behavior Browser-oriented metrics panel coverage through npm run test:web:metrics-panel.

Database confidence is distributed across schema, seed generation, and behavior tests.

Atlas does not currently have a single test:db script. The most important database-focused command today is npm run test:demo-seed --workspace apps/api, which covers generated world structure, chronology, economics, cash-flow timelines, inventory, and schema consistency.

Worker behavior is covered inside the API suite.

Representative service tests validate queued-job processing, export and reporting job generation, automated document scan gating, and worker-triggered operational transitions that affect access or reporting.

  • apps/api/src/services/job-queue.test.ts
  • apps/api/src/services/report-jobs.test.ts
  • apps/api/src/services/document-scans.test.ts

The web layer has one explicit browser-oriented entry point today.

apps/web/components/projects/viewer-panels/project-metrics-panel.browser.test.tsx runs through npm run test:web:metrics-panel. It focuses on a complex metrics workflow surface: dashboard rendering, metric-set management, partial submission controls, audit queues, platform approval queues, and KPI-only fallback behavior.

Use a narrower or broader sequence based on platform risk.

  1. 01 Run npm run typecheck.
  2. 02 Run npm run test --workspace apps/api for server-side behavior.
  3. 03 Run npm run test:demo-seed --workspace apps/api when seeded-world assumptions may change.
  4. 04 Run npm run test:web:metrics-panel when shared metrics UX or browser rendering is at risk.
  5. 05 Run npm run build before release-oriented handoff.

The priority areas map directly to investor confidence.

  • API contract testing
  • Open project account records
  • GIS and asset-boundary data
  • Permissioned visibility
  • Audit trails
  • Document access
  • Material-event logs
  • Rate-limit and integration behavior
  • Responsive rendering
  • Accessibility
  • Performance budgets
  • Large file uploads
  • Worker throughput
  • Release gates

These areas matter because they prove that asset records are accurate, permissions are enforced, workflows are traceable, and market-critical calculations remain stable.