10 System Structure

10 CAMP · Governance & Structure

Objective, Pipeline & SOP

Penerangan penuh 3 permukaan sistem 10 CAMP — Landing Page, Back Office, dan POS Apps. Apa setiap satu buat, bagaimana data mengalir, siapa buat kerja apa, dan apa yang dah siap vs belum.

Live: www.10camp.com Financial: 10cc.10camp.com Deploy: git push → Netlify Brand: Bronze / Black / Cream
01

Landing Page

Etalase katalog awam + corong ke marketplace / walk-in. Bukan payment gateway.

Anon · public_products view
02

Back Office

Control-plane pengurusan: katalog, inventori, procurement, kewangan, HR, marketplace.

Staff / mgmt · RLS + service-role
03

POS Apps

Cashier jualan (web + mobile) — duit / stok / loyalti tepat, tahan-offline.

Cashier · Capacitor mobile
01

Landing Page

Storefront awam · pelawat anon · www.10camp.com

Objective
Etalase katalog awam + corong jualan. Bukan payment gateway — pelanggan beli via Shopee / TikTok / walk-in.
  1. Pamer produk (katalog live, harga marketplace, stok) dengan cara premium & dipercayai.
  2. Corong ke marketplace / WhatsApp / kedai.
  3. Tangkap lead: VIP loyalty (mata) + pertanyaan/invois web (menunggu pengesahan admin).
  4. SEO / keterlihatan (schema, sitemap, marketing pixels, llms.txt).
Tak boleh: dedah kos / margin / supplier / PII pelanggan ke pelawat awam. Landing = data cost-free sahaja.
Pipeline
Pelawat anon
   GET www.10camp.com (SPA boot, no login)
   initApp(anon): baca VIEW cost-free — public_products + public_stock
   render storefront + activity tiles + category pills
       Penapis wajib: is_published · bukan discontinued · bukan event-SKU (OUTDOOREXPO)
   browse / cari / product detail
   Corong keluar:
       (a) Butang marketplace → Shopee / TikTok (app_settings.links)
       (b) WhatsApp → wa.me (app_settings.shop.whatsapp)
       (c) Pertanyaan web → public-checkout → quotations_log 'Web Invoice' → admin sahkan
       (d) VIP loyalty → loyalty-otp (OTP email) → papar mata / pembelian
Sempadan keselamatan: role anon hanya baca 2 view (cost-free, metadata di-curate). Semua tulisan awam lalu Netlify function service-role (throttle + validate sendiri).
SOP
  • Nak produk keluar di landing: set Published + bukan discontinued + bukan event-SKU. Tak nampak → semak 3 syarat ni dulu.
  • Landing = Preview parity: ubah grid landing mesti sama pada Preview Mode (DOM/CSS sama). Guna ID selector.
  • Kontak & sosial: SEMUA dari app_settings — jangan hardcode nombor/handle.
  • Jangan dedah: kos, margin, supplier/vendor, bin lokasi, notes dalaman, PII pelanggan ke laluan anon.
  • Deploy: push → tunggu Netlify → verify app.js?v= → kill & buka semula app.
02

Back Office

Pengurusan · staff / mgmt (login PIN) · Bos = isBoss

Objective
Satu control-plane untuk seluruh operasi 10 CAMP: katalog, inventori, procurement, kewangan, HR, sync marketplace, CRM, laporan. Staff jalankan operasi harian; Bos/mgmt awasi + luluskan.
Modul
Product Master
CRUD katalog + varian + bulk edit → auto-push draf TikTok/Shopee. Bundles, Events.
Inventory
Batches FIFO, Analytics (health/turnover/aging), Receiving, Cycle Count, Locations, Notify.
Procurement
Calculator: RMB×ex + SF 5% + shipping + part-time → landed cost → inventory_batches.
Marketplace
Stock Sync 2-hala + Price Push + Not-on-TikTok gap + Campaign / RUGI flags.
Collections
Koleksi / Brand / Kategori (thumbnail) + Urus Koleksi (editable).
Finance
Commission Report, Laporan Sulit (PIN), bridge ke 10cc (source-of-truth kewangan).
HR / Roster
Jadual syif, cuti (AL/MC), tuntutan, approval (Bos via isBoss).
CRM / Members
Loyalty (mata), tier VIP, B2B negotiated price (min_qty).
Chat Inbox
Omnichannel — Shopee LIVE; TikTok pending; FB/IG on hold.
Pipeline
Login staf (email/password kali pertama → PIN peranti sama; __detectUserByPin)
   initApp(staff): baca BASE table penuh (products_master, inventory_batches,
     inventory_transactions, suppliers, PO, reservations) + app_settings
   operasi ikut modul → Supabase (RLS) + Netlify service-role functions (gated _auth)
   Marketplace: harga POS = harga kedai (base terendah); Shopee/TikTok LEBIH tinggi (cover fee)
   Deploy: git push → Netlify
