Skip to content

Quick Reference

A comprehensive reference of all Quickback definition options.

Layer Summary

LayerPurposeKey Options
FirewallData isolationowner, organization, team, softDelete, exception
AccessWho can do whatroles, record conditions, or/and, $ctx. variables
GuardsField protectioncreateable, updatable, protected, immutable, false
MaskingField redactionemail, phone, ssn, creditCard, name, redact, custom
ActionsCustom routesguard, input, execute/handler, standalone
CRUD ListQuery optionspageSize, maxPageSize, fields, filtering, sorting
PUT/UpsertExternal syncRequires guards: false + generateId: false

Database Config Options

typescript
// quickback.config.ts
export default {
  database: {
    generateId: 'uuid',        // 'uuid' | 'cuid' | 'nanoid' | 'serial' | false
    namingConvention: 'camelCase',  // 'camelCase' | 'snake_case'
    usePlurals: true,          // Table names: 'users' vs 'user'
  },
  compiler: {
    features: {
      auditFields: true,       // Auto-manage createdAt/By, modifiedAt/By
    }
  }
};

Firewall Options

typescript
firewall: {
  owner?: {
    column?: string;
    source?: string;
    mode?: 'required' | 'optional';
  };
  organization?: {
    column?: string;
    source?: string;
  };
  team?: {
    column?: string;
    source?: string;
  };
  softDelete?: {
    column?: string;
  };
  exception?: boolean;
}

Access Conditions

typescript
// Field conditions
{ equals: value | '$ctx.userId' | '$ctx.activeOrgId' }
{ notEquals: value }
{ in: value[] }
{ notIn: value[] }
{ lessThan: number }
{ greaterThan: number }
{ lessThanOrEqual: number }
{ greaterThanOrEqual: number }

// Combinators
{ or: Access[] }
{ and: Access[] }

Query Parameters

OperatorQuery ParamSQL Equivalent
Equals?field=valueWHERE field = value
Not equals?field.ne=valueWHERE field != value
Greater than?field.gt=valueWHERE field > value
Greater or equal?field.gte=valueWHERE field >= value
Less than?field.lt=valueWHERE field < value
Less or equal?field.lte=valueWHERE field <= value
Pattern match?field.like=valueWHERE field LIKE '%value%'
In list?field.in=a,b,cWHERE field IN ('a','b','c')

Guards Lists

ListWhat it controls
createableFields allowed in create (POST) body
updatableFields allowed in update (PATCH) body
protectedOnly modifiable via named actions (not in createable/updatable)
immutableSet on create, blocked on update (not in updatable)

Fields can be in both createable and updatable. System fields are always auto-managed.

Mask Types

TypeExample InputMasked Output
'email'john@example.comj***@e***.com
'phone'555-123-4567***-***-4567
'ssn'123-45-6789***-**-6789
'creditCard'4111111111111111************1111
'name'John SmithJ*** S***
'redact'anything[REDACTED]
'custom'(your logic)(your output)

ID Generation Options

generateIdPUT Available?Notes
'uuid'NoServer generates UUID
'cuid'NoServer generates CUID
'nanoid'NoServer generates nanoid
'serial'NoDatabase auto-increments
falseYes (if guards: false)Client provides ID

Backend security, simplified.