- 🚀Authentication and Authorization:
- 🚀Health Record Management:
- 🚀Appointment Scheduling:
- 🚀Online Consultation:
- 🚀Service Payment:
- 🚀Rating and Feedback:
- 🚀Statistics and Reports:
- 🚀Reminders and Notifications:
- 🚀Real-time Chat Integration:
npm start
cd function -> npm run serve
npm install -g firebase-tools
npm install express cors //(setting express.js)
firebase init functions
firebase login :
-Select use .... then select the project created on firebase
"chats": {
"$chatId": { // ID duy nhất cho mỗi cuộc trò chuyện (ví dụ: kết hợp ID bệnh nhân và bác sĩ)
"participants": {
"$userId1": true, // ID của bệnh nhân
"$userId2": true // ID của bác sĩ
},
"messages": {
"$messageId": {
"senderId": "$userId",
"text": "Nội dung tin nhắn",
"imageUrl": "URL hình ảnh (nếu có)",
"timestamp": 1678886400000 // Unix timestamp
}
}
}
},
"users": {
"$userId": {
"name": "Tên người dùng",
"role": "patient" | "doctor"
// Các thông tin khác của người dùng
}
}
(real time chat database structure)

-Download json :
var admin = require("firebase-admin");
var serviceAccount = require("path/to/serviceAccountKey.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
});
This part is FCM - Push notifications
npx create-react-app push_notifications (hoặc có dự án rồi khỏi add này)
npm install firebase
-> Vào healthapp
Docs firebase messaging :
- Take key pair
- If you turn off allow then it is defined
- Get this token after configuring the token
- Turn on notifications for web allow
- Create on public in fe
- firebase-messaging-sw settings : import { initializeApp } from "firebase/app";
import { getMessaging } from "firebase/messaging/sw";
const firebaseApp = initializeApp({
apiKey: 'api-key',
authDomain: 'project-id.firebaseapp.com',
databaseURL: 'https://project-id.firebaseio.com',
projectId: 'project-id',
storageBucket: 'project-id.appspot.com',
messagingSenderId: 'sender-id',
appId: 'app-id',
measurementId: 'G-measurement-id',
});
// Retrieve an instance of Firebase Messaging so that it can handle background
// messages.
const messaging = getMessaging(firebaseApp);
Key
apiKey: "AIzaSyDPLqQJ5zYHHcB0gKRPI_BCuhDQ7pSn6bo",
authDomain: "healthapp-a5a6d.firebaseapp.com",
projectId: "healthapp-a5a6d",
storageBucket: "healthapp-a5a6d.firebasestorage.app",
messagingSenderId: "103302228290",
appId: "1:103302228290:web:2da602462140612a6c00db",
measurementId: "G-DJTKFWQHYV"
thêm dòng này vào firebase-messagin-sw
messaging.onBackgroundMessage((payload) => {
console.log(
'[firebase-messaging-sw.js] Received background message ',
payload
);
// Customize notification here
const notificationTitle = 'Background Message Title';
const notificationOptions = {
body: 'Background Message body.',
icon: '/firebase-logo.png'
};
self.registration.showNotification(notificationTitle, notificationOptions);
});
Create
Select SendTestMessgae try add token
Css notifications :
npm install react-hot-toast
Here are demo account:
Admin : tta1301 - 123456
Doctor: doc_tuyet - 123456
Patient: daobach - 123456
Stats Admin :
Approve application:
Create account doctor:
Stats doctor :
Home :
Register:
Finddoctor:
-- DOCKER
docker build -t springmvc-health-tomcat11 .
docker run -d -p 8080:8080 --name health_schedule_app springmvc-health-tomcat11
reactbits cài ts npm install --save-dev typescript
One-Time Installation JS + CSS
npx jsrepo add https://reactbits.dev/default/TextAnimations/RotatingText JS + Tailwind
npx jsrepo add https://reactbits.dev/tailwind/TextAnimations/RotatingText TS + CSS
npx jsrepo add https://reactbits.dev/ts/default/TextAnimations/RotatingText TS + Tailwind
npx jsrepo add https://reactbits.dev/ts/tailwind/TextAnimations/RotatingText
NOTE:














