SmartClinic is a comprehensive Customer Relationship Management (CRM) system designed for medical clinics. It streamlines patient management, appointment scheduling, and administrative workflows using a modern, high-performance web architecture.
- Framework: React 19 (via Vite 7)
- Compiler: React Compiler
- Styling: Tailwind CSS
- Icons: Lucide React
- State Management: Zustand
- Caching: TanStack React Query v5
- Real-time: Socket.io-client
- Runtime: Node.js
- Framework: Express.js 5
- Database: PostgreSQL (via Supabase)
- Authentication: Supabase Auth (JWT)
- AI Engine: Google Gemini 2.5 Flash (via TanStack AI)
- Real-time: Socket.io
- Audit logger: Pino
- Dashboard: Real-time overview of clinic metrics and schedules.
- AI Operations Assistant: A personal assistant for doctors that can fetch, summarize, and update clinic data via streaming SSE.
- Real-time Synchronization: Automatic cache invalidation across all clients using Socket.io (Secured with JWT handshake verification).
- Patient Management: Comprehensive CRUD operations for patient records.
- Patient Overview: Dedicated portal for patients to view their medical history.
- Treatment Templates: Clinical treatment templates with dynamic field structures.
- Appointment Engine: Advanced scheduling system connected to custom treatments.
- Calendar Integration: Interactive weekly/monthly views using FullCalendar.
- Documents Management: Upload 'PDF' documents securely into a private bucket (sending via email is possible to add).
- Image Management: Upload images into patients' appointments securely saved inside a private bucket.
- Audit Logger: Every action made by a user will be recorded with no option of deletion. Sensitive data is filtered (HIPAA regulations).
- Secure Authentication: Role-based access control (RBAC) and JWT security.
- Security & Performance: Rate limiting and DDoS protection via Express-rate-limit.
- Custom Treatment Builder: Dynamic UI for doctors to create custom treatment structures stored as JSON.
- AI Tools: The current AI Toolkit is (Appointments, Treatments) fetching. More tools will be added.
- Admin dashboard: Currently, most of the work is done on the overall CRM experience with a few features for the admin Role.
- Automatic Reminders: Patients will be able to receive automatic reminders before their appointment.
- Private AI model: Current AI model is the Gemini free tier API key. In a real-world CRM, we would want to use ollama with our own AI model.
Ensure you have the following installed:
git clone https://github.com/yourusername/smart-clinic.git
cd smart-clinic# Install Server Dependencies
cd Server
npm install
# Install Web Dependencies
cd ../Web
npm installServer Configuration (Server/.env)
PORT=3001
DATABASE_URL={your_postgresql_url}
FRONTEND_URL=http://localhost:5173
# Supabase Configuration
SUPABASE_URL={your_supabase_project_url}
SUPABASE_ANON_KEY={your_supabase_anon_key}
SUPABASE_SECRET_KEY={your_supabase_service_role_key}
# Gemini API key
GEMINI_API_KEY={your_gemini_api_key}Web Configuration (Web/.env)
VITE_API_URL=http://localhost:3001Terminal 1: Server
cd Server
npm run devTerminal 2: Web
cd Web
npm run devAccess the app at http://localhost:5173.
AI chat assistant, fetching appointments of an exact date, plus filtering away appointments that are not related to the asking doctor.

Creating a new appointment using a friendly Full calendar view, fully responsive for mobile view as well.

Custom-made treatments, Images secured in a private bucket, as well as document upload in a secure private bucket.

Example of Audit logs, searching for a specific patient, updating his data

📄 License All rights reserved to the developers of Smart Clinic AI