Marsad

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

ChangePrimary ownerRequired review
Page, component, or browser workflowWeb AppWeb App review and user-flow validation.
Prisma model, migration, or authorization ruleWeb AppDatabase and security review; update this section if the ownership model changes.
Analysis, collection, analytics, or report API useWeb App and Model ServerReview the shared contract and both implementations.
Callback, queue, job status, shared file path, or service credentialSystem contract plus both repositoriesCoordinate a compatible cross-repository rollout.

Before Opening a Change

  1. Trace the user workflow from its browser action to the Web App record and, if applicable, the Model Server request and callback.
  2. Keep browser input validation, authorization, and server-only credentials on the Web App side of the boundary.
  3. Use the Web App record—not a worker or queue record—as the source of truth for user-visible status.
  4. For a changed contract, add backward-compatible behavior first and arrange deployment of both consumers before removing the old behavior.
  5. 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.

On this page