📘 ภาพรวมระบบ

📘 ภาพรวมระบบ SML AI Cloud

← กลับไปสารบัญหลัก


1.1 เกี่ยวกับ SML AI Cloud

SML AI Cloud คือระบบบริหารจัดการธุรกิจแบบครบวงจร (Enterprise Resource Planning / Point of Sale System) ที่ออกแบบมาเพื่อรองรับธุรกิจทุกขนาด ตั้งแต่ร้านค้าเล็กไปจนถึงองค์กรขนาดใหญ่

🎯 วัตถุประสงค์

  • ครบวงจร - จัดการทุกด้านของธุรกิจในที่เดียว
  • ง่ายต่อการใช้ - Interface ที่เป็นมิตรกับผู้ใช้
  • Real-time - ข้อมูลอัพเดทแบบทันที
  • Multi-platform - ใช้ได้ทุกที่ทุกเวลา
  • Scalable - รองรับการเติบโตของธุรกิจ

1.2 คุณสมบัติหลัก

🛒 ระบบตะกร้าสินค้า (Cart System)

เป็นจุดเด่นสำคัญของระบบ:

┌─────────────────────────────────────────┐
│  🔍 Universal Search                   │
│  - ค้นหาด้วย AI-powered Search        │
│  - Thai Tokenization                   │
│  - Real-time Results                   │
│  - Multiple Search Criteria            │
└─────────────────────────────────────────┘
          │
          ↓
┌─────────────────────────────────────────┐
│  📦 Product Detail Dialog              │
│  - ข้อมูลสินค้าครบถ้วน                 │
│  - ยอดคงเหลือ 3 ระดับ                  │
│  - ประวัติซื้อ/ขาย                     │
│  - เพิ่มเข้าตะกร้าได้ทันที             │
└─────────────────────────────────────────┘
          │
          ↓
┌─────────────────────────────────────────┐
│  🛒 Smart Cart Management              │
│  - บันทึกอัตโนมัติใน MongoDB          │
│  - Real-time Sync                      │
│  - Multi-cart Support                  │
└─────────────────────────────────────────┘

คุณสมบัติ:

  • ✅ ค้นหาภาษาไทยได้แม่นยำ (Thai Tokenization)
  • ✅ แสดงผลแบบ Real-time
  • ✅ Zoom Control 5 ระดับ
  • ✅ Auto Packing คำนวณหน่วย
  • ✅ เพิ่มสินค้าเข้าตะกร้าพร้อมส่วนลด

📦 การจัดการสินค้า (Product Management)

ครอบคลุม 15+ หน้าจอ:

  • การจัดการสินค้า (Product)
  • ระบบบาร์โค้ด (Barcode)
  • หน่วยนับและการแปลงหน่วย
  • BOM - Bill of Materials
  • ประวัติราคา
  • พิมพ์ป้ายสินค้า
  • จัดการมิติสินค้า

การจัดหมวดหมู่:

  • ยี่ห้อ (Brand)
  • หมวดหมู่ (Category)
  • กลุ่มสินค้า (Group + Sub-groups)
  • คลาส, เกรด, รุ่น, ลาย, ดีไซน์

💰 ระบบธุรกรรม (Transaction)

รองรับ 14 ประเภทธุรกรรม:

การซื้อ:

  • ซื้อสินค้า (Purchase)
  • ใบสั่งซื้อ (Purchase Order)
  • คืนซื้อ (Purchase Return)
  • ทยอยรับ (Purchase Partial)

การขาย:

  • ขายสินค้า (Sale)
  • ใบสั่งขาย (Sale Order)
  • ใบเสนอราคา (Quotation)
  • คืนขาย (Sale Return)

คลังสินค้า:

  • โอนย้าย (Transfer)
  • รับสินค้า (Receive)
  • เบิกสินค้า (Pickup)
  • คืนสินค้า (Return)
  • ปรับปรุง (Adjustment)

การเงิน:

  • รับเงิน (Paid)
  • จ่ายเงิน (Pay)

📊 ระบบรายงาน (Reporting)

BC BI Reports (Real-time BI):

  • รายงานการขาย
  • ขายรายวัน
  • คืนสินค้า
  • เคลื่อนไหวสินค้า
  • ยอดคงเหลือ
  • ชำระเงินรายวัน

Stock Reports:

  • ยอดคงเหลือแบบละเอียด (3 ระดับ)
  • เคลื่อนไหวพร้อมต้นทุน
  • แยกตาม Warehouse/Location

การส่งออก:

  • 📄 PDF
  • 📊 Excel
  • 📝 CSV

⚙️ การตั้งค่าระบบ (Configuration)

48 เมนูการตั้งค่า:

ข้อมูลบริษัท:

  • บริษัท, สาขา, แผนก
  • ประเภทธุรกิจ
  • วันทำงาน, วันหยุด

ผู้ใช้:

  • พนักงาน, ผู้ใช้ระบบ
  • การกำหนดสิทธิ์
  • Role & Permission

