Modern Healthcare Management System
Features β’ Tech Stack β’ Getting Started β’ Project Structure β’ API Documentation
Telesana is a full-stack healthcare management platform that connects patients with doctors through modern telemedicine solutions. The application provides appointment scheduling, patient profile management, calendar integration, and real-time notifications.
To streamline healthcare delivery by providing:
- Easy appointment booking with doctors
- Patient profile and health record management
- Interactive calendar for tracking appointments
- Secure authentication and user management
- Real-time notifications for appointments and health updates
- User registration and login with JWT authentication
- Secure password handling
- Session management with localStorage
- Protected routes for dashboard access
- User Profile Creation: Complete patient profiles with personal information
- Health Information: Track height, weight, blood group, and medical history
- Profile Editing: Update patient information anytime
- Gender Options: Male, Female, Other
- Doctor Selection: Browse and select from available doctors
- Appointment Booking: Schedule appointments with preferred doctors
- Multiple Modes: Video consultation or in-person visits
- Appointment Status: Track SCHEDULED, COMPLETED, or CANCELLED appointments
- Appointment History: View all past and upcoming appointments
- Monthly Calendar View: Visual representation of appointments
- Date Highlighting: Days with appointments are prominently highlighted
- Appointment Indicators: Pulsing green dots show appointment days
- Hover Tooltips: Quick view of appointment details on hover
- Appointment Details Sidebar: Click any date to see full appointment information
- Browse all available doctors
- View doctor specializations (Cardiology, General Physician, Dermatology, Orthopedics, Pediatrics)
- See doctor qualifications, experience, and consultation fees
- Demo doctors available for testing
- Appointment Reminders: Get notified about upcoming appointments
- Health Reminders: Medication alerts and health tips
- Doctor Messages: Receive updates from healthcare providers
- System Updates: Stay informed about new features
- Unread Counter: Track unread notifications with badge
- Mark as Read: Individual or bulk mark as read functionality
- Professional Dark Theme: Modern glassmorphism design
- User Profile Display: Avatar, username, and email
- Quick Navigation: Access all features from sidebar
- Responsive Layout: Works on desktop and mobile devices
- Modern Design: Clean, professional interface with gradient accents
- Smooth Animations: Hover effects and transitions throughout
- Responsive: Mobile-friendly design
- Toast Notifications: Real-time feedback for user actions
- Loading States: Visual feedback during data fetching
- Framework: Next.js 15.5.3 (App Router)
- Library: React 19.1.0
- Language: JavaScript (ES6+)
- Styling: CSS Modules, Custom CSS
- UI Components:
- React Icons (Icons library)
- React Calendar (Calendar component)
- React Hot Toast (Toast notifications)
- Chakra UI (UI components)
- Material-UI (Additional components)
- Framer Motion (Animations)
- HTTP Client: Axios
- Routing: Next.js App Router
- Runtime: Node.js
- Framework: Express.js
- Database ORM: Prisma
- Authentication: JWT (JSON Web Tokens)
- CORS: Enabled for frontend communication
- API Port: 4000
- ORM: Prisma
- Schema: Relational database with tables for:
- Users
- Patients
- Doctors
- Appointments
- Health Passbook
- Prescriptions
Telesana/
βββ frontend/ # Next.js frontend application
β βββ public/ # Static assets
β β βββ logo.png
β β βββ home.png
β β βββ noavatar.png
β βββ src/
β β βββ app/ # Next.js app directory
β β β βββ page.js # Home page
β β β βββ layout.js # Root layout
β β β βββ about/ # About page
β β β βββ contact/ # Contact page
β β β βββ doctors/ # All doctors page
β β β βββ faq/ # FAQ page
β β β βββ login/ # Login page
β β β βββ signup/ # Signup page
β β β βββ dashboard/ # Dashboard routes
β β β β βββ page.jsx # Dashboard home
β β β β βββ Appointments/ # Appointments management
β β β β βββ calendar/ # Calendar view
β β β β βββ notifications/ # Notifications center
β β β β βββ userDetails/ # User profile
β β β β βββ HealthSummary/ # Health records
β β β β βββ settings/ # Settings page
β β β βββ ui/ # UI components
β β βββ components/ # Reusable components
β β βββ Navbar.jsx # Navigation bar
β β βββ Chatbot.jsx # AI chatbot
β β βββ ConditionalFooter.jsx
β βββ package.json # Frontend dependencies
β βββ next.config.mjs # Next.js configuration
β βββ tsconfig.json # TypeScript configuration
β
βββ backend/ # Express.js backend
β βββ controllers/ # Route controllers
β β βββ authControllers.js
β β βββ patientController.js
β β βββ appointmentController.js
β β βββ doctorController.js
β β βββ healthControllers.js
β βββ routes/ # API routes
β β βββ authRoutes.js
β β βββ patientRoutes.js
β β βββ appointmentRoutes.js
β β βββ doctorRoutes.js
β β βββ healthRoutes.js
β βββ services/ # Business logic
β β βββ patientService.js
β β βββ appointmentService.js
β β βββ doctorService.js
β βββ middlewares/ # Express middlewares
β β βββ authMiddleware.js # JWT authentication
β βββ prisma/ # Prisma schema and migrations
β βββ index.js # Server entry point
β βββ package.json # Backend dependencies
β
βββ vercel.json # Vercel deployment configuration
βββ .vercelignore # Vercel ignore file
βββ README.md # Project documentation
- Node.js 18.x or higher
- npm or yarn
- MySQL database (for backend)
- Git
-
Clone the repository
git clone https://github.com/vtushar06/Telesana.git cd Telesana -
Install Frontend Dependencies
cd frontend npm install -
Install Backend Dependencies
cd ../backend npm install -
Configure Environment Variables
Create
.envfile inbackend/directory:DATABASE_URL="your_database_connection_string" JWT_SECRET="your_jwt_secret_key" PORT=4000
-
Setup Database
cd backend npx prisma migrate dev npx prisma generate node seed.js # Optional: Seed demo doctors
-
Start Backend Server (Terminal 1)
cd backend node index.jsBackend will run on
http://localhost:4000 -
Start Frontend Development Server (Terminal 2)
cd frontend npm run devFrontend will run on
http://localhost:3000 -
Open in Browser
http://localhost:3000
POST /api/auth/register- Register new userPOST /api/auth/login- Login user
GET /api/patient/profile- Get patient profile (requires auth)POST /api/patient/profile- Create patient profile (requires auth)PUT /api/patient/profile- Update patient profile (requires auth)
GET /api/doctors- Get all doctorsGET /api/doctor/:id- Get doctor by ID
GET /api/appointments- Get user's appointments (requires auth)POST /api/appointments- Book new appointment (requires auth)GET /api/appointments/:userId- Get appointments by user ID
GET /api/health/passbook- Get health passbook (requires auth)PUT /api/health/passbook- Update health passbook (requires auth)
- Sign Up β Create account with username, email, password
- Login β Access dashboard with credentials
- Create Profile β Fill patient details (required before booking)
- Browse Doctors β View available doctors and their specializations
- Book Appointment β Select doctor, date, time, and consultation mode
- View Calendar β See all appointments in calendar view
- Check Notifications β Stay updated with appointment reminders
- Manage Profile β Update health information anytime
- JWT-based authentication
- Password encryption (bcrypt)
- Protected API routes with middleware
- Token expiration handling
- Secure HTTP headers with CORS
- Input validation on all forms
- SQL injection prevention with Prisma ORM
-
Configure Root Directory
- Set Root Directory to
frontendin Vercel settings - Enable "Include source files outside Root Directory"
- Set Root Directory to
-
Environment Variables
- Add any required environment variables in Vercel dashboard
-
Deploy
- Push to main branch to trigger auto-deployment
- Or use Vercel CLI:
vercel --prod
- Deploy backend separately to platforms like:
- Railway
- Render
- Heroku
- AWS EC2
next: 15.5.3react: 19.1.0react-hot-toast: Toast notificationsreact-icons: Icon libraryreact-calendar: Calendar componentaxios: HTTP client
express: Web framework@prisma/client: Database ORMjsonwebtoken: JWT authenticationbcrypt: Password hashingcors: Cross-origin resource sharing
- Patient Profile Required: Users must create a patient profile before booking appointments
- Demo Doctors: Uses fallback demo doctors if database is empty
- No Real-time Updates: Notifications are static, not real-time
- Single Role: Currently only supports patient role (no doctor portal)
- β Fixed Vercel deployment configuration for monorepo
- β Added professional dark theme for dashboard
- β Enhanced calendar with appointment highlighting
- β Implemented notifications system
- β Added patient profile management
- β Fixed appointment booking API
- β Improved navbar and sidebar styling
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is created for educational and demonstration purposes.
For questions or support, please open an issue in the GitHub repository.
Built with β€οΈ for better healthcare access