QuickCode Documentation

Describe your business requirements to AI, and QuickCode turns them into production-ready enterprise microservices deployed to the cloud.

Quick start

Start on the homepage or in QuickCode Studio—describe your backend, verify your email, then generate services backed by your schema.

  1. Describe your system

    On the homepage, use Try generating with AI and describe your microservice system in natural language. QuickCode proposes modules and DBML, or refine diagrams in Studio.

  2. Set up your project

    Enter a project name and work email. You receive a one-time secret code by email to confirm access before generation runs.

  3. Shape your DBML

    Edit tables, relationships, and QuickCode DSL notes in the DBML editor. Default CRUD is generated automatically—add DSL in Note: blocks for custom Query, Update, and Delete operations beyond that.

  4. Generate & deploy

    Choose database type (PostgreSQL, MySQL, SQL Server) and architecture (CQRS + Mediator or Service). Generated code is pushed to GitHub with Actions pipelines for Google Cloud Run.

Minimal DBML with QuickCode DSL (paste into Studio or use as an AI starting point). Default CRUD is automatic—use Query:, Update:, and Delete: in Note: blocks for custom operations:

Enum "ORDER_STATUS" {
  PENDING [note: "Pending"]
  PAID [note: "Paid"]
  SHIPPED [note: "Shipped"]
}

Table "USER" {
  "ID" integer [pk, increment, not null]
  "EMAIL" string
  "NAME" string
  "CREATED_AT" datetime
  "IS_NEW" boolean

  Note: '''
    Query:GET_NEW_USERS[] Where:IS_NEW[true], CREATED_AT[>|NowRemoveDays30] Select:ID, EMAIL, NAME, CREATED_AT
    Query:CHECK_EMAIL_EXISTS[?] Where:EMAIL
  '''
}

Table "PRODUCT" {
  "ID" integer [pk, increment, not null]
  "TITLE" string
  "PRICE" decimal
  "STOCK_QUANTITY" integer

  Note: '''
    Query:SEARCH_PRODUCTS[] Where:TITLE[Like], PRICE[Between] Select:ID, TITLE, PRICE
    Query:LIST_LOW_STOCK[] Where:STOCK_QUANTITY[<|10] Select:ID, TITLE, STOCK_QUANTITY
    Update:REDUCE_STOCK Where:ID Set:STOCK_QUANTITY[-1]
    Delete:REMOVE_ZERO_STOCK Where:STOCK_QUANTITY[<|1]
  '''
}

Table "ORDER" {
  "ID" integer [pk, increment, not null]
  "USER_ID" integer
  "ORDER_DATE" datetime
  "TOTAL_AMOUNT" decimal
  "STATUS" ORDER_STATUS

  Note: '''
    Query:GET_ORDERS_BY_STATUS_DATE[] Where:STATUS, ORDER_DATE[Between] Select:ID, ORDER_DATE, TOTAL_AMOUNT
    Query:GET_USER_ORDERS[] Tables:ORDER O, USER U Where:O.USER_ID, U.ID Select:O.ID ORDER_ID, U.NAME USER_NAME, O.TOTAL_AMOUNT
  '''
}

Ref: "ORDER"."USER_ID" > "USER"."ID"

What QuickCode generates

Each project is a full microservices workspace—not just API stubs. Generation produces:

  • Per-module API services — .NET APIs with Dapper repositories, default CRUD, and custom Query/Update/Delete endpoints from QuickCode DSL
  • YARP API Gateway — single entry point routing to module APIs
  • Admin Portal — auto-generated CRUD UI with group-based auth and table-level permissions
  • IdentityModule — users, roles, permissions, and API/portal access control (added automatically; do not duplicate in your modules)
  • Event listener service — async/event processing where your architecture needs it
  • Database migrations — schema updates on regeneration
  • Postman collections — per-module collections with auth environments
  • Docker / docker-compose — run the full stack locally
  • GitHub repository under QuickCodeNet/{project-name} with Actions workflows for build and deploy to Google Cloud Run

Regeneration updates generated code while your custom logic in partial classes stays intact—refine DBML and DSL, then regenerate safely.