ลูกค้า/ผู้จำหน่าย:

  • เจ้าหนี้ (Creditor)
  • ลูกหนี้ (Debtor)
  • กลุ่มต่างๆ
  • เครดิตเทอม

POS:

  • ตั้งค่า POS
  • รูปแบบเอกสาร
  • Point & Coupon
  • ออกแบบบิล

คลัง:

  • คลังสินค้า (Warehouse)
  • สถานที่จัดเก็บ (Location)

การเงิน:

  • ธนาคาร
  • บัญชีธนาคาร
  • QR Payment

1.3 เทคโนโลยีที่ใช้

Frontend Technology

┌──────────────────────────┐
│  Flutter Framework 3.x   │
│  - Cross-platform        │
│  - Native Performance    │
│  - Beautiful UI          │
└──────────────────────────┘
         │
    ┌────┴────┐
    │         │
┌───▼──┐  ┌──▼───┐
│ Dart │  │ BLoC │
│ 3.x  │  │Pattern│
└──────┘  └──────┘

ชั้น Presentation:

  • Flutter - UI Framework
  • Dart - Programming Language
  • BLoC Pattern - State Management (87 BLoCs)

ความสามารถ:

  • 📱 Mobile (Android/iOS)
  • 💻 Desktop (Windows/macOS/Linux)
  • 🌐 Web (All modern browsers)

Backend & Database

ClickHouse - Analytics Database:

📊 ClickHouse
├── Product Search (Real-time)
├── Report Generation
├── Big Data Analytics
└── Stock Movement Tracking

คุณสมบัติ:

  • ⚡ Query เร็วมาก (Columnar Database)
  • 📈 รองรับ Big Data
  • 🔄 Real-time Analytics
  • 💾 Compression สูง

MongoDB Atlas - Document Database:

🍃 MongoDB
├── Cart Management
├── User Sessions
├── Real-time Sync
└── Cloud Storage

คุณสมบัติ:

  • 🔄 Real-time Sync
  • ☁️ Cloud-based
  • 📱 Mobile SDK
  • 🔒 Security

ObjectBox - Local Database:

📦 ObjectBox
├── Local Cache
├── Offline Mode
├── Fast Access
└── Encrypted Storage

คุณสมบัติ:

  • ⚡ Super Fast
  • 💾 Small Footprint
  • 🔐 Encrypted
  • 📴 Offline Support

Authentication & Security

Firebase Authentication:

  • Google OAuth 2.0
  • Email/Password
  • Phone (OTP)
  • Multi-factor Authentication

Security Features:

  • 🔐 SSL/TLS Encryption
  • 🔑 JWT Tokens
  • 👤 Role-based Access Control
  • 📝 Audit Logging

APIs & Integration

REST APIs:

  • Product Service
  • Transaction Service
  • Report Service
  • User Service

WebSocket:

  • Real-time Cart Updates
  • Live Notifications
  • Data Synchronization

Third-party:

  • Google Sign-In
  • Firebase
  • Payment Gateways
  • SMS/Email Services

1.4 สถาปัตยกรรมระบบ

Architecture Overview

┌─────────────────────────────────────────────────┐
│           Client Applications                    │
│  (Mobile / Desktop / Web Browser)               │
└────────────┬────────────────────────────────────┘
             │
             │ HTTPS / WebSocket
             │
┌────────────▼────────────────────────────────────┐
│           Flutter Application                    │
├─────────────────────────────────────────────────┤
│                                                  │
│  ┌────────────────────────────────────────┐    │
│  │  Presentation Layer (UI)               │    │
│  │  - Screens, Widgets, Dialogs           │    │
│  └─────────┬──────────────────────────────┘    │
│            │                                     │
│  ┌─────────▼──────────────────────────────┐    │
│  │  BLoC / Cubit (State Management)       │    │
│  │  - 87 BLoCs                            │    │
│  │  - Event → State                       │    │
│  └─────────┬──────────────────────────────┘    │
│            │                                     │
│  ┌─────────▼──────────────────────────────┐    │
│  │  Repository Layer                      │    │
│  │  - 74+ Repositories                    │    │
│  │  - Data Access Logic                   │    │
│  └─────────┬──────────────────────────────┘    │
│            │                                     │
│  ┌─────────▼──────────────────────────────┐    │
│  │  Service Layer                         │    │
│  │  - ClickHouse Service                  │    │
│  │  - MongoDB Service                     │    │
│  │  - ObjectBox Service                   │    │
│  │  - Firebase Service                    │    │
│  └──────────────────────┬──────────────────┘    │
│                         │                        │
└─────────────────────────┼────────────────────────┘
                          │
            ┌─────────────┴──────────────┐
            │                            │
┌───────────▼──────┐         ┌──────────▼─────────┐
│  ClickHouse DB   │         │  MongoDB Atlas     │
│  - Products      │         │  - Carts           │
│  - Transactions  │         │  - Sessions        │
│  - Reports       │         │  - Real-time Data  │
└──────────────────┘         └────────────────────┘
            │