SOP
  • Roles: mgmt · sales · inventory · Bos via isBoss(u) (Managing Director) — bukan role lama superior (retired).
  • Approval (HR claim / cuti / memo): gate isBoss(u) — konsisten render butang & handler.
  • Roadmap rule (keras): tiap perubahan update ROADMAP_DATA (index.html), commit sama.
  • Data integrity: semua tulisan duit/stok — semak {error} + idempoten; jangan guna Date.now() sebagai PK.
  • Jangan padam sejarah produk: buang produk = padam baris katalog SAHAJA; jualan/returns kekal.
  • Brand-lock + no-emoji untuk SEMUA skrin (3 warna + Poppins + logo rasmi).
03

POS Apps

Cashier · jualan (web + mobile Capacitor)

Objective
Point-of-sale untuk walk-in + fulfillment omnichannel. Laju, tahan-offline, dengan duit / stok / loyalti tepat. Skrin staf jual; mobile shell (Android/iOS) untuk peranti kedai.
Pipeline
Login staf → Cashier
   Buka Shift (float masuk laci; cash_drawer_log)
   Cari / Scan barcode / Katalog (browse ikut Koleksi/Brand/Kategori) → troli
   Attach pelanggan: Walk-in / VIP (loyalty) / B2B (harga rundingan ikut min_qty)
   Diskaun (manual/global) + Loyalty redeem
   Checkout:
       1. deduct_stock_fifo (RPC atomik, idempoten via p_ref = client_txn_id:sku)
       2. insert sales_history (client_txn_id = kunci idempotensi)
       3. kira mata + total_spent (RM10 = 1 mata)
       4. resit (email/print) + rekod laci + komisen
       5. push stok ke TikTok/Shopee (fire-and-forget)
   Return/Refund · Void · Tahan Jualan · Split · Tutup Kira (Z-report) · Offline queue+sync
SOP
  • Mula shift: Buka Shift → float. Tutup shift: Tutup Kira → kira tunai sebenar vs dijangka → simpan Z-report.
  • Refund / Return: barang elok balik jual → tick "Pulang ke stok" · barang rosak / write-offUNTICK (stok TAK ditambah balik).
  • Refund penuh → status Refunded + loyalti dipulih; separa → loyalti dipulih berkadar.
  • B2B: harga tier ikut qty (min_qty) — yang dicaj mesti sama dengan yang dipapar.
  • Offline caveat: stok/resit ikut masa sync; elak jual offline masa stok kritikal.
  • Mobile: Capacitor shell. Kill & buka semula app untuk muat versi baru.

Work Flow — Siapa Buat Apa

Rantaian nilai + tanggungjawab staf merentas sistem

1Sourcing 2Katalog 3Inventori 4Jualan 5Fulfillment 6Kewangan 7Marketing
StafTanggungjawab utamaPermukaan / Modul
Zaid
Bos · Owner · Dev
Strategi & keputusan · pembangunan sistem · kelulusan (HR/cuti/memo) · pengawasan kewangan & petty cash (BigPay) · marketing Semua · 10cc (owner) · deploy / dev-ops
Zack
Katalog · Marketplace · Inventori
Product Master (nama/gambar/varian) · listing & split Shopee/TikTok · kiraan stok (CUD/CUR/SCUD/R&R) · assign koleksi · Not-on-TikTok gap Back Office: Product Master, Marketplace, Inventory, Collections
Aliff
Kewangan · Akaun
Petty cash (rekod) · kira komisen · laporan suku tahun · proof Public Bank · rekonsiliasi Back Office: Finance / Commission · 10cc books
Farhan
Staf · Operasi
Operasi harian / cashier · akses 10cc (non-owner, gate role) POS Cashier · 10cc (staff view)
Irfan
Petty cash
Pemegang petty cash (belum di-share penuh dalam sistem) Kewangan (petty cash)
Role: sales
Cashier
Jual walk-in di POS · lihat komisen sendiri (view-only) POS Cashier
Role: inventory
Gudang
Terima stok, kiraan, susun lokasi, picking dari Notify Back Office: Inventory / Receiving / Notify
Aliran kerja: Sourcing (Zaid/Zack, China via SF Intl) → Katalog (Zack) → Inventori (Zack + inventory) → Jualan (sales walk-in + marketplace auto-order) → Fulfillment (inventory picking) → Kewangan (Aliff + Zaid, 10cc) → Marketing (Zaid).