QuickCode Studio

QuickCode Studio is the IDE for editing projects after setup:

  • DBML editor with syntax validation and parse errors before generate
  • ERD / diagram view from your schema
  • Module list—add, remove, or pick from built-in templates (e-commerce, restaurant, HR, email, SMS, and more)
  • AI: refine DBML in place, regenerate all modules, rollback on failure
  • Live generation progress (SignalR) during long runs
  • Share links (?token=) for time-limited project access without re-entering the secret code

Open Studio from the homepage after Set up your project, or use the CLI to sync DBML locally.

AI generation

On the homepage, Try generating with AI accepts up to 2000 characters describing your system. QuickCode:

  • Proposes multiple microservice modules, each with its own DBML (not one monolithic schema)
  • Opens Studio via a short-lived encrypted handoff token
  • Lets you pick an AI provider where configured (Google Gemini, OpenAI, Anthropic)
Do not ask AI to create Identity/User/Auth modules. QuickCode injects IdentityModule automatically. Duplicating user or role tables will fail validation.

Use AI for a first draft, then edit tables, Ref: relationships, and DSL notes by hand—or refine inside Studio before generating.

DBML format & QuickCode DSL

What is DBML?

DBML (Database Markup Language) is a simple, readable syntax for describing database schemas. QuickCode reads tables, enums, relationships, optional Project {} settings, and Note: blocks that contain QuickCode DSL—one line per custom Query, Update, or Delete operation.

Project block (per module)

At the top of a module DBML file you can set generation options:

Project shop_api {
  database_type: 'PostgreSQL'
  architectural_pattern: 'Service'
  is_auditable: 'true'
  is_soft_deletable: 'true'
}
  • database_typePostgreSQL, MySql, MsSql / SqlServer, or InMemory (for tests)
  • architectural_patternService or CqrsAndMediator
  • is_auditable / audit_log — enable audit logging on changes
  • is_soft_deletable / soft_delete — soft-delete columns; queries automatically exclude deleted rows

You can also set database type and architecture in the project setup UI; the Project {} block in DBML wins for that module file.

Basic Syntax

DBML uses a clean, intuitive syntax:

// Table definition
Table table_name {
  column_name type [constraints]
}

// Relationships
Ref: table1.column > table2.column

Enum Definitions

Define enums for reusable value types:

Enum "ORDER_STATUS" {
  PENDING [note: "Pending"]
  PAID [note: "Paid"]
  SHIPPED [note: "Shipped"]
  DELIVERED [note: "Delivered"]
  CANCELLED [note: "Cancelled"]
}

Enum "PAYMENT_METHOD" {
  CREDIT_CARD [note: "Credit Card"]
  BANK_TRANSFER [note: "Bank Transfer"]
  CASH_ON_DELIVERY [note: "Cash on Delivery"]
  DIGITAL_WALLET [note: "Digital Wallet"]
}

Table Definitions

Define tables with their columns and constraints:

Table "USER" {
  "ID" integer [pk, increment, not null]
  "EMAIL" string
  "NAME" string
  "CREATED_AT" datetime
  "IS_NEW" boolean
  "COMPANY_ID" integer
}

Table "PRODUCT" {
  "ID" integer [pk, increment, not null]
  "TITLE" string
  "PRICE" decimal
  "CURRENCY" CURRENCY
  "STOCK_QUANTITY" integer
  "DESCRIPTION" json
}

Common Column Types

Integer Types:
  • integer or int - Integer numbers (32-bit)
  • big_integer or bigint - Large integer numbers (64-bit)
  • small_integer or smallint - Small integer numbers (16-bit)
  • tinyint - Very small integer numbers (8-bit)
String Types:
  • string or varchar(n) - Variable-length string (default: 250 chars)
  • short_string - Short string (50 chars)
  • big_string - Large string (1000 chars)
  • large_string or text - Very long text (unlimited)
  • html - HTML content (unlimited)
  • json - JSON data type (for flexible schema, unlimited)
  • yaml or yml - YAML content (unlimited)
  • phone - Phone number (50 chars)
  • email - Email address (500 chars)
  • address - Address text (1000 chars)
  • url - URL string (1000 chars)