┌───────────▼──────┐
│  ObjectBox       │
│  - Local Cache   │
│  - Offline Data  │
└──────────────────┘

Data Flow

การค้นหาสินค้า (Product Search):

1. User Input
   ↓
2. ProductSearchCubit
   ↓
3. ClickHouseProductService
   ↓
4. ClickHouse Database
   ↓
5. Results (Real-time)
   ↓
6. Display to User

การเพิ่มเข้าตะกร้า (Add to Cart):

1. User Action
   ↓
2. CartCubit
   ↓
3. MongoDBCartService
   ↓
4. MongoDB Atlas API
   ↓
5. Saved to Cloud
   ↓
6. Real-time Sync

1.5 รองรับแพลตฟอร์ม

📱 Mobile

Android:

  • ✅ Android 6.0+ (API 23+)
  • ✅ ARMv7, ARM64, x86
  • ✅ Google Play Store

iOS:

  • ✅ iOS 12.0+
  • ✅ iPhone, iPad
  • ✅ App Store

💻 Desktop

Windows:

  • ✅ Windows 10, 11
  • ✅ 64-bit
  • ✅ Installer / Portable

macOS:

  • ✅ macOS 10.14+
  • ✅ Intel & Apple Silicon (M1/M2)
  • ✅ .dmg / .app

Linux:

  • ✅ Ubuntu 20.04+
  • ✅ Debian-based
  • ✅ AppImage / .deb

🌐 Web

Browsers:

  • ✅ Chrome 90+
  • ✅ Edge 90+
  • ✅ Firefox 88+
  • ✅ Safari 14+

Features:

  • ✅ Responsive Design
  • ✅ PWA Support
  • ✅ Offline Mode
  • ✅ Auto Update

1.6 ความต้องการระบบ

Minimum Requirements

Hardware:

  • 💻 CPU: Dual-core 2.0 GHz
  • 💾 RAM: 4 GB
  • 💽 Storage: 2 GB free space
  • 📶 Internet: 2 Mbps

Software:

  • OS: Windows 10 / macOS 10.14 / Android 6 / iOS 12
  • Browser: Chrome 90+ / Edge 90+ (สำหรับ Web)

Recommended Requirements

Hardware:

  • 💻 CPU: Quad-core 2.5 GHz+
  • 💾 RAM: 8 GB+
  • 💽 Storage: 5 GB+ SSD
  • 📶 Internet: 10 Mbps+

Software:

  • OS: Windows 11 / macOS 13+ / Android 12+ / iOS 15+
  • Browser: Chrome Latest / Edge Latest

1.7 สิ่งที่ต้องเตรียม

ก่อนเริ่มใช้งาน

1. บัญชี Google Account

  • สำหรับ Google Sign-In
  • หรือใช้ Email/Password

2. ข้อมูลบริษัท

  • ชื่อบริษัท
  • ที่อยู่
  • เลขประจำตัวผู้เสียภาษี
  • โลโก้

3. ข้อมูลผู้ติดต่อ

  • อีเมล
  • เบอร์โทรศัพท์

4. อุปกรณ์เสริม (ถ้ามี)

  • Barcode Scanner
  • Receipt Printer
  • Cash Drawer
  • Customer Display

1.8 ประโยชน์ที่ได้รับ

📈 เพิ่มประสิทธิภาพ

  • ⚡ ลดเวลาการทำงาน 50%
  • 📊 ข้อมูลแม่นยำ 99.9%
  • 🔄 Real-time อัพเดท
  • 📱 เข้าถึงได้ทุกที่

💰 ลดต้นทุน

  • 📉 ลดข้อผิดพลาด
  • 💵 ลดการสูญหาย
  • 📦 จัดการสต็อกดีขึ้น
  • 🎯 วางแผนได้แม่นยำ

🎯 เพิ่มความพึงพอใจ

  • 👥 ลูกค้าพึงพอใจ
  • ⚡ บริการเร็วขึ้น
  • 📊 รายงานครบถ้วน
  • 🔐 ข้อมูลปลอดภัย

1.9 Roadmap

ฟีเจอร์ที่กำลังพัฒนา

Q4 2025:

  • 🤖 AI Recommendation
  • 📱 Mobile App v2
  • 🎨 UI/UX Refresh
  • 🌍 Multi-language

Q1 2026:

  • 📊 Advanced Analytics
  • 🔗 API Marketplace
  • 🎓 Training System
  • 📹 Video Tutorials

1.10 Support & Community

การสนับสนุน

Documentation:

  • 📚 User Guide (คู่มือนี้)
  • 🔧 API Documentation
  • 🎥 Video Tutorials
  • 📝 Blog & Articles

Help Center:

  • 💬 Live Chat
  • 📧 Email Support
  • 📞 Phone Support
  • 🎫 Ticket System

Community:

  • 👥 User Forum
  • 💬 Facebook Group
  • 📱 LINE Official
  • 🐦 Twitter

➡️ ถัดไป: การเข้าสู่ระบบ

← กลับไปสารบัญหลัก