Dự án full-stack với React TypeScript frontend và .NET Web API backend.
├── frontend/ # React TypeScript app (Vite)
├── backend/ # .NET Web API
└── README.md # Hướng dẫn này
- Node.js (v18 hoặc cao hơn)
- .NET 8.0 SDK
- npm hoặc yarn
# Di chuyển vào thư mục backend
cd backend
# Chạy API
dotnet runAPI sẽ chạy tại: http://localhost:5000
Mở terminal mới:
# Di chuyển vào thư mục frontend
cd frontend
# Cài đặt dependencies (nếu chưa cài)
npm install
# Chạy development server
npm run devFrontend sẽ chạy tại: http://localhost:5173
- ✅ React TypeScript với Vite
- ✅ .NET Web API với CORS được cấu hình
- ✅ Proxy API calls từ frontend đến backend
- ✅ JWT Authentication system
- ✅ Login/Logout functionality
- ✅ Protected routes và API endpoints
- ✅ Weather Forecast API endpoint mẫu
- ✅ TypeScript interfaces cho type safety
- ✅ Tra cứu thông tin BHYT qua API VNPost
- ✅ Ant Design UI components
- ✅ Responsive design
Dự án có sẵn 2 tài khoản demo:
Admin:
- Username:
admin - Password:
password
User:
- Username:
user - Password:
123456
POST /api/auth/login- Đăng nhậpGET /api/auth/me- Lấy thông tin user hiện tạiGET /weatherforecast- Lấy dự báo thời tiết mẫu (yêu cầu authentication)POST /api/bhyt/lookup- Tra cứu thông tin BHYT (yêu cầu authentication)
- Proxy
/api/*requests đếnhttp://localhost:5000 - TypeScript strict mode enabled
- CORS enabled cho
http://localhost:5173 - Development environment configuration
- OpenAPI/Swagger documentation
- Khởi động backend trước:
cd backend && dotnet run - Khởi động frontend:
cd frontend && npm run dev - Mở browser tại
http://localhost:5173
cd frontend
npm run buildcd backend
dotnet publish -c ReleaseTính năng tra cứu thông tin bảo hiểm y tế (BHYT) thông qua API của VNPost, cho phép người dùng tra cứu thông tin thẻ BHYT bằng mã số BHXH.
- Đăng nhập vào hệ thống
- Click menu "Tra cứu BHYT" ở sidebar
- Nhập mã số BHXH (10 chữ số)
- Click "Tra cứu" để xem kết quả
- Họ và tên, mã số BHXH, mã thẻ BHYT
- Ngày sinh, giới tính, địa chỉ
- Thời hạn hiệu lực thẻ (từ ngày - đến ngày)
- Nơi đăng ký KCB ban đầu
- Mức hưởng và trạng thái thẻ
- VNPost API:
https://ssm.vnpost.vn/connect/tracuu/thongtinthe - Backend Endpoint:
POST /api/bhyt/lookup - Authentication: JWT Bearer token required
Xem hướng dẫn chi tiết trong file BHYT_LOOKUP_GUIDE.md
- Đảm bảo backend đang chạy trước khi start frontend
- Kiểm tra ports 5000 và 5173 không bị conflict
- Xem console logs để debug API calls
- Sử dụng file
backend/test-bhyt.httpđể test API BHYT