Contributing
Change guidance for the main web-app repository.
Contributing to the Web App
Keep Web App changes scoped to user/admin workflows, API routes, data access, and related integrations. The Web App owns the records and state that users see; the Model Server owns asynchronous execution.
Choose the Right Change Scope
| Change | Primary owner | Required review |
|---|---|---|
| Page, component, or browser workflow | Web App | Web App review and user-flow validation. |
| Prisma model, migration, or authorization rule | Web App | Database and security review; update this section if the ownership model changes. |
| Analysis, collection, analytics, or report API use | Web App and Model Server | Review the shared contract and both implementations. |
| Callback, queue, job status, shared file path, or service credential | System contract plus both repositories | Coordinate a compatible cross-repository rollout. |
Before Opening a Change
- Trace the user workflow from its browser action to the Web App record and, if applicable, the Model Server request and callback.
- Keep browser input validation, authorization, and server-only credentials on the Web App side of the boundary.
- Use the Web App record—not a worker or queue record—as the source of truth for user-visible status.
- For a changed contract, add backward-compatible behavior first and arrange deployment of both consumers before removing the old behavior.
- Update the relevant Product, System, or Web App documentation in the same change.
Validation
Run the commands defined by main/package.json, including its lint, type-check, and production-build checks. For a changed data or integration workflow, also exercise the corresponding browser request, Model Server acceptance/rejection path, status callback, and authorized result or download.
Test both success and failure cases. In particular, verify that a request cannot access another user's dataset/file/job, that invalid service credentials are rejected once callback validation is enabled, and that retrying a callback cannot duplicate a user-visible result or notification.
Documentation Updates
Use Web App Architecture for ownership, data, and route responsibility. Use Development & Configuration for setup and environment behavior. Put shared HTTP, storage, queue, security, and compatibility facts in Cross-Repository Contracts and link to them instead of copying them.