MediFlow is a full-stack web application for managing hospital operations — doctors, patients, and appointments — built with Flask and MySQL. It features a modern dark/light-mode UI, email-verified authentication, and a responsive collapsible sidebar.
- Authentication — Signup with email verification, login, forgot/reset password via secure tokenized email links
- Doctors — Add, edit, delete doctors with specialization, availability days, and fee
- Patients — Full patient records with contact details and history
- Appointments — Book, manage, and track appointments with status (Scheduled / Completed / Cancelled)
- Dashboard — Stats overview with charts, recent appointments timeline, and quick-access cards
- Settings — Update profile, change password, email change with confirmation link
- Theme — Dark / Light mode toggle, persisted per browser
- Responsive UI — Collapsible sidebar with SVG icons, glass morphism design
- Email notifications — Welcome email on signup, email verification, password reset, email change confirmation
| Layer | Technology |
|---|---|
| Backend | Python 3.10+, Flask 3.0 |
| Database | MySQL 8.0+ |
| ORM/Driver | Flask-MySQLdb |
| Auth | bcrypt (password hashing), itsdangerous (signed tokens) |
| smtplib + MIME (SMTP via Gmail) | |
| Frontend | Vanilla JS, CSS3 (custom design system, no framework) |
| Templating | Jinja2 |
mediflow/
├── app.py # Main Flask application & all routes
├── config.py # Config loaded from .env
├── requirements.txt # Python dependencies
├── schema.sql # Database schema (CREATE TABLE statements)
├── seed.sql # Optional seed data
├── .env.example # Environment variable template
├── static/
│ ├── css/style.css # Full custom design system
│ └── js/script.js # Theme toggle, sidebar, modals, toasts
└── templates/
├── base.html # Base layout (sidebar, topbar, loader)
├── dashboard.html
├── doctors.html / add_doctor.html / edit_doctor.html
├── patients.html / add_patient.html / edit_patient.html
├── appointments.html / book_appointment.html
├── settings.html
├── login.html / signup.html
├── forgot_password.html / reset_password.html
└── verify_email_pending.html
- Python 3.10+
- MySQL 8.0+
git clone https://github.com/Misrilal-Sah/MediFlow.git
cd MediFlowpython -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activatepip install -r requirements.txtcp .env.example .envEdit .env with your actual values:
SECRET_KEY=your_random_secret_key
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_mysql_password
MYSQL_DB=hospital_management
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_EMAIL=your_email@gmail.com
SMTP_PASSWORD=your_app_password
SMTP_DISPLAY_NAME=MediFlowmysql -u root -pCREATE DATABASE hospital_management;
USE hospital_management;
SOURCE schema.sql;
-- Optional: SOURCE seed.sql;python app.pyVisit http://127.0.0.1:5000 in your browser.
| Variable | Description | Default |
|---|---|---|
SECRET_KEY |
Flask session secret | (required) |
MYSQL_HOST |
MySQL host | 127.0.0.1 |
MYSQL_PORT |
MySQL port | 3306 |
MYSQL_USER |
MySQL username | root |
MYSQL_PASSWORD |
MySQL password | (required) |
MYSQL_DB |
Database name | hospital_management |
SMTP_HOST |
SMTP server host | smtp.gmail.com |
SMTP_PORT |
SMTP port | 587 |
SMTP_EMAIL |
Sender email address | (required for email features) |
SMTP_PASSWORD |
SMTP App Password | (required for email features) |
SMTP_DISPLAY_NAME |
Display name in emails | MediFlow |
The dashboard features live stats, a doughnut chart for appointment status distribution, and a timeline of upcoming appointments.
UI screenshots coming soon. Run the app locally to preview.
- Role-based access control (Admin / Doctor / Receptionist)
- Patient medical history & prescription records
- Appointment reminders via email
- Invoice & billing module
- REST API for mobile integration
- Docker support for easy deployment
- Added mobile responsive layout with off-canvas sidebar
- Tablet (768–1024px): icon-only collapsed sidebar
- Mobile (≤767px): hamburger header, full-width content
- Fixed iOS input auto-zoom on all form pages
- Initial release: doctors, patients, appointments, dashboard
- Email verification flow with tokenized links
- Dark / Light mode toggle
Contributions are welcome! Please open an issue first to discuss the change you'd like to make, then submit a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'feat: add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
MIT © Misrilal Sah