Milestone — Siap vs Belum

Status pembangunan setakat Julai 2026

Siap Dalam progres Belum / perlu keputusan

Siap

  • POS Cashier penuhCheckout, duit/stok/loyalti, split payment, Buka Shift, Tutup Kira (Z-report), offline queue+sync
  • Marketplace directShopee LIVE + TikTok LIVE (order, stok 2-hala, price push); cutover EasyStore selesai
  • Product MasterVarian, bulk edit, bundles, events, campaign flags
  • Inventory AnalyticsHealth, turnover, aging, Stock Levels, snapshots harian
  • Procurement CalculatorLanded cost pipeline (goods + SF + shipping + part-time)
  • CollectionsKoleksi/Brand/Kategori + thumbnail + Cashier browse
  • Commission + Laporan SulitKira komisen + laporan berkunci PIN
  • HR / Roster + CRMSyif, cuti, approval; loyalty, tier VIP, B2B price
  • Mobile appiOS installed; Capacitor shell (Android internal testing)
  • Security + AuditAuth gates + INTERNAL_FN_SECRET + RLS; audit 3-permukaan dibetulkan
  • 10cc financial centreAccounting/HR/finance + settlements (Shopee+TikTok)
  • Backup harianSupabase → local + Google Drive (launchd)

Progres

  • Bridge POS ↔ 10ccPenjajaran kewangan (10cc = source-of-truth)
  • Android PlayInternal testing → production
  • MarketingIsi pixel IDs, GBP posts, tulis artikel kandungan
  • Catalog splitsPecah keluarga high-outlier (List A) pending Zack
  • TikTok Chat InboxEnable Customer Service scope + re-auth

Belum

  • C1 — PIN hardeningPutar semua PIN + buang hash dari client bundle (perlu keputusan Zaid)
  • WMS fasa 2–4Receiving formal, Cycle Count, Bins
  • Notify auto-deductQty lokasi auto-tolak bila jual
  • Audit lowsBaki L1–L12 (nombor pada skrin dalaman)
  • FB/IG ChatOn hold (Meta app review + akaun FB)

Peluang Seterusnya

Dilombong dari 178 e-commerce skill · silang dengan keadaan 10 CAMP · docs/IDEAS_ECOMMERCE_MINED.md

Kesimpulan lombong: 10 CAMP kuat di catalog / inventory / pricing / finance (kebanyakan siap). Marketing = jurang terbesar — hampir semua 36 skill marketing belum wujud, walau data (pelanggan, mata, jualan) semua dah ada.
Fokus P1 — nilai tinggi, data dah ada
Marketing engine asas
Review-generation (auto-mintak review lepas jual) + email/win-back automation + Google Shopping feed + hidupkan pixel (Meta/TikTok/GA4). Jurang paling besar, impact tertinggi.
C1 — PIN hardening
Putar semua PIN + buang hash dari client bundle + secret salt server. Security lama pending, perlu keputusan Zaid.
Demand-forecast + barcode
Ramal reorder ikut sejarah + musim; pick-pack-ship scan barcode (WMS fasa seterusnya). Sejajar operasi Zack.
Analitik pelanggan
RFM segmentation + CLV + cash-flow forecast → sasar marketing tepat + Zaid nampak runway kewangan.
Backlog (P2 / P3)
  • Pricing: coupon management · gift-card (semak semula — store-credit dulu di-drop) · flash-sale + countdown.
  • CRM/Storefront: product reviews + ratings (rich-result) · social-proof widgets · wishlist / recently-viewed / faceted-nav · personalization.
  • Ops: vendor scorecard · AP matching · order-routing/split · b2b company accounts + net terms.
  • Growth: referral loops · cross-sell/upsell engine · push (price-drop/back-in-stock) · seasonal campaign playbook · attribution dashboard.
§

Peraturan Silang

Semua permukaan

1Roadmap updatetiap perubahan update ROADMAP_DATA (index.html).
2Brand-lock3 warna (bronze/black/cream) + Poppins + no emoji (Lucide icon).
3Semak {error} + idempotensipada tiap tulisan duit/stok.
4Authendpoint bermutasi/pulang-data gated (requireStaff/requireAuth) + INTERNAL_FN_SECRET. Jangan dedah kos/PII ke anon.
5Guard boot-racerender bergantung masterProducts mesti tahan kalau katalog belum load (loading + retry).
6Deploypush → Netlify → verify app.js?v= → kill-reopen app.