Skip to content

ภาพรวมระบบ / System Overview

Audience: developers, technical leads, IT decision-makers เป้าหมาย: อธิบายภาพรวมสถาปัตยกรรม WMS แบบเข้าใจได้ใน 5 นาที ก่อนจะลงรายละเอียดในหน้าอื่น

Elevator Pitch

WMS (Warehouse Management System) ของ Digital Outsourcing เป็นระบบจัดการคลังสินค้าแบบ multi-tenant ที่ออกแบบให้ scale ได้ตั้งแต่ tier S (คลังเดี่ยว ผู้ใช้ < 50 คน) ไปจนถึง tier L (หลายคลัง หลายร้อยผู้ใช้) โดยใช้สถาปัตยกรรม 3-tier serverless-friendly: React frontend deploy บน Cloudflare Pages, NestJS REST API deploy บน Render.com และ PostgreSQL บน Supabase พร้อม object storage บน Cloudflare R2 — ทำงานครอบคลุม Inbound (ASN → GRN → Putaway), Outbound (Order → Wave → Pick → Ship), Inventory (Stock, Movement, Cycle Count), Returns (RMA), Replenishment, LPN tracking, Approvals, Reports และ Push Integration API สำหรับเชื่อมระบบภายนอก

System Diagram

┌──────────────────────┐   ┌──────────────────────┐   ┌──────────────────────┐
│  Main WMS (web)      │   │  Admin Portal        │   │  Docs Site           │
│  React 19 + Vite 6   │   │  React 19 + Vite 6   │   │  VitePress 1.6       │
│  wms-dev.pages.dev   │   │  wms-admin-…dev      │   │  static MD           │
└──────────┬───────────┘   └──────────┬───────────┘   └──────────────────────┘
           │  JWT (Bearer)            │  JWT (Bearer)
           └─────────────┬────────────┘
                         │  HTTPS / CORS-restricted

              ┌──────────────────────────────────┐
              │  NestJS REST API                 │       ┌──────────────────┐
              │  Render.com (Singapore, free)    │◀──────│  External ERP /  │
              │  Global prefix:  /api/v1         │ X-API │  e-commerce      │
              │  20 feature modules              │ -Key  │  (Push Integ.)   │
              │  JWT + ApiKey guards             │       └──────────────────┘
              └──────────────┬───────────────────┘
                             │   Prisma 6 (PgBouncer pooled)

              ┌──────────────────────────────────┐
              │  PostgreSQL 16 (Supabase)        │
              │  35+ models, UUID PKs, snake_case│
              │  Direct URL: migrations          │
              │  Pooled URL: runtime             │
              └──────────────┬───────────────────┘


              ┌──────────────────────────────────┐
              │  Cloudflare R2 (S3-compatible)   │
              │  File uploads / labels / reports │
              └──────────────────────────────────┘

High-Level Capabilities

โดเมนความสามารถหลัก
Master DataItems, UoM (+ conversions), Warehouses, Locations (20+ capacity fields), Partners
InboundASN, GRN (with QC), Putaway tasks, Putaway rules
OutboundSales Orders, Wave planning, Pick tasks, Shipments & Packages
InventoryReal-time stock (location/lot/serial), Movement log, Adjustments, Cycle Counts
LPNLicense Plate Number — pallet/case tracking, nesting, movements
ReturnsRMA with disposition routing
ReplenishmentMin/max rules → auto-task generation
ApprovalsThreshold-driven workflow (e.g. cycle-count variance)
Reports22+ aggregated reports (inventory, receiving, outbound, delivery, user, audit)
AdminUsers, Roles, Per-Module Permissions, Announcements, API Keys, Webhooks, Audit Logs, Global Config
Integration/integration/v1/* REST endpoints with API Key auth + Idempotency-Key
i18nThai (default) + English, runtime switch (i18next)

Live URLs

สิ่งURL
Main WMShttps://wms-dev.pages.dev
Admin Portalhttps://wms-admin-8p4.pages.dev
APIhttps://wms-api-dev-2w6s.onrender.com/api/v1
Swagger UIhttps://wms-api-dev-2w6s.onrender.com/api/v1/docs (non-prod only)
Docs (this site)ขึ้นกับ project ที่ deploy ใน Cloudflare Pages

ก้าวต่อไป

หน้านี้คือ summary — อ่านหน้าถัดไป Tech Stack เพื่อดู library versions และเหตุผลที่เลือก

หน้าในส่วน Technical Specification

  1. Overview — หน้านี้
  2. Tech Stack — libraries + versions + เหตุผล
  3. Monorepo Structure — โครงสร้าง folder + pnpm workspaces
  4. Backend Architecture — NestJS modules, guards, pipes
  5. Frontend Architecture — React app structure + state management
  6. Database Schema — Prisma models, ERD, conventions
  7. API Reference — endpoint groups + response format
  8. Authentication — JWT + API Key flows
  9. Authorization — 3-tier role + per-module permissions
  10. Deployment — Cloudflare Pages + Render + Supabase
  11. External Integrations — Push API, Webhooks, R2
  12. Local Development — getting started, env, scripts
  13. Module Reference — ทุก backend module

เผยแพร่ภายใต้ Digital Outsourcing