Migrate an existing app
Move existing software to SegmentStream one user task at a time. Port the interface, map its backend, test a preview and switch users over with a recovery plan.
Trace one task through the old app
Pick a task a user can demonstrate from start to finish. For a service desk, that might be assigning an open ticket to a colleague. Capture the starting record, who can make the change, what the colleague sees and whether the old system sends a notification. This gives your coding agent a concrete acceptance test.
- For an app you own, give the coding agent the relevant routes, schema, background jobs and tests. Mark any external service the task calls.
- For a hosted SaaS product, collect an export, an example API response and screenshots of the task. Check whether the export includes relationships, attachments and historical changes.
- Decide which system owns writes during the pilot and how to find changes made after the initial export.
Fit the code to a workspace
Create a starter in a separate directory so you can compare it with the source application. Read its AGENTS.md and app/README.md. A hosted workspace app uses Next.js App Router and React. A compatible page or component can move into app/ with its dependencies. A different web framework needs a port of the screens you want to host. An existing service with an HTTP API can stay in place behind a workspace connection.
segmentstream init ./migration-pilot
cd migration-pilotPort the data and permission boundary
For the ticket example, declare a Ticket entity and its relationship to the owner in ontology/. Give the assignment action its own permission. Have the screen call that action as the signed-in member. The same permission then governs an assignment requested over the workspace API or by the company agent.
- Translate the old roles into explicit read and action grants. Try assigning a ticket as a dispatcher and repeat as a read-only colleague.
- Keep credentials for the ticket provider in a named connection. Put a multi-step follow-up in a workflow and reporting transformations in a pipeline job.
- Carry the source ticket ID into the import so you can compare the same ticket on both sides.
Exercise the migrated task in a preview
From the linked repository, commit your changes on a branch. Deploy the clean, committed revision to a named preview and open the URL it reports. Read and edit a sample ticket, verify its owner and history, and confirm that the read-only role is refused. The preview has its own snapshot of the operational database. Warehouse queries read the live warehouse. Pipeline schedules and external agent channels need a separate test.
segmentstream deploy --preview --preview-name migration-pilot
segmentstream previews show migration-pilotSwitch writes and reconcile the result
Agree a cutover point with the people using the old app. Pause old writes or collect a final delta, apply it once, and reconcile counts, links and a few representative records. Merge the verified code to main, deploy and check the live revision. Try the original task using a real pilot member before routing the rest of the team to the app.
- Record the last imported source ID or change cursor and the time you switched writes. Keep the source export available for comparison.
- If validation fails before cutover, leave the old system serving users. If it fails after the switch, pause new writes and reconcile changes already accepted by the new app before sending users back. Redeploying older code does not undo imported records or sent notifications.
segmentstream deploy
segmentstream status