Migrate an existing app
Import the backend of an existing codebase into a workspace and swap your ORM calls for the SDK.
Bring an existing app to Codata
Already have a codebase with Prisma, Mongoose, SQLAlchemy, or raw SQL? Point your connected coding agent at it. The agent analyzes your models, routes, and infrastructure, then submits the findings to Codata, which builds a workspace spec from them: entities, fields, relationships, and endpoints included.
How the import works
Analyze
Your agent reads the project: framework and dependencies, model definitions, database relationships, API routes, auth pattern, and supporting infrastructure (caches, queues, storage, search).
Import
The structured analysis is submitted via the
workspaces-import-analysistool. Codata generates workspace assets from it and returns the draft spec.Review
You see exactly what was detected — "Found 5 models: User, Post, Comment, Like, Tag; Prisma + PostgreSQL; ~20 endpoints" — and adjust anything that's off before generating.
Migrate the code
workspaces-getMigrationGuidereturns step-by-step instructions tailored to your detected stack, showing how each database call maps to the SDK:// before // after prisma.user.create({ data }) → ws.post("/users", data) prisma.user.findMany({ where }) → ws.get("/users", filters)
What gets imported
- Entities & fields
- Models become workspace assets with types, required flags, and unique constraints.
- Relationships
- Foreign keys and references become explicit one-to-many / many-to-many links.
- Endpoints
- Detected API routes seed the generated endpoint set.
- Infrastructure
- Caches, queues, and search are recorded as context for the migration guide (not migrated as-is).
- Auth
- Your existing auth pattern is noted; it's replaced by Codata's managed auth service.
After import the workspace is a draft — review the spec, then generate. Your old database stays untouched until you decide to cut over.