Platform-owned points products and a redemption order lifecycle kept separate from cash orders. Redeeming locks the published product, reserves stock, creates the order, debits points through the archived customer-accounts ledger with the order as reference, and snapshots the line in one transaction; a failure leaves no order, no stock change, and no ledger entry. Fulfilment moves only from pending_fulfillment, and customers see only their own redemptions. Demo seeding credits the demo customer through the same guarded credit path with reason seed, once, so no balance is ever written absolutely. Surfaces (admin console, mall points page) and product seeding follow.
28 lines
1006 B
TypeScript
28 lines
1006 B
TypeScript
export default defineNuxtConfig({
|
|
modules: ["@pinia/nuxt", "@nuxtjs/i18n"],
|
|
css: ["@vmall/shared/ui.css", "~/assets/mall.css"],
|
|
devtools: { enabled: false },
|
|
devServer: { port: 3000 },
|
|
runtimeConfig: {
|
|
public: {
|
|
apiBase: "http://localhost:8080/api",
|
|
// Domains served by the live backend; every other domain stays on the
|
|
// fixed-data adapter. Override with NUXT_PUBLIC_LIVE_DOMAINS='["catalog"]'.
|
|
// See openspec/changes/replace-mock-api-wave-1/design.md and waves 2-3.
|
|
liveDomains: ["catalog", "currency", "content", "shops", "brands", "auth", "account", "cart", "orders", "shipments", "invoices", "addresses", "coupons", "points"],
|
|
appName: "mall",
|
|
},
|
|
},
|
|
i18n: {
|
|
strategy: "no_prefix",
|
|
defaultLocale: "en",
|
|
locales: [
|
|
{ code: "en", name: "English" },
|
|
{ code: "zh", name: "中文" },
|
|
],
|
|
vueI18n: "../i18n.config.ts",
|
|
bundle: { optimizeTranslationDirective: false },
|
|
},
|
|
compatibilityDate: "2025-01-01",
|
|
});
|