ภาพรวมระบบ / 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 Data | Items, UoM (+ conversions), Warehouses, Locations (20+ capacity fields), Partners |
| Inbound | ASN, GRN (with QC), Putaway tasks, Putaway rules |
| Outbound | Sales Orders, Wave planning, Pick tasks, Shipments & Packages |
| Inventory | Real-time stock (location/lot/serial), Movement log, Adjustments, Cycle Counts |
| LPN | License Plate Number — pallet/case tracking, nesting, movements |
| Returns | RMA with disposition routing |
| Replenishment | Min/max rules → auto-task generation |
| Approvals | Threshold-driven workflow (e.g. cycle-count variance) |
| Reports | 22+ aggregated reports (inventory, receiving, outbound, delivery, user, audit) |
| Admin | Users, Roles, Per-Module Permissions, Announcements, API Keys, Webhooks, Audit Logs, Global Config |
| Integration | /integration/v1/* REST endpoints with API Key auth + Idempotency-Key |
| i18n | Thai (default) + English, runtime switch (i18next) |
Live URLs
| สิ่ง | URL |
|---|---|
| Main WMS | https://wms-dev.pages.dev |
| Admin Portal | https://wms-admin-8p4.pages.dev |
| API | https://wms-api-dev-2w6s.onrender.com/api/v1 |
| Swagger UI | https://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
- Overview — หน้านี้
- Tech Stack — libraries + versions + เหตุผล
- Monorepo Structure — โครงสร้าง folder + pnpm workspaces
- Backend Architecture — NestJS modules, guards, pipes
- Frontend Architecture — React app structure + state management
- Database Schema — Prisma models, ERD, conventions
- API Reference — endpoint groups + response format
- Authentication — JWT + API Key flows
- Authorization — 3-tier role + per-module permissions
- Deployment — Cloudflare Pages + Render + Supabase
- External Integrations — Push API, Webhooks, R2
- Local Development — getting started, env, scripts
- Module Reference — ทุก backend module