Skip to content

Configuration ​

mall.config.ts ​

The one file for a static mall, and the seed for a new database. It's validated when you build, so a mistake fails with the exact path, for example shops.3.colors.bg: must be a hex colour like #e2b857.

ts
import type { MallConfigInput } from '@shopping-mall/shared/config';

export default {
  mall: {
    name: 'Shopping Mall',          // up to 40 characters
    tagline: 'Walk the mall together.',
    accent: '#e2b857',              // highlight colour
    currency: 'USD',                // ISO 4217, used to format prices
    locales: ['en', 'my'],          // UI languages, the first is the default
  },
  shops: [
    {
      id: 'lumen-coffee',           // lowercase, digits, dashes
      slot: 'w0',                   // the unit (see the greybox map)
      name: 'Lumen Coffee',
      tagline: 'Small-batch roasts, pulled slow',
      category: 'Food & drink',
      colors: { bg: '#2b1d14', accent: '#f0b35a' },
      logo: '/logos/lumen.png',     // https://… or a path under client/public
      description: 'A neighbourhood coffee bar…',
      features: ['Single-origin espresso'],
      links: [{ label: 'Visit the website', url: 'https://example.com' }],
      products: { adapter: 'static', items: [{ id: 'house', name: 'House blend', price: 14 }] },
      // or: products: { adapter: 'json-url', url: 'https://example.com/products.json' }
    },
  ],
} satisfies MallConfigInput;

The full schema is shared/src/config.ts.

Server settings ​

Set these as environment variables (a .env file for docker compose). Everything is optional.

VariableWhat it does
HOST_SECRETThe host password: host sign-in and /admin/. Unset means no host and no admin.
DATABASE_URLPostgres for live content. Without it, shops come from mall.config.ts.
S3_ENDPOINT, S3_BUCKET, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_REGIONStorage for uploads. Any S3-compatible service.
S3_URL_STYLEvirtual for Railway and AWS; leave unset for SeaweedFS and MinIO.
ROOM_CAPACITYPeople per room before newcomers go to main-2, main-3, … (default 100).
REPORT_WEBHOOKAlso POST player reports here, for example a chat webhook.
BLOCKLIST_FILEWords to mask in chat and refuse in names.
EVENTSoff stops logging the anonymous usage events (privacy).
PORTServer port (default 8787).

The web container also takes PORT (default 80) and API_UPSTREAM (default server:8787). See Self-hosting and deploying for the full picture.

Languages ​

UI text lives in client/src/i18n/en.ts and my.ts (Burmese). To add a language, copy en.ts, translate the values and register it in client/src/i18n/index.ts. Then list it in mall.locales. A test checks that every language has every key.

  • ?s=lumen-coffee opens the mall at that shop, with its panel open after the fly-in.
  • ?at=x,z,yaw,floor starts at an exact spot (yaw in radians, floor 0 or 1). Visitors can share their spot from the share button.
  • ?room=name joins a specific room.

MIT licensed code. Assets CC BY 4.0 unless noted.