Date/Time Types:
  • datetime or datetime2 - Date and time
  • datetimeoffset - Date and time with timezone offset
Boolean Types:
  • boolean or bool or bit - True/false
Decimal/Numeric Types:
  • decimal or decimal(p, s) - Decimal with precision
  • money - Monetary value (precision: 18, scale: 2)
  • decimal_degree - Geographic coordinates (precision: 9, scale: 6)
  • decimal_18_8 - High precision decimal (precision: 18, scale: 8)
  • float - Floating-point numbers
Binary Types:
  • blob_image - Image/blob data stored as string (500 chars)
  • image - Image data stored as binary (varbinary)
  • file - File data stored as binary (varbinary)
Special Types:
  • guid or uuid - Globally unique identifier
  • Enum types - Custom enum (e.g., ORDER_STATUS, PAYMENT_METHOD)

Example with enum:

Table "ORDER" {
  "ID" integer [pk, increment]
  "STATUS" ORDER_STATUS
  "PAYMENT_METHOD" PAYMENT_METHOD
  "DETAILS" json
}

Constraints

  • pk - Primary key
  • increment - Auto-increment
  • unique - Unique constraint
  • not null - Not null constraint
  • default: value - Default value

Relationships

Define relationships between tables:

// One-to-many
Ref: "ORDER"."USER_ID" > "USER"."ID"
Ref: "PRODUCT"."PRODUCT_GROUP_ID" > "PRODUCT_GROUP"."ID"

// Many-to-many (with junction table)
Ref: "USER_COUPON"."USER_ID" > "USER"."ID"
Ref: "USER_COUPON"."COUPON_ID" > "COUPON"."ID"

// One-to-one
Ref: "ORDER"."SHIPPING_INFO_ID" > "SHIPPING_INFO"."ID"
  • > - One-to-many or many-to-one
  • - - One-to-one

Note: Use double quotes for table and column names that contain uppercase letters or special characters.

Invalid: column-level [ref: > OTHER.ID] inside table definitions. QuickCode only accepts Ref: lines after all tables, as shown above.

QuickCode DSL - Custom Operations

Important: QuickCode automatically generates default CRUD operations for every table:
  • GET /api/{table-name} → List all records (supports pagination, filtering)
  • GET /api/{table-name}/{id} → Get record by ID
  • POST /api/{table-name} → Create new record
  • PUT /api/{table-name}/{id} → Update record by ID
  • DELETE /api/{table-name}/{id} → Delete record by ID

What is QuickCode DSL?

QuickCode DSL (Domain-Specific Language) is a simple, intent-based language used within DBML Notes to define custom backend operations. It's not a programming language—it has no control flow, variables, loops, or branching. It only describes data access and simple state changes in a single line.

Each DSL line uses semantic keywords in the form Keyword:Value. The order is not important; keywords define meaning. QuickCode generates the full backend implementation—HTTP endpoints, service methods, repository queries, SQL, and DTOs—from your DSL definitions.

You should ONLY add custom business logic operations using QuickCode DSL in your DBML Notes:

  • ✅ Custom filter queries (e.g., Query:GET_BY_STATUS[])
  • ✅ Existence checks (e.g., Query:EXISTS_BY_EMAIL[?])
  • ✅ Partial updates with meaningful names (e.g., Update:UPDATE_STATUS)
  • ✅ Custom delete operations (e.g., Delete:DELETE_BY_USER_ID)

QuickCode DSL - Core Keywords

QuickCode DSL uses semantic keywords in the form Keyword:Value. Order is not important; keywords define meaning:

  • Query:<NAME> - Defines a query operation
  • Update:<NAME> - Defines an update operation
  • Delete:<NAME> - Defines a delete operation
  • Where:<conditions> - Filter conditions
  • Select:<fields> - Fields to return (for queries)
  • Set:<operations> - Fields to update (for updates)
  • Tables:<tables> - Table context (for joins)
  • Order:<columns> - Sort order for queries (e.g. Order:CREATED_AT[Desc], ID[Asc]). Use Order: only—not OrderBy: or Sort:.

