FTEG Platform Architecture

Prompt 2c done Canonical model: fteg-store + fteg-erp + sme-erp (Business OS). Yuzu Marketing = client on Business OS; 9981 Yuzu = product. Source: /srv/www/hubs/GROUP-ARCHITECTURE.md § restudy

3Architecture layers
12Implementation prompts
100Client target (Business OS)
RM300kYearly revenue goal
Team rule: After each implementation prompt, update data/ecosystem.json and refresh this page so progress stays visible on platform-38792281.fteg.dev.

1. Three layers

┌─────────────────────────────────────────────────────────────┐
│  fteg-store (platform)                                       │
│  catalog · billing · client portal · provision               │
│  NOT parked under any ERP                                    │
└───────────────────────────┬─────────────────────────────────┘
                            │
      ┌─────────────────────┼─────────────────────┐
      ▼                     ▼                     ▼
 fteg-erp                                    sme-erp (Business OS)
 (FTEG 法人)                                 (Yuzu Marketing + other SMEs)
                                                     └─ 9981 Yuzu = product
      │                     │                     │
      └─────────────────────┴─────────────────────┘
                            │
              product tenants: CMS, Reservation, Commerce, …
    

Today: store logic still inside hubs/fteg-erp. Target: standalone hubs/fteg-storeDESIGN.md (Prompt 2a).

2. fteg-store (commercial platform)

Design: /srv/www/hubs/fteg-store/DESIGN.md · Setup: SETUP.md · Package: pkg-fteg-store v0.2

Store buyers (Prompt 2c live)

codebuyer_typepricing_tierERP hubCRM in fteg-erp?
fteginternalinternal_rm0fteg-erpNo
ymsbYuzu Marketinginter_cosme-erp (Business OS)Yes — FTEG client
externalSMEstandardsme-erp if Business OSYes

Staff subscribe + RM0 invoices: StaffSubscribeService in pkg-fteg-store. Seeder: StoreBuyerSeeder.

OwnsDoes not own
Global catalog & plans (FTEG admin only)
Store buyers & subscriptions
Invoices / Fiuu (package-billing)
Client portal (external SMEs)
Product instance registry + provision
Company HR / full CRM for group entities
CMS content editing (that's CMS BO)
fung-erp executive rollup

3. entity-erp (company OS)

InstanceLegal entitySold on store?
fteg-erpFTEG TechnologyNo — platform operator
sme-erpClient companies (SMEs)Yes — Business OS SKU
ymsb-erpYuzu Marketing *(transitional shell)*Prefer Business OS on sme-erp
Example — Yuzu Marketing Sdn Bhd
FTEG client → buys Business OS (sme-erp) → company hub.
9981 Yuzu = their custom ecommerce product instance (launcher from Business OS / portal), not a second ERP.

Portal vs ERP hub
Products only → client portal opens each product BO
+ Business OS → ERP hub lists integrated products (launcher, not CMS editor)

4. CMS — 1 site = 1 purchase

ScenarioSubscriptionsCMS BOs
FTEG official + investor2 × cms-web (RM0)2 separate tenants
Client needs 5 websites5 × cms-web5 BOs; portal/ERP lists all 5
FTEG 官网 (Corporate Web)Optional: no storefteg-officialweb deploy

ERP and portal show many instances; each CMS BO edits one site.

5. Yuzu Marketing (YMSB) — Business OS client

Yuzu Marketing Sdn Bhd = FTEG CRM + store buyer ymsb → purchases Business OSerp_hub=sme-erp.
9981 Yuzu = custom ecommerce under that company (product instance / legacy commerce BO).
Same pattern as any SME: portal + Business OS launcher lists 9981, CMS, etc.
ymsb-erp brand-registry shell is transitional — target is the sme-erp workspace for Yuzu Marketing.

6. Store buyers

BuyerPricingentity-erpfteg-erp CRM client?
External SMEStandardsme-erp (if Business OS)Yes
Yuzu Marketing (ymsb)Inter-co OKsme-erp (Business OS)Yes — FTEG client
FTEGInternal RM0fteg-erpNo (not client of self)

7. Business OS pricing & quotas (mission)

Tier Price Seats Storage CPU units / mo Product instances CRM records
Starter RM300/mo · RM3,000/yr 3 2 GB 1,000 10 500
Pro RM1,000/mo · RM8,000/yr 15 20 GB 10,000 50 5,000

Soft alerts at 80% / 100%. Starter over-quota → upgrade to business-os-pro-yearly (RM8k/yr).
VPS cost floor ~RM350–650/mo shared host; target ≥3× margin — not 100 VPS clones.
See Business OS plan · METERING.md · CAPACITY.md.

8. Shared packages

PackageRole
pkg-crmClients & leads (per entity-erp)
package-billingInvoices & payments
pkg-cloudflareDNS / hostnames BO
myinvoise-Invoice / LHDN
package-cms + SEOWeb CMS product tenant

8b. Maintainability restudy

Verdict: prefer this structure. Two live company-OS shapes (fteg-erp + multi-tenant sme-erp) beat a permanent third peer (ymsb-erp). Yuzu Marketing onboards like any SME; 9981 is a product instance.
Full comparison table: GROUP-ARCHITECTURE.md § Structure restudy.

8c. Group / buyer metrics API (fung)

FTEG: GET /api/group/metrics on fteg-erp.
Yuzu Marketing: GET /api/buyers/ymsb/metrics on fteg-store (YMSB_METRICS_SOURCE=store). Transitional ymsb-erp group API = fallback only.

9. Implementation progress

PromptTopicStatus
0Architecture doc + this pageDone
1apkg-crm v0.4.2 in fteg-erpDone
1bfteg-erp tests green (146 pass)Done
2afteg-store DESIGN.mdDone
2bfteg-store app + pkg-fteg-storeDone
2cStore buyers FTEG + YMSB (RM0)Done
3a–bCMS 1-site policy · Business OS SKUDone
4a–bymsb-erp shell · brand registry + store linkDone
5aMulti-product portal / ERP consoleDone
5bGroup metrics API (fung prep)Done
Afung-erp G0 shellDone
Bsme-erp multi-tenant + 100-client capacityDone
CBusiness OS Pro metering + VPS cost modelDone
G1fung-erp cached metrics + group totalsDone
G2fung-erp headcount + 9981 operator widgetsDone
G3Board pack PDF exportDone
S2FTEG can invoice clientsDone
S3YMSB feeds fung financeDone
S4Boss compare dashboardDone

Full copy-paste prompts: /srv/www/hubs/IMPLEMENTATION-PROMPTS.md

10. Related links

Updated 2026-07-21 · ecosystem.json v0.5.18 · Yuzu metrics via fteg-store buyer API