ระบบจัดการเครนอัจฉริยะสำหรับงานคอนกรีตสำเร็จรูป - โซลูชันครบวงจรที่ช่วยให้วิศวกร ผู้จัดการ และผู้ดูแลระบบสามารถประสานงานการใช้เครน ติดตามความคืบหน้าของงาน และจัดการการจองได้อย่างมีประสิทธิภาพสูงสุด
ด้วยเทคโนโลยีที่ทันสมัยและอินเทอร์เฟซที่ใช้งานง่าย ระบบนี้จะช่วย ลดเวลาการรอคอย 🚀 เพิ่มประสิทธิภาพการทำงาน ⚡ และ ลดข้อผิดพลาด ✅ ได้อย่างมีนัยสำคัญ
- 🗂️ จัดการคิวเครนแบบเรียลไทม์: ติดตามและจัดการคิวงานเครน พร้อมอัปเดตสถานะทันที
- 📅 ระบบจองอัจฉริยะ: จองเครนล่วงหน้าแบบมีระบบอนุมัติที่ชาญฉลาด
- 📊 ติดตามความคืบหน้า: ตรวจสอบเวลาเริ่ม/หยุดงานและสถานะการทำงานแบบละเอียด
- 📈 วิเคราะห์ข้อมูล: ดูข้อมูลประวัติการทำงานและตัวชี้วัดประสิทธิภาพ
- 👥 จัดการสิทธิ์ผู้ใช้: ควบคุมการเข้าถึงตามบทบาทหน้าที่
- 👷♂️ วิศวกร: สร้างการจอง ดูสถานะเครน ดำเนินการพื้นฐาน
- 👨💼 ผู้จัดการ: อนุมัติ/ปฏิเสธการจอง จัดการปฏิบัติการเครน
- ⚙️ ผู้ดูแลระบบ: เข้าถึงระบบเต็มรูปแบบ จัดการผู้ใช้ กำหนดค่าระบบ
- Runtime: Node.js with TypeScript
- Framework: Express.js
- Database: SQLite (with better-sqlite3)
- Authentication: JWT tokens with bcrypt password hashing
- Validation: Zod schema validation
- Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Charts: Recharts for data visualization
- Language: Thai interface
- Node.js (v20.x or higher)
- npm or yarn
- Clone and setup:
# Install backend dependencies
cd precast-api
npm install
# Install frontend dependencies
cd ../precast-ui
npm install- Start the backend:
cd precast-api
npm run devThe API server will start on http://localhost:4000
- Start the frontend:
cd precast-ui
npm run devThe React app will start on http://localhost:5173 (or 5174 if 5173 is occupied)
- Username:
admin - Password:
admin123 - Role: Admin (full access)
- Login to the system using the default credentials
- View Dashboard to see crane status and overview
- Create Bookings for crane usage:
- Select desired crane (TC1, TC2)
- Fill in item details, requester info, purpose
- Set start and end times
- Submit for approval (if not admin/manager)
- Manage Crane Operations:
- Start/stop tasks using the queue management
- Track work progress in real-time
- Rollback tasks if needed
- Monitor & Report:
- View historical data
- Export data to CSV
- Analyze performance metrics
- หน้าหลัก (Home): Main dashboard with crane status
- ภาพรวม (Overview): Charts and analytics
- จองคิว (Booking): Create and manage bookings
- ประวัติ (History): Historical data and exports
- จัดการเครน (Crane Management): Add new cranes
- ตัวเลือก (Optional): Settings and user role management
POST /api/auth/login- User loginPOST /api/auth/register- User registrationGET /api/auth/profile- Get user profile
GET /api/cranes- Get all cranes with queuePOST /api/cranes- Create new cranePOST /api/cranes/:id/start/:ord- Start taskPOST /api/cranes/:id/stop/:ord- Stop taskPOST /api/cranes/:id/rollback/:ord- Rollback task
GET /api/bookings- Get all bookingsPOST /api/bookings- Create new bookingPATCH /api/bookings/:id/status- Update booking status
GET /api/history- Get work history
- cranes: Crane information
- queue: Current work queue for each crane
- bookings: Crane booking requests
- history: Completed work records
- users: User accounts and roles
/
├── precast-api/ # Backend API
│ ├── src/
│ │ ├── routes/ # API route handlers
│ │ ├── auth.ts # Authentication middleware
│ │ ├── db.ts # Database configuration
│ │ └── index.ts # Main server file
│ └── package.json
└── precast-ui/ # Frontend React app
├── src/
│ ├── components/ # React components
│ ├── api.ts # API client
│ └── App.tsx # Main app component
└── package.json
- precast-api/src/db.ts: Database initialization and connection
- precast-api/src/routes/auth.ts: Authentication logic
- precast-ui/src/App.tsx: Main React application
- precast-ui/src/api.ts: Frontend API client
-
"Failed to fetch cranes" error
- Ensure backend server is running on port 4000
- Check that database is properly initialized
-
Login issues
- Use default credentials: admin/admin123
- Check browser console for detailed errors
-
Booking creation fails
- Verify all required fields are filled
- Check network tab for API error details
- Backend logs: Terminal where
npm run devis running - Frontend logs: Browser developer console
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is for educational/demonstration purposes.
For issues or questions, please check:
- Application logs in browser console
- Server logs in terminal
- Network tab for API communication issues