MediConnect is a modern, premium‑looking web application that lets patients book appointments with doctors in a smooth, animated, and responsive UI. It features an interactive calendar, dynamic search dropdown, secure login flow, and flexible payment options.
- Interactive Calendar – Patients can pick any future date and view available time slots.
- Dynamic Search Dropdown – Real‑time doctor search with profile photos and names displayed side‑by‑side.
- Login‑Redirect Flow – If a patient tries to book while not logged in, they are redirected to the login page and returned to the calendar after authentication.
- Payment Options – Cash payments require no extra personal details; online payments reveal card fields only when selected.
- Doctor Dashboard – Doctors can edit their profile (including specialty), set working hours, block unavailable slots, and view upcoming appointments.
- Premium UI – Vibrant gradients, glass‑morphism, micro‑animations, dark‑mode support, and responsive design.
- SEO‑Ready – Proper title tags, meta descriptions, heading hierarchy, and semantic HTML.
- Frontend – HTML, vanilla CSS, JavaScript (no frameworks for the UI).
- Backend – Node.js, Express, PostgreSQL.
- File Storage – Supabase (for doctor profile photos).
- Authentication –
express-sessionwith secure cookies. - Animations – CSS keyframes and
IntersectionObserverfor scroll‑based reveals.
-
Clone the repository
git clone <repo‑url> cd hackathon
-
Install dependencies
npm install
-
Create a
.envfile based on the provided example:cp .env.example .env
Fill in the required values (database URL, session secret, Supabase credentials, etc.).
-
Run the database migrations (the schema is in
schema.sql):psql $DATABASE_URL -f schema.sql -
Start the development server
npm run dev
The app will be available at
http://localhost:3000(or the port defined in.env).
<<<<<<< HEAD
This project is configured for easy deployment on Render.
- Create a new Blueprint Instance on Render.
- Connect your GitHub repository.
- Render will automatically detect
render.yamland set up:- A PostgreSQL database.
- A Node.js web service.
- You will need to manually add your
SUPABASE_URLandSUPABASE_KEYin the Render dashboard environment variables after creation.
- Create a PostgreSQL database on Render.
- Create a Web Service on Render:
- Build Command:
npm install - Start Command:
node server.js
- Build Command:
- Add the following Environment Variables:
DATABASE_URL: (Internal connection string from your Render DB)SESSION_SECRET: (Any random string)SUPABASE_URL: (Your Supabase URL)SUPABASE_KEY: (Your Supabase Key)SUPABASE_BUCKET:doctor-photosNODE_ENV:production
After deployment, connect to your Render database (using the external connection string) and run the contents of schema.sql to create the tables.
=======
cb09ee84dc8a7a7d4bbac41578025e41fabdb027
| Variable | Description |
|---|---|
SESSION_SECRET |
Secret for signing session cookies |
DATABASE_URL |
PostgreSQL connection string |
SUPABASE_URL |
Supabase project URL |
SUPABASE_KEY |
Supabase service key |
SUPABASE_BUCKET |
Bucket name for doctor photos (default: doctor-photos) |
PORT |
Port for the Express server (default: 3000) |
hackathon/
├─ public/ # Static assets (css, js, images)
├─ views/ # EJS templates
│ ├─ doctor/ # Doctor profile & dashboard
│ ├─ patient/ # Patient dashboard
│ └─ partials/ # Header & footer
├─ routes/ # Express route handlers
│ ├─ auth.js # Login / registration
│ ├─ doctor.js # Doctor‑specific endpoints
│ └─ patient.js # Patient‑specific endpoints
├─ config/ # DB & Supabase config
├─ schema.sql # Database schema
├─ .gitignore # Ignored files (generated automatically)
└─ README.md # **You are reading it!**
- Visit the home page – Search for doctors using the animated search bar.
- Select a doctor – View their profile, see the interactive calendar, and pick a slot.
- Book an appointment – If you’re not logged in, you’ll be taken to the login page and then back to the calendar.
- Doctor dashboard – Doctors can edit their profile (including specialty), block unavailable times, and see upcoming appointments.
- Payment – Choose Cash (no extra fields) or Online (card fields appear).
The project currently does not include automated tests, but you can manually verify:
- Calendar navigation and slot fetching (
/doctor/:id/slots). - Login‑redirect flow.
- Specialty and cost display in DT.
- Search dropdown layout (photo + name).
This project is provided for educational / hackathon purposes. Feel free to adapt, improve, and share!
<<<<<<< HEAD
- Inspired by Doctolib UI/UX. =======
cb09ee84dc8a7a7d4bbac41578025e41fabdb027
- Icons from Font Awesome.
- Supabase for simple object storage.
<<<<<<< HEAD
cb09ee84dc8a7a7d4bbac41578025e41fabdb027