Using SrujanX
SrujanX turns a database schema into a complete, running backend. You bring the schema; it produces entities, repositories, services, controllers, DTOs, validation, API docs and deployment files in the stack you pick.
1. Get a schema in
There are three ways, and they all end up in the same place.
Draw it — the ER modeler
Go to ER Modeler (dashboard → quick actions, or /er-modeler).
- Add table drops a table with an auto-increment
id. - Click a table to rename it and edit columns — type, primary key, unique, nullable, auto-increment.
- Drag from a column's right-hand dot to another column's left-hand dot to create a foreign key. Handles are per column, so the relationship records exactly which columns it joins.
- Problems appear in a banner as you work (duplicate names, missing or composite primary keys, invalid identifiers). Export stays disabled until they're resolved.
- Generate backend carries the schema, the project name and the package name straight into the generator.
Renaming a column moves its foreign keys with it; deleting one removes them.
Upload a schema file
Paste or upload a MySQL/MariaDB dump (.sql), a Prisma schema (.prisma), an OpenAPI/Swagger spec, or a JSON Schema (.json/.yaml) — the format is detected from the content, so a renamed file still works.
For JSON Schema, $defs, definitions and a single root-level object schema are all recognised; a document with both $defs and root properties describes the definitions *plus* one more entity.
Whatever you give it becomes SQL, which is then executed into a scratch database and reverse-engineered from live JDBC metadata — so what you get matches what the database actually says, not a best-effort parse of the text.
Describe it in words
Give a plain-English description of the product and Claude drafts the schema first. Review it before generating.
2. Pick a stack
| Stack | What you get |
|---|---|
| Spring Boot | Java 21, JPA/Hibernate, layered controller → service → repository, Flyway migrations |
| Node.js | TypeScript, Express, TypeORM |
| NestJS | TypeScript, Nest modules and DI, TypeORM |
| Go | Gin, GORM, gofmt-clean output |
| Python | FastAPI, SQLAlchemy, Pydantic schemas, Alembic migrations |
Single-module is available everywhere. Multi-module layout needs Agency Scale or above.
Multi-module splits the API contract — the entities and schemas generated from your database — into a separately consumable package, so another codebase can depend on the contract without pulling in the service. It still deploys as one service: there is no API gateway, no service discovery and no per-entity service. If you need a distributed topology, this is not it.
Each stack uses its own mechanism, because each language's unit of dependency is different:
| Stack | Contract | How the service reaches it |
|---|---|---|
| Spring Boot | <name>-api Maven module | module dependency |
| Node.js / NestJS | packages/api npm workspace | imported by package name |
| Go | api/ with its own go.mod | require + replace ./api |
| Python | <name>_api package with its own project file | installed distribution |
Only the entities and schemas move. Auth, SSO and chain entities stay in the service — they are its plumbing, not something a consumer should inherit.
Databases
MySQL/MariaDB, PostgreSQL and MongoDB work with every stack.
MySQL and PostgreSQL differ only in driver and dialect — the generated code is otherwise identical. MongoDB changes exactly two files per entity: the model and the repository. Services, controllers, DTOs and routes are the same in every combination.
For MongoDB the source primary key is kept as its own indexed field rather than overwriting Mongo's _id, so nothing is lost migrating from a relational table. Because Mongo has no auto-increment, that key is allocated from a counter document seeded past the highest key already present — so importing an existing table does not hand out ids that already exist. Decimal columns are stored as Decimal128, never floats.
3. Choose features
Each one maps to real generated code, not a flag in a config file:
- CRUD — always on. Pagination, filtering, sorting and search included.
- OpenAPI docs — Swagger UI with realistic example payloads.
- Exception handling — global handler, typed errors, consistent JSON shape.
- JWT auth — HS256 or RS256 with the
algheader pinned on verification, refresh-token rotation with reuse detection, and role-based guards. Every generated entity endpoint requires a bearer token.
Where that first token comes from differs by stack, and it is worth knowing before you pick one:
| Stack | Sign-in you get |
|---|---|
| Spring Boot | A complete identity model of its own — users, roles, permissions — with working register, login, refresh, logout and password-reset endpoints. |
| Node.js | Built on *your* users table: include one in your schema and it generates register, login, refresh and logout against it. |
| NestJS | POST /auth/register, /auth/login, /auth/refresh and /auth/logout for the engine-created SQL users table. |
| Go | POST /auth/register, /auth/login, /auth/refresh and /auth/logout for the engine-created SQL users table. |
| Python | POST /api/auth/register, /api/auth/login and /api/auth/refresh for the engine-created SQL users table. Login accepts form fields username and password. |
For NestJS, Go and Python, enable JWT auth, select MySQL or PostgreSQL, and leave users out of the uploaded schema. The engine creates the identity table and generates password hashing, sign-in and token issuance. Apply the generated database setup before calling the endpoints. Registration creates ordinary users; it does not accept an admin role from the caller.
If you upload your own users table or choose MongoDB, the generator does not assume your password format or identity schema. Connect your identity source or enable SSO. In that configuration NestJS and Go do not generate password sign-in handlers; Python retains a /api/auth/login placeholder that returns 501 until you implement the integration. JWT verification and refresh-token helpers remain available.
Because Spring Boot owns users, roles and permissions, a schema that already defines tables with those names is refused on that stack rather than generating two classes for one table. Rename them, turn JWT off, or use a stack that builds on your own table.
Where an entity has a user_id column, its rows are automatically scoped to the authenticated caller — the owner is taken from the verified token, never the request body. Entities without that column are protected but not filtered.
- Docker & deployment — multi-stage Dockerfile, Kubernetes manifests, Helm chart, CI pipeline.
- Redis caching — 10-minute TTL, JSON values, per-argument keys and eviction by cache name. A Redis outage degrades to slower responses rather than an application outage, and null results are never cached (a stored miss would hide a record created a second later for the whole TTL).
- Distributed tracing — OpenTelemetry over OTLP.
- ABAC — attribute-based policies on top of roles. Rules read
subject.<attr> <op> resource.<attr>(or a quoted literal), with==,!=,>,>=,<,<=andin. The rule language is identical in every stack, so one policy means the same thing whichever backend enforces it — including how values render, sosubject.active == 'true'matches on all five.
Evaluation is fail-closed: an unparseable rule, a missing attribute, or a non-numeric value in a numeric comparison all deny, and an empty rule list denies rather than permitting. An ACL that quietly allows when it cannot decide is worse than none, because it looks enforced. The subject always comes from the verified token, never the request body — attributes a caller can set are attributes a caller can forge. Needs JWT auth switched on for that reason.
- SSO — Keycloak, Okta, Auth0 or Azure AD, over standard OIDC with PKCE, state and nonce. The ID token is verified against the provider's published JWKS, never merely decoded — accepting a token without checking its signature is the most common way an OIDC integration is quietly broken.
Provider roles are translated to your application's own roles in one editable file, and unmapped provider groups are dropped: passing them through would let whoever administers the directory grant themselves privileges in your app. A user whose groups all go unmapped still gets the baseline USER role, since an authenticated caller with no roles is rejected by every secured endpoint. Roles are re-read on every sign-in, so a revocation at the IdP takes effect at the next login rather than persisting until someone notices.
Roles are looked for in the ID token, then UserInfo, then the access token. That order is not belt-and-braces: Keycloak issues realm roles in the *access* token by default, so a client reading only the ID token sees none of them and silently gives everyone the baseline role.
Needs JWT auth switched on — the connector's output is this application's own access and refresh tokens.
- White-label — your brand replaces SrujanX throughout the output.
- OData query surface —
$filter,$select,$orderby,$top,$skip,$countand a$metadatadocument, over your collections.
$filter supports eq, ne, gt, ge, lt, le, and, or and the string functions contains, startswith and endswith. The grammar is identical in every stack, so a query written against one backend means the same thing against another — including the EDM types $metadata advertises.
Field names are checked against the entity's real columns and every literal is a bound parameter, so a crafted $filter is refused rather than executed; a string-concatenating OData parser is a SQL injection hole with extra steps. The whole expression is validated before anything runs, so a filter whose first half is valid returns nothing rather than a partial result. Wildcards in a value stay data — contains(name,'100%') matches a literal 100%, not everything starting with 100.
Parenthesised grouping is refused rather than half-supported: implementing it partially would silently change operator precedence and quietly return the wrong rows. $top is capped, and negative paging is rejected.
- Istio service mesh —
PeerAuthenticationin STRICT mTLS,DestinationRule,VirtualServiceandAuthorizationPolicy. Needs deployment configuration switched on, since it builds on those manifests. - PII field encryption — AES-GCM at the column level for fields you mark as personal data. The wire format is identical in every stack (12-byte random nonce prepended, base64 encoded), so a value written by one can be read by another — a per-language format would strand your data the moment you migrated. A missing key refuses to run rather than silently storing personal data in plaintext. Note that an encrypted column cannot be searched or sorted by the database, so encrypt the fields that need it, not every column.
- Audit logging & SIEM forwarding — security events logged locally and, when a collector URL is set, shipped to it. Any SIEM accepting a JSON POST works (Splunk HEC, Datadog, Elastic, Sumo) — no vendor SDK. The envelope is identical in every stack, so one collector configuration ingests events from all of them rather than needing a parsing rule per language. Delivery is asynchronous and failures are dropped: the event is already in the local log, and an unreachable collector must never slow down or fail a login.
- Retrieval (RAG) starter — pgvector storage, paragraph-aware chunking with overlap, an embedding provider behind an interface, ingest/retrieve/delete endpoints, and an evaluation harness. PostgreSQL and Python only, because pgvector is a Postgres extension.
This one ships as a *starter*, not finished output: retrieval quality depends on your corpus rather than on the code, so the harness comes with an empty dataset for you to fill with real questions. Retrieval returns the cosine distance alongside each chunk, so you can tell "nothing relevant" from "here is the least-bad result".
- Chain indexer & SIWE auth — an event indexer that stays behind the head by a configurable confirmation depth (so a reorg cannot leave you holding an event that never happened), a transaction queue that serialises sends to keep nonces consecutive, and Sign-In with Ethereum (EIP-4361) with server-issued single-use nonces. Node.js only.
No smart contracts are generated. Contracts are immutable once deployed and hold funds; generated Solidity that someone finishes by hand is a liability, not a feature. This is the off-chain service that reads from and writes to a chain.
Two more choices sit alongside the toggles:
- Migrations — Flyway (default) or Liquibase. Flyway emits versioned
.sql; Liquibase emits an XML changelog. - CI pipelines — GitHub Actions, GitLab CI, Bitbucket Pipelines, or any combination. Each is written to the path its platform expects. Leaving all three unticked falls back to GitHub rather than generating a repo with no pipeline at all.
Options your plan doesn't include are disabled and say which tier unlocks them. The server enforces the same rules, so nothing depends on the UI.
Not every feature exists on every stack. The generators differ in what they can produce, and a feature your plan covers can still be impossible for the stack you picked — in which case the option says so and names the stacks that do support it, rather than offering an upgrade that would not deliver it.
| Spring | Node | NestJS | Go | Python | |
|---|---|---|---|---|---|
| CRUD, OpenAPI, exceptions, Docker, CI | ✓ | ✓ | ✓ | ✓ | ✓ |
| JWT verification, RBAC, refresh rotation | ✓ | ✓ | ✓ | ✓ | ✓ |
| Sign-in endpoints generated | ✓ | ✓¹ | ✓² | ✓² | ✓² |
| MySQL / PostgreSQL / MongoDB | ✓ | ✓ | ✓ | ✓ | ✓ |
| Kubernetes & Helm | ✓ | ✓ | ✓ | ✓ | ✓ |
| Istio service mesh | ✓ | ✓ | ✓ | ✓ | ✓ |
| Distributed tracing | ✓ | ✓ | ✓ | ✓ | ✓ |
| Redis caching | ✓ | ✓ | ✓ | ✓ | ✓ |
| PII field encryption | ✓ | ✓ | ✓ | ✓ | ✓ |
| Audit logging & SIEM | ✓ | ✓ | ✓ | ✓ | ✓ |
| ABAC | ✓ | ✓ | ✓ | ✓ | ✓ |
| SSO (Keycloak/Okta/Auth0/Azure) | ✓ | ✓ | ✓ | ✓ | ✓ |
| OData query surface | ✓ | ✓ | ✓ | ✓ | ✓ |
| Retrieval (RAG) starter | — | — | — | — | ✓ |
| Chain indexer & SIWE auth | — | ✓ | — | — | — |
| Multi-module layout | ✓ | ✓ | ✓ | ✓ | ✓ |
¹ Node generates them against a users table in your own schema; see JWT auth above.
² NestJS, Go and Python generate password sign-in for the engine-created SQL users table with JWT auth enabled. Existing user tables and MongoDB require an identity integration or SSO; see JWT auth above.
4. Generate
Generation time depends on schema size, stack and selected capabilities. The downloadable project includes the selected application layers and its own README covering configuration and startup. Review configuration and run the generated project’s checks before deployment.
Before it runs anywhere, set real values for the database credentials and JWT_SECRET in the generated .env — the defaults are development placeholders.
Plans
| Developer | Pro / Startup | Team | Agency Scale | Enterprise On-Prem | |
|---|---|---|---|---|---|
| Price | Free | ₹3,999/mo per user | ₹14,999/mo per user | Contact us | Contact us |
| Projects | 1 | unlimited | unlimited | unlimited | unlimited |
| Stacks | Spring, Node | all five | all five | all five | all five |
| Architecture | single module | single module | single module | + multi-module | + multi-module |
| JWT, OpenAPI, Docker | — | ✓ | ✓ | ✓ | ✓ |
| OData, Flyway/Liquibase | — | ✓ | ✓ | ✓ | ✓ |
| Redis caching, distributed tracing | — | — | ✓ | ✓ | ✓ |
| K8s/Helm, white-label, multi-module | — | — | — | ✓ | ✓ |
| Istio mesh, GitLab/Bitbucket CI | — | — | — | ✓ | ✓ |
| ABAC, SSO, PII encryption, SIEM, air-gapped | — | — | — | — | ✓ |
Developer includes one free project. Pro / Startup and Team use monthly recurring subscriptions. Team adds Redis caching and distributed tracing.
Agency Scale and Enterprise On-Prem have custom licence terms. Select Contact us to discuss your requirements and receive a quote. An enquiry alone does not activate access: payment must be confirmed and an admin must activate the paid licence. Renewals follow the agreed licence term.
Complimentary access is a separate admin grant for promotional or partner use. An admin can choose specific features, stacks, project allowances and an optional expiry. It creates no payment and does not cancel existing recurring subscriptions.
If your plan already covers what you've selected, there's nothing more to pay — generate as often as you like.
Troubleshooting
"Not included in <your plan>" — the feature needs a higher tier. The badge names which one.
Export SQL is disabled in the modeler — fix the problems in the amber banner. Every table needs exactly one primary key and a valid identifier.
Generated app won't start — set the database credentials in .env. With security enabled the schema also needs its migration applied; the generated README has the command.
Every endpoint returns 401 and there is no login route — check whether JWT was enabled and which identity table the generator uses. NestJS, Go and Python include password sign-in when the engine creates the SQL users table. If you uploaded an existing user table or selected MongoDB, configure SSO or connect your identity source. Node uses your schema’s users table; Spring Boot ships its own. Use the endpoint paths listed under JWT auth above.
"Amount mismatch" at checkout — the price changed since the page loaded. Reload and try again.