0.1.20 • Published 5 months ago
@caominhhung1991/catering v0.1.20
@caominhhung1991/catering
Thư viện React TypeScript cho hệ thống quản lý catering, cung cấp các components và utilities để xây dựng ứng dụng quản lý nhà hàng/catering.
📖 Giới thiệu
Đây là một thư viện React TypeScript được xây dựng với TSDX, cung cấp:
- Components UI tái sử dụng cho hệ thống catering
- Utilities và hooks hỗ trợ phát triển
- Services tích hợp Firebase
- State management với Redux Toolkit
- Hỗ trợ quản lý menu, kho, tài khoản, báo cáo
🚀 Cài đặt
npm install @caominhhung1991/catering
# hoặc
yarn add @caominhhung1991/catering💻 Yêu cầu hệ thống
- Node.js >= 10
- React >= 16.9.0
- React DOM >= 16.9.0
📁 Cấu trúc dự án
src/
├── account-section/ # Quản lý tài khoản người dùng
├── admin-section/ # Phần quản trị hệ thống
├── app-setting-section/ # Cài đặt ứng dụng
├── catering-utils/ # Utilities riêng cho catering
├── components/ # UI Components tái sử dụng
├── datetime-section/ # Components xử lý ngày tháng
├── doanh-thu-section/ # Quản lý doanh thu
├── estimated-material/ # Dự trù nguyên liệu
├── feature-permission/ # Phân quyền tính năng
├── hooks/ # Custom React hooks
├── image-section/ # Quản lý hình ảnh
├── inventory-section/ # Quản lý kho
├── layouts/ # Layout components
├── nhan-su-section/ # Quản lý nhân sự
├── planed-menu/ # Lập kế hoạch thực đơn
├── provider/ # Context providers
├── report-section/ # Báo cáo
├── services/ # API services
├── sheet-section/ # Xử lý Excel
├── so-ba-buoc-section/ # Quy trình 3 bước
├── styles/ # Styles và themes
├── table-section/ # Table components
├── tag-view-section/ # Tag view components
├── types/ # TypeScript type definitions
├── upload-excel/ # Upload Excel files
└── utils/ # Utility functions🛠️ Phát triển
# Khởi chạy development mode
npm start
# Build thư viện
npm run build
# Chạy tests
npm test
# Lint code
npm run lint
# Publish package
npm run hung📦 Build Output
dist/catering.cjs.development.js- CommonJS development builddist/catering.cjs.production.min.js- CommonJS production build (minified)dist/catering.esm.js- ES Module build- Type definitions trong các file
.d.ts
🧪 Testing
Dự án sử dụng Jest với TSDX để testing:
npm test📝 Scripts
start- Watch mode developmentbuild- Build productiontest- Run testslint- Lint codeprepare- Pre-publish buildhung- Version bump và publish
🏗️ Tech Stack
- Framework: React + TypeScript
- Build Tool: TSDX
- State Management: Redux Toolkit
- UI Library: Ant Design
- Database: Firebase
- Styling: Emotion
- Utils: Lodash, Moment, Math.js
📄 License
MIT
👤 Tác giả
Cao Minh Hưng (@caominhhung1991)