Skip to content

Provision a store (setup wizard)

setup_wizard is the guided way to stand up a real store. It asks for your brand, which modules to enable, tenancy mode, infra profile, and branding (theme, currency, locale), then provisions everything and writes a ready-to-activate .env. It hands the result to seed_client.

Crucially, for a single-box fork it writes TENANCY_SINGLE_TENANT_COMPANY_ID with the actual id of the company it just created — so you never look it up, and the storefront resolves your tenant on the first try.

  1. Start the wizard inside the running API container:

    Terminal window
    docker compose exec web python manage.py setup_wizard
  2. Answer the prompts — brand identity, modules, tenancy, infra profile, and branding:

    Prompt What it sets
    Brand name / slug / short name / ops email the Company record
    Domains ENABLED_DOMAINS — which modules install (e.g. product, crm)
    Deployment fork (single-tenant) or saas (host-resolved)
    Infra profile INFRA_PROFILElite or full
    Theme / currency / symbol / locale storefront branding & commerce config
    Seed demo products? whether to load a demo catalog too
  3. Review the plan and confirm. The wizard prints a summary and asks Apply? — nothing is written until you confirm (or pass --yes).

On apply, the wizard:

  • writes a composed profile to scripts/client_profiles/<slug>.generated.json,

  • runs seed_client with it (Company + TenantConfig + catalog/content), and

  • writes a partial env file .env.<slug> (at the repo root) with the deploy-time vars you still need to merge. For a fork that’s:

    Terminal window
    APP_NAME="<Brand>"
    ENABLED_DOMAINS=<domains>
    TENANCY_STRATEGY=single_tenant
    TENANCY_ENFORCEMENT=enforce
    TENANCY_SINGLE_TENANT_COMPANY_ID=<the new company's id> # ← the important one
    INFRA_PROFILE=<lite|full>
    COURIER_ASYNC_DISPATCH=<True|False>
    # …plus FRAUD_/IMAGE_ASYNC_DISPATCH and a DJANGO_TRUSTED_CORS_ORIGINS hint

The generated file holds only those deploy-time vars — it is not your whole .env (no DOMAIN, DB_PASSWORD, DJANGO_SECRET_KEY). Merge its lines into your existing .env, then restart.

Pass a base profile and skip the prompts and the confirmation:

Terminal window
docker compose exec web python manage.py setup_wizard \
--profile aurora --non-interactive --yes --demo

--profile is a name in scripts/client_profiles/ or a path. Other flags: --no-demo, --profile-out <path>, --env-out <path>.

seed_client setup_wizard
Input an existing profile JSON guided prompts (or a base profile)
Does Company + TenantConfig + catalog/content builds a profile, then calls seed_client
Writes .env? no yes — .env.<slug> with the tenant pin
Use for the demo catalog, or re-seeding a known profile standing up your own store end-to-end

Both are idempotent — re-running updates in place, never duplicates.