Put DSL inside a table Note: ''' ... ''' block. You may split one statement across multiple lines: each new statement must start with Query:, Update:, or Delete:; continuation lines (e.g. Tables:, Where:) attach to the previous statement.

Query Format

Every Query MUST have a keyword in brackets.
Query:NAME[Keyword] Tables:... Where:... Select:...

Available Keywords:

  • [] or [List] - Returns array of items (most common)
  • [1] or [First] - Returns single object
  • [P] or [Pager] - Returns paginated list
  • [N] (N > 1, e.g. [15]) - Returns top N records as fixed-size list (hardcoded SQL limit, no paging parameters)
  • [*] or [Count] - Returns count number
  • [?] or [Exists] - Returns true/false

Examples from real projects:

Query:GET_NEW_USERS[] Where:IS_NEW[true], CREATED_AT[>|NowRemoveDays30] Select:ID, EMAIL, NAME, CREATED_AT Order:CREATED_AT[Desc]
Query:SEARCH_PRODUCTS[] Where:TITLE[Like], PRICE[Between], PRODUCT_GROUP_ID Select:ID, TITLE, PRICE, CURRENCY
Query:LIST_LOW_STOCK[] Where:STOCK_QUANTITY[<|10] Select:ID, TITLE, STOCK_QUANTITY
Query:GET_RECENT_ORDERS[15] Where:STATUS[PENDING] Select:ID, ORDER_DATE Order:ORDER_DATE[Desc]
Query:GET_ORDER_TOTALS[1] Where:USER_ID Select:SUM(TOTAL_AMOUNT) TOTAL
Query:GET_USER_ORDERS[] Tables:ORDER O, PAYMENT P Where:O.USER_ID, P.STATUS[COMPLETED] Select:O.ID ORDER_ID, O.TOTAL_AMOUNT ORDER_TOTAL_AMOUNT

For foreign keys, add JOIN queries with Tables: so APIs return related data in one call (e.g. orders with customer name), not only single-table filters.

Update Format

Set: is required in every Update.
Update:NAME Where:... Set:...
Update:NAME Tables:... Where:... Set:...

Important Rules:

  • Update names must be descriptive, NOT table name with UPDATE_ prefix
  • Update/Delete do NOT use keywords (no brackets after name)
  • Set: section is REQUIRED for Update
  • Tables: section is optional - only use when JOIN is needed across multiple tables

Examples from real projects:

Update:REDUCE_STOCK Where:ID Set:STOCK_QUANTITY[-1]
Update:DEACTIVATE_STALE_CARTS Where:CREATED_AT[<|NowRemoveHours48], IS_ACTIVE[true] Set:IS_ACTIVE[false]
Update:MARK_PAYMENT_FAILED Where:STATUS[PENDING], PAYMENT_DATE[<|NowRemoveHours1] Set:STATUS[FAILED]
Update:MARK_SHIPMENT_DELIVERED Where:ID, STATUS[NotEquals|DELIVERED] Set:STATUS[DELIVERED], DELIVERED_DATE[Now]

Delete Format

Delete:NAME Where:...
Delete:NAME Tables:... Where:...

Important Rules:

  • Delete does NOT have Set: section!
  • Tables: section is optional - only use when JOIN is needed across multiple tables

Examples:

Delete:DELETE_BY_USER_ID Where:USER_ID
Delete:DELETE_BY_POST_ID Where:POST_ID
Delete:REMOVE_EXPIRED_COUPONS Where:END_DATE[<|Now]

QuickCode DSL - Operators and Semantics

QuickCode DSL supports various operators for filtering and data manipulation:

  • = / bare column — equality or request parameter binding
  • Like — string contains
  • Between — range (two values)
  • >|, <|, >=|, <=| — comparisons
  • NotEquals — inequality (e.g. STATUS[NotEquals|CANCELLED])
  • Enum literals — STATUS[PENDING]
  • Time helpers — Now, NowAddHours24, NowRemoveDays30, NowRemoveHours48 (fixed offsets, not request parameters)
  • Aggregates in Select:COUNT(*), SUM(AMOUNT), AVG, MIN, MAX with optional aliases
  • Increment/decrement in Set: — e.g. STOCK_QUANTITY[-1], VIEW_COUNT[+1]

Important: Time functions are deterministic. Do not assume implicit joins, ordering, or limits—declare Tables:, Order:, and query keywords ([], [15], etc.) explicitly.

Complete Example with QuickCode DSL

Enum "ORDER_STATUS" {
  PENDING [note: "Pending"]
  PAID [note: "Paid"]
  SHIPPED [note: "Shipped"]
  DELIVERED [note: "Delivered"]
  CANCELLED [note: "Cancelled"]
}

Table "USER" {
  "ID" integer [pk, increment, not null]
  "EMAIL" string
  "NAME" string
  "CREATED_AT" datetime
  "IS_NEW" boolean
  "COMPANY_ID" integer
  
  Note: '''
    Query:GET_NEW_USERS[] Where:IS_NEW[true], CREATED_AT[>|NowRemoveDays30] Select:ID, EMAIL, NAME, CREATED_AT
  '''
}

Table "PRODUCT" {
  "ID" integer [pk, increment, not null]
  "TITLE" string
  "PRICE" decimal
  "STOCK_QUANTITY" integer
  
  Note: '''
    Query:SEARCH_PRODUCTS[] Where:TITLE[Like], PRICE[Between], PRODUCT_GROUP_ID Select:ID, TITLE, PRICE, CURRENCY
    Query:LIST_LOW_STOCK[] Where:STOCK_QUANTITY[<|10] Select:ID, TITLE, STOCK_QUANTITY
    Update:REDUCE_STOCK Where:ID Set:STOCK_QUANTITY[-1]
  '''
}

Table "ORDER" {
  "ID" integer [pk, increment, not null]
  "USER_ID" integer
  "ORDER_DATE" datetime
  "TOTAL_AMOUNT" decimal
  "STATUS" ORDER_STATUS
  
  Note: '''
    Query:GET_ORDERS_BY_STATUS_DATE[] Where:STATUS, ORDER_DATE[Between] Select:ID, ORDER_DATE, TOTAL_AMOUNT
    Query:GET_USER_ORDERS[] Tables:ORDER O, PAYMENT P Where:O.USER_ID, P.STATUS[COMPLETED] Select:O.ID ORDER_ID, O.ORDER_DATE ORDER_DATE, O.TOTAL_AMOUNT ORDER_TOTAL_AMOUNT
  '''
}

Table "CART" {
  "ID" integer [pk, increment, not null]
  "USER_ID" integer
  "CREATED_AT" datetime
  "IS_ACTIVE" boolean
  
  Note: '''
    Query:GET_ABANDONED_CARTS[] Where:IS_ACTIVE[true], CREATED_AT[<|NowAddHours24] Select:ID, USER_ID, CREATED_AT
    Update:DEACTIVATE_STALE_CARTS Where:CREATED_AT[<|NowRemoveHours48], IS_ACTIVE[true] Set:IS_ACTIVE[false]
    Delete:PURGE_INACTIVE_CARTS Where:IS_ACTIVE[false], CREATED_AT[<|NowRemoveDays90]
  '''
}

// Relationships
Ref: "ORDER"."USER_ID" > "USER"."ID"
Ref: "CART"."USER_ID" > "USER"."ID"

Note: Basic CRUD operations (GET_BY_ID, GET_ALL, basic UPDATE/DELETE) are automatically generated and should NOT be added to QuickCode DSL in Notes.

Project workflow

Project identity

Kebab-case name (4–30 chars), work email, and a 20-character secret code sent to your inbox.

Modules

Per-domain API services plus gateway, portal, identity, and event listener—each module is its own deployable service.

Database & pattern

PostgreSQL, MySQL, or SQL Server per module. CQRS + Mediator or classic Service architecture.

