เว็บแอปพลิเคชันวิเคราะห์และตรวจจับภาพอาหารด้วยโมเดล AI (TensorFlow.js) พร้อมระบบคำนวณดัชนีมวลกาย (BMI), อัตราการเผาผลาญพลังงาน (BMR/TDEE) และวางแผนโภชนาการส่วนบุคคล
-
AI Food Classification (การจำแนกภาพอาหารด้วย AI)
- สแกนภาพอาหารแบบ Real-time ผ่านเว็บแคม (Webcam) หรืออัปโหลดรูปภาพจากอุปกรณ์
- ใช้โมเดล Machine Learning ในเบราว์เซอร์ผ่าน TensorFlow.js
- แสดงผลความน่าจะเป็น (Confidence Score) และข้อมูลแคลอรี่/คุณค่าทางโภชนาการของอาหารแต่ละประเภท
-
BMI & BMR Calculator (คำนวณดัชนีมวลกายและการเผาผลาญพื้นฐาน)
- คำนวณค่า BMI เพื่อประเมินเกณฑ์รูปร่าง (ผอม, สมส่วน, น้ำหนักเกิน, โรคอ้วน)
- คำนวณค่า BMR (Basal Metabolic Rate) แสดงพลังงานขั้นต่ำที่ร่างกายต้องการในแต่ละวัน
- มีคำแนะนำด้านสุขภาพเฉพาะบุคคลตามระดับผลลัพธ์
-
Nutrition & Health Goals Planner (วางแผนแคลอรี่และสารอาหารตามเป้าหมาย)
- เลือกเป้าหมายสุขภาพ: ลดไขมัน (Lose Weight), เพิ่มกล้ามเนื้อ (Gain Muscle) หรือ คงรูปร่าง (Maintain)
- คำนวณค่า TDEE (Total Daily Energy Expenditure) ตามระดับกิจกรรมประจำวัน
- สรุปเป้าหมายพลังงานต่อวัน (Target Calories) พร้อมการกระจายสัดส่วนสารอาหารหลัก (Macronutrients: โปรตีน, คาร์โบไฮเดรต, ไขมัน)
- Framework: React 19 + TypeScript
- Bundler: Vite
- Styling: Tailwind CSS v4
- AI / Machine Learning:
@tensorflow/tfjs - Camera:
react-webcam - Routing:
react-router-dom - Alert / UI Notification:
sweetalert2
- Runtime: Node.js
- Framework: Express.js (รองรับการ Serve static build ของ Vite และจัดการ SPA client-side routing)
- Dev Tool: Nodemon
web-software/
├── client/ # โค้ดส่วน Frontend (React + TypeScript + Vite)
│ ├── public/ # Static assets และโฟลเดอร์โมเดล AI (/model)
│ ├── src/
│ │ ├── components/ # คอมโพเนนต์ UI ส่วนกลาง (Navbar, Footer ฯลฯ)
│ │ ├── data/ # ฐานข้อมูลเมนูอาหารและแคลอรี่ (foodInfo.ts)
│ │ ├── pages/ # หน้าเว็บหลัก (Home, BMI, GoalsPage)
│ │ ├── routes/ # การจัดการ Routing (Router.tsx)
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ └── index.css
│ ├── package.json
│ └── vite.config.ts
├── server/ # โค้ดส่วน Backend Server (Express.js)
│ ├── index.js # Entry point สำหรับรัน Express server
│ └── package.json
└── README.md
- Node.js (เวอร์ชัน 18.x หรือใหม่กว่า)
- npm หรือ yarn
cd client
npm installcd ../server
npm installcd client
npm run devเข้าใช้งานได้ที่:
http://localhost:5173
cd server
npm run devBackend API / Server จะรันอยู่ที่:
http://localhost:8080
- สร้าง Production Build ของ Frontend:
cd client npm run build - สตาร์ท Express Server เพื่อ Serve Frontend ที่ Build เสร็จแล้ว:
cd ../server node index.js - เปิดเบราว์เซอร์ไปที่:
http://localhost:8080
This project is licensed under the MIT License.