Export
Export turns your Mockomat model into files you own. There are two formats:
| Format | What you get | Available on |
|---|---|---|
| OpenAPI specification | An OpenAPI 3.0.3 YAML file with one schema per table | Every plan with an account |
| Code package | A ZIP with a generated NestJS backend for your tables | Professional and above |
Code packages need the Editor role or higher and edit access to the project. Export never changes your project, and the generated code has no runtime dependency on Mockomat.


Export wizard with the format and options steps.
Starting an Export
Open Export in the app. The export wizard walks you through four steps:
- Project — pick the project to export.
- Export format — OpenAPI specification or code package.
- Configure — the code package step shows the package your plan includes.
- Review & export — confirm. An OpenAPI file downloads at once; a code package is generated in the background and appears with a download link when it is ready.
If your app does not offer code packages yet, export the OpenAPI specification in the meantime.


Export format selection: OpenAPI specification or code package.
OpenAPI Specification
The OpenAPI export writes your model as components.schemas: one schema per table, with its attributes as properties, required attributes, enum values and relations. It contains no paths. Use it to share the data model with other tools, or as the starting point of a contract your backend team implements.
Code Package
The code package is a generated project you can run, change and deploy yourself.
| Package | Plans | Contents |
|---|---|---|
| Pro | Professional, Business | NestJS backend |
| Enterprise | Enterprise | NestJS backend + Angular frontend |
What the Backend Contains
- A NestJS application with a GraphQL API (code-first), one module per table: entity, resolver, service and input/output types.
- Per table: a paginated list query with search, a query by ID, and mutations to create, update, delete and restore records.
- TypeORM entities for MySQL / MariaDB.
- Authentication: sign-in with JWT and a user module. On the first start, the backend creates an admin user and prints its password once in the console.
- A Docker Compose file that starts MySQL and Redis, and a README with setup steps.
Today's generator has limits worth knowing before you plan with the code:
- It targets MySQL / MariaDB and always includes authentication and the Docker Compose file. The database and option switches in the wizard do not change the package yet.
- Relations between your tables are not generated. Add them to the generated entities and services yourself.
- Generated columns accept empty values: the Required flag of an attribute is not applied yet.
Run It Locally
The README in the package lists the steps. In short, in the backend folder:
npm install
cp .env.example .env # then enter your database credentials
npm run migration:run
npm run start:devThe backend expects a MySQL or MariaDB database and Redis.


Generated backend project structure overview.
Before You Export
Run through the runtime validation checklist first. A clean model produces cleaner code:
- Names follow your conventions — table and attribute names become class, type and field names.
- Attribute types are right — they become column and GraphQL field types.
- Searchable attributes become the search fields of the generated list query, and Sortable attributes are marked as sortable list columns.
Operations and parameters you designed in API Design shape your mock API; the generated backend comes with its own standard queries and mutations per table.
What to Review After Export
Module Boundaries and Naming
- Does each module correspond to a table of your model?
- Are module, service and resolver names consistent and meaningful?
Inputs and Validation
- Do the create and update inputs contain the fields you expect?
- Add validation for the fields your application requires — generated fields are optional.
Relations
- Add the relations of your model to the generated entities, with the direction and cardinality you designed.
- Load related records in the services the way your application needs.


Post-export code review checklist view.
Post-Export Handoff Checklist
- Assign ownership by module — each module should have an owner responsible for extending it.
- Mark what is generated — note which files are generated scaffolding and which need custom business logic.
- Capture known gaps — business rules, external integrations and background jobs are not generated.
- Commit a baseline — commit the generated code as your initial version and branch from there.
- Configure environments — database connections, environment variables and deployment pipelines.
- Test early — generated code compiles, but verify behavior with integration tests.


First local run and verification checklist.
Code Ownership
The generated code is yours: no runtime dependency on Mockomat, no license fees on the output, no restriction on commercial use. Modify it, run it on your own servers or with any hosting provider, and share it with clients or partners.