You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HealthFlow is a full-stack healthcare management platform that connects patients, doctors, secretaries, and administrators through a unified web application. It supports appointment booking (physical & online), real-time messaging, medical records, schedule management, and in-app notifications — all powered by a .NET 8 REST API with SignalR real-time capabilities and a Next.js 16 React frontend.
Browse doctors by specialization/clinic, book appointments (physical or online), view medical records, manage profile
Doctor Portal
Manage weekly schedule & availability, view appointments, write medical records, real-time chat with secretaries
Secretary Portal
Manage appointments on behalf of doctors, view patient info, real-time chat with assigned doctors
Admin Panel
Full CRUD for users, doctors, secretaries, clinics, specializations; dashboard statistics
Real-Time Chat
Doctor ↔ Secretary messaging via SignalR rooms, unread badges, typing indicators
Notifications
In-app notification bell with live badge count, real-time push via SignalR, notification history
Appointments
Create, approve, decline, cancel, complete workflow; real-time status updates
Medical Records
Create/view records per patient with file attachments
File Uploads
Profile pictures, medical record attachments, secure file storage
AI Medical Assistant
RAG-based AI assistant for medical files. Upload medical documents/PDFs and query an LLM that retrieves context directly from the uploaded files to provide accurate, grounded answers.
Tech Stack
Backend
Technology
Purpose
.NET 8 / ASP.NET Core
REST API framework for core business logic
FastAPI (Python)
AI Assistant Backend (RAG processing & Vector DB)
Entity Framework Core 8
ORM / database access
PostgreSQL (Neon)
Cloud relational database
SignalR
Real-time WebSocket communication
JWT Bearer
Authentication & authorization
BCrypt
Password hashing
Vector DB / Embeddings
Document chunking, indexing, and semantic search for AI
API Communication: REST endpoints (/api/*) for CRUD operations handled by .NET.
AI Medical Assistant (RAG): A dedicated FastAPI microservice that parses uploaded medical files (PDFs, docs), chunks them, and stores embeddings in a Vector Database. The assistant interfaces with an LLM to answer domain-specific medical questions by retrieving the exact facts from the uploaded documents.
cd Back/HealthFlow_backend
# Restore dependencies
dotnet restore
# Apply database migrations
dotnet ef database update --project HealthFlow_backend
# (Optional) Seed the database with sample data
dotnet run --project HealthFlow_backend -- seed
# Start the API server
dotnet run --project HealthFlow_backend
The API will be available at http://localhost:5155.
Swagger UI is at http://localhost:5155/swagger.
Frontend Setup
cd frontend
# Install dependencies
npm install
# Create environment file
cp .env.example .env.local
# Start the dev server
npm run dev
The frontend will be available at http://localhost:3000.
Environment Variables
Backend — appsettings.json
Key
Description
ConnectionStrings:DefaultConnection
PostgreSQL connection string
Jwt:SecretKey
Secret key for signing JWT tokens (min 32 chars)
Jwt:Issuer
Token issuer (HealthFlow)
Jwt:Audience
Token audience (HealthFlowClient)
Jwt:ExpirationMinutes
Access token lifetime (default: 60)
Cors:AllowedOrigins
Array of allowed frontend origins
FileStorage:UploadPath
Directory for uploaded files (Uploads)
Frontend — .env.local
Key
Description
NEXT_PUBLIC_API_URL
Backend REST API base URL (e.g., http://localhost:5155/api)
NEXT_PUBLIC_WS_URL
Backend SignalR hub base URL (e.g., http://localhost:5155/hubs)
Database
HealthFlow uses PostgreSQL with EF Core Code-First migrations. The schema includes:
Entity
Description
User
All users (patients, doctors, secretaries, admins) with role-based fields
Doctor
Doctor profile (linked to User), specialization, clinic, bio, etc.
SecretaryProfile
Secretary profile linked to one or more doctors via SecretaryDoctor
Appointment
Patient ↔ Doctor appointment with status workflow
DoctorAvailability
Weekly time-slot schedule for doctors
Clinic
Clinic details with working hours and geolocation
Specialization
Medical specializations (Cardiology, Neurology, etc.)
Browse doctors, book appointments, view medical records, manage profile
Doctor
Manage schedule, view/manage appointments, create medical records, chat with secretaries
Secretary
Manage appointments for assigned doctors, view patients, chat with assigned doctors
Admin
Full system management — users, doctors, secretaries, clinics, specializations
Real-Time Features
HealthFlow uses SignalR for three real-time channels:
Hub
Endpoint
Purpose
NotificationHub
/hubs/notifications
Push notifications to users instantly
AppointmentHub
/hubs/appointments
Live appointment status updates
ChatHub
/hubs/chat
Doctor ↔ Secretary real-time messaging with room-based architecture
Chat Architecture
Sending: REST API POST /api/chat/send → saves to DB → pushes ReceiveMessage to receiver via SignalR
Rooms: JoinConversation / LeaveConversation for typing indicators and read receipts
Notifications: Push notification sent to receiver + in-app notification badge
License
This project is for educational and portfolio purposes.
About
HealthFlow is a full-stack healthcare management system with dedicated portals for patients, doctors, secretaries, and administrators. Built with Next.js and .NET, it features appointment scheduling, real-time messaging, and an AI assistant.