Project Parameters

  • Project Name: Lowercase, alphanumeric with hyphens/underscores (4–30 chars). Must be unique.
  • Email: Work email for the project; must match when reopening an existing project.
  • Secret Code: Exactly 20 characters, emailed once for new projects. Required for Studio and generation. Use Forgot secret code in the setup dialog to resend.

IdentityModule (system)

Every project includes IdentityModule automatically—users, roles, permissions, API and portal authentication. Do not create separate User/Auth/Role modules in DBML or via AI; they conflict with the built-in module.

Deployment

After generation, code is pushed to github.com/QuickCodeNet/{project-name}. GitHub Actions build Docker images and deploy to Google Cloud Run (gateway, portal, and per-module APIs). Configure cloud credentials and connection strings in your repo secrets before first deploy—see the FAQ for deployment troubleshooting.

Demo project

On the homepage, scroll to Try demo or open /demo-project to explore a sample architecture. Live portal and API links appear in the site navigation when configured.

Module Selection

Choose from available microservice modules based on your architecture needs. Each module will be generated as a separate service.

Database Type Selection

Select your target database. QuickCode supports the following database types:

  • PostgreSQL - Advanced open-source relational database with extensive features
  • MySQL - Popular open-source database, widely used
  • SQL Server - Microsoft SQL Server, enterprise-grade

The generated SQL queries, connection strings, and database-specific code will be optimized for your chosen database type.

Architectural Pattern

Choose an architectural pattern that defines the structure and organization of your generated code:

  • CQRS and Mediator - Command Query Responsibility Segregation with Mediator pattern. Separates read and write operations, providing better scalability and maintainability. Ideal for complex business logic and high-performance applications.
  • Service - Traditional service-oriented architecture. Simpler structure with service layers handling business logic. Ideal for straightforward CRUD operations and simpler applications.

Each pattern provides different benefits and suits different project requirements. Choose based on your team's preferences and project complexity.

CLI tool

Installation

macOS (Homebrew):

brew install quickcode-cli

Windows (Scoop):

scoop bucket add quickcode https://github.com/QuickCodeNet/quickcode-cli-bucket
scoop install quickcode

Linux:

Download the latest release from GitHub and add to your PATH.

Basic Commands

# Check if project exists
quickcode myproject check

# Create a new project
quickcode myproject create --email [email protected]

# Store project secret code
quickcode myproject config --set secret_code=YOUR_SECRET_CODE

# Download DBML files
quickcode myproject get-dbmls

# Upload DBML changes
quickcode myproject update-dbmls

# Generate microservices
quickcode myproject generate

# Clone project from GitHub
quickcode myproject pull

For detailed CLI documentation, visit our CLI Tool page.

Best practices

DBML Writing Tips

  • Use descriptive table and column names
  • Always define primary keys
  • Use appropriate data types (avoid oversized types)
  • Define relationships explicitly using Ref:
  • Add comments to complex tables/columns

QuickCode DSL Best Practices

  • Remember: Default CRUD operations are automatically generated - don't add them!
  • Every Query MUST have a keyword: Use [] for lists, [1] for single items, [?] for existence checks, [*] for counts, [P] for pagination, [N] (N>1) for fixed top-N results (hardcoded SQL limit)
  • Update names must be descriptive: Use names like UPDATE_STATUS, UPDATE_PASSWORD, NOT table name with UPDATE_ prefix
  • Every Update MUST have Set: Always include what fields to update
  • Update/Delete do NOT use keywords: No brackets after Update/Delete names
  • Only add custom business logic: Filter queries, existence checks, partial updates, custom deletes
  • Use Tables: for JOINs: Add JOIN queries for important foreign keys—not only single-table filters
  • Use Order: when sort matters: e.g. Order:CREATED_AT[Desc] on list and top-N queries

Project Organization

  • Keep project names simple and descriptive
  • Store your secret codes securely (password manager)
  • Use the same email for related projects
  • Document your DBML changes

Security

  • Never share your secret codes
  • Don't store sensitive data in DBML files
  • Review generated code before deployment
  • Keep your generated code repositories private if needed

Need help? See the FAQ or contact us.