A modern, full-stack web application built with Next.js for Trishal Diagnostic & Eye Care Center in Mymensingh, Bangladesh. This production-grade healthcare platform provides comprehensive information about doctors, services, and facilities with a powerful admin dashboard for content management.
- Project Overview
- Tech Stack
- Key Features
- Page Structure
- Project Structure
- Getting Started
- Environment Variables
- ImageKit Media Management
- Advertisement Management System
- Admin Access
- Architecture
- Development
- Database Schema
- Troubleshooting
- Deployment
- Security Best Practices
- Testing Recommendations
- API Documentation
- Contributing
- License
- Contact
# Clone the repository
git clone <repository-url>
cd trishal-decc
# Install dependencies
npm install
# Set up environment variables (see .env.example)
cp .env.example .env
# Edit .env with your credentials
# Run development server
npm run dev
# Open http://localhost:3000Trishal DECC is a bilingual (English & Bengali) healthcare platform featuring:
- Public Website: Information about doctors, services, gallery, and contact details
- Admin Dashboard: Complete CMS for managing all dynamic content (doctors, services, gallery, ads)
- REST API: Clean backend architecture with MongoDB integration
- JWT Authentication: Secure admin access with token-based authentication
- Media Management: ImageKit CDN integration for optimized image and video delivery
- Ad Management System: Time-based ad popup system with scheduling capabilities
- Responsive Design: Mobile-first approach with modern UI/UX
- Next.js 16.1.6 - React framework with App Router
- React 19.2.3 - UI library
- TypeScript - Type-safe development
- Tailwind CSS 4 - Utility-first CSS framework
- React Context API - Global state management
- Noto Serif Bengali Font - Bengali typography support
- Next.js API Routes - Serverless API endpoints
- MongoDB 6.12.0 - NoSQL database (MongoDB Atlas)
- Jose 5.10.0 - JWT authentication library
- Mongoose-like Models - Clean database abstraction layer
- ImageKit 6.0.0 - Image/video CDN with optimization and transformation
- ESLint 9 - Code linting and quality
- PostCSS 4 - CSS processing
- Turbopack - Next-generation bundler (development mode)
- Bilingual Interface: Complete English and Bengali language support
- Responsive Design: Mobile-first design that works on all devices
- Hero Section: Eye-catching homepage with call-to-action
- Info Cards: Quick access to key information
- Services Showcase: Display all eye care services offered
- Doctor Profiles: View detailed doctor information with photos and schedules
- Gallery: Image and video gallery with category filtering
- Contact Section: Contact information and location details
- Ad Popup System: Time-based promotional popup on homepage
- Secure Authentication: JWT-based login system
- Dashboard Overview: Statistics cards showing total counts
- Quick Actions: Easy navigation to management pages
- Doctors Management: Full CRUD operations for doctor profiles
- Services Management: Add, edit, and delete services
- Gallery Management: Upload and manage images/videos
- Ads Management: Create and schedule time-based advertisements
- File Upload: Drag-and-drop file upload with ImageKit integration
- Bilingual Content: Manage content in both languages simultaneously
- RESTful API: Clean API architecture with proper status codes
- Context API: Global state management for auth and data
- Model Layer: Clean separation of business logic and data access
- JWT Authentication: Token-based auth with 24h expiry
- Input Validation: Server-side validation for all inputs
- Error Handling: Comprehensive error handling across all layers
- TypeScript: Full type safety throughout the application
- ImageKit CDN: Fast, optimized media delivery
- MongoDB Atlas: Cloud-based database with proper indexing
/- Homepage with all sections/about- About the clinic/doctors- Full doctors listing/services- All services offered/gallery- Complete gallery with filters
/admin/login- Admin login page/admin- Dashboard with statistics/admin/doctors- Doctor management interface/admin/services- Services management/admin/gallery- Gallery management/admin/ads- Advertisement management/admin/settings- Settings (placeholder)
trishal-decc/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API routes (controllers)
│ │ │ ├── admin/ # Admin authentication
│ │ │ │ └── login/ # Login endpoint
│ │ │ ├── doctors/ # Doctors CRUD API
│ │ │ ├── services/ # Services CRUD API
│ │ │ ├── gallery/ # Gallery CRUD API
│ │ │ ├── ads/ # Ads CRUD API
│ │ │ │ └── active/ # Active ads endpoint
│ │ │ ├── upload/ # File upload to ImageKit
│ │ │ └── imagekit-auth/ # ImageKit auth params
│ │ ├── admin/ # Admin dashboard pages
│ │ │ ├── doctors/ # Doctors management
│ │ │ ├── services/ # Services management
│ │ │ ├── gallery/ # Gallery management
│ │ │ ├── ads/ # Ads management
│ │ │ ├── settings/ # Settings page
│ │ │ └── login/ # Login page
│ │ ├── doctors/ # Public doctors page
│ │ ├── services/ # Public services page
│ │ ├── gallery/ # Public gallery page
│ │ ├── about/ # About page
│ │ ├── globals.css # Global styles
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Homepage
│ ├── components/ # React components
│ │ ├── Hero.tsx # Homepage hero section
│ │ ├── InfoCards.tsx # Info cards section
│ │ ├── Services.tsx # Services showcase
│ │ ├── About.tsx # About section
│ │ ├── Doctors.tsx # Doctors section
│ │ ├── Gallery.tsx # Gallery section
│ │ ├── Contact.tsx # Contact section
│ │ ├── AdPopup.tsx # Ad popup component
│ │ ├── Navbar.tsx # Navigation bar
│ │ ├── TopBar.tsx # Top bar
│ │ ├── Footer.tsx # Footer
│ │ ├── admin/ # Admin-specific components
│ │ │ ├── Header.tsx # Admin header
│ │ │ ├── Sidebar.tsx # Admin sidebar
│ │ │ ├── StatCard.tsx # Statistics card
│ │ │ ├── Table.tsx # Data table
│ │ │ ├── Modal.tsx # Modal dialog
│ │ │ └── FileUpload.tsx # File upload component
│ │ └── gallery/ # Gallery components
│ │ ├── GalleryGrid.tsx # Gallery grid layout
│ │ ├── GalleryItem.tsx # Gallery item card
│ │ └── GalleryFilters.tsx # Gallery filters
│ ├── context/ # React Context providers
│ │ ├── AuthContext.tsx # Authentication state
│ │ └── DataContext.tsx # Data management (CRUD operations)
│ ├── lib/ # Core utilities
│ │ ├── mongodb.ts # MongoDB connection
│ │ ├── imagekit.ts # ImageKit configuration
│ │ ├── auth.ts # Auth utilities (JWT)
│ │ └── middleware.ts # API middleware
│ ├── models/ # Database models (MVC pattern)
│ │ ├── Doctor.ts # Doctor model with CRUD
│ │ ├── Service.ts # Service model with CRUD
│ │ ├── Gallery.ts # Gallery model with CRUD
│ │ ├── Ad.ts # Ad model with time-based logic
│ │ └── index.ts # Models export
│ └── types/ # TypeScript types
│ ├── index.ts # Core interfaces
│ └── dto.ts # Data Transfer Objects
├── public/ # Static assets
│ └── images/ # Images and media
│ ├── doctors/ # Doctor profile images
│ └── logo/ # Logo files
├── .env # Environment variables (not in git)
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
├── next.config.mjs # Next.js configuration
├── tailwind.config.ts # Tailwind configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Dependencies and scripts
└── README.md # This file
- Node.js 18.x or higher
- npm or yarn
- MongoDB Atlas account (or local MongoDB instance)
-
Clone the repository
git clone <repository-url> cd trishal-decc
-
Install dependencies
npm install # or yarn install -
Set up environment variables
Create a
.envfile in the root directory:# MongoDB Configuration MONGODB_URI=your_mongodb_connection_string MONGODB_DB_NAME=tdecc # Admin Credentials ADMIN_USERNAME=admin ADMIN_PASSWORD=your_secure_password # JWT Secret (generate a strong random string: openssl rand -base64 32) JWT_SECRET=your_jwt_secret_key # ImageKit Configuration (Get from https://imagekit.io/dashboard/developer/api-keys) IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key IMAGEKIT_URL_ENDPOINT=https://ik.imagekit.io/your_imagekit_id
Important Security Notes:
- Never commit
.envfile to version control - Use strong passwords and secrets in production
- Generate JWT_SECRET using:
openssl rand -base64 32 - Keep ImageKit private key secure (server-side only)
- Rotate secrets regularly
- Never commit
-
Run the development server
npm run dev # or yarn dev -
Open your browser
- Public site: http://localhost:3000
- Admin login: http://localhost:3000/admin/login
| Variable | Description | Required | Example |
|---|---|---|---|
MONGODB_URI |
MongoDB connection string | Yes | mongodb+srv://user:pass@... |
MONGODB_DB_NAME |
Database name | Yes | tdecc |
ADMIN_USERNAME |
Admin login username | Yes | admin |
ADMIN_PASSWORD |
Admin login password | Yes | SecurePassword123! |
JWT_SECRET |
Secret key for JWT token generation | Yes | random-32-char-string |
IMAGEKIT_PUBLIC_KEY |
ImageKit public key | Yes | public_xxx... |
IMAGEKIT_PRIVATE_KEY |
ImageKit private key (server-only) | Yes | private_xxx... |
IMAGEKIT_URL_ENDPOINT |
ImageKit CDN endpoint | Yes | https://ik.imagekit.io/your_id |
This application uses ImageKit as a CDN for all media assets (doctor images, gallery photos/videos, ad images). ImageKit provides:
- ✅ Fast CDN delivery - Global edge network
- ✅ Automatic optimization - Image compression and format conversion
- ✅ Responsive images - Automatic resizing
- ✅ Video support - Video hosting and thumbnails
- ✅ Secure uploads - Server-side authentication
-
Create an ImageKit account at https://imagekit.io
-
Get your credentials from the Developer API Keys page:
- Public Key
- Private Key
- URL Endpoint
-
Add credentials to
.envfile (see Environment Variables section) -
Organize your media in folders:
/doctors- Doctor profile images/gallery- Gallery images and videos/gallery/thumbnails- Video thumbnails/ads- Advertisement images
-
Navigate to the admin section:
- Doctors:
/admin/doctors- Upload doctor profile images - Gallery:
/admin/gallery- Upload gallery images/videos - Ads:
/admin/ads- Upload ad images
- Doctors:
-
Upload workflow:
- Click "+ Add" button (Doctor/Gallery/Ad)
- Use the file upload component to select your image/video
- File is automatically uploaded to ImageKit CDN
- ImageKit URL is saved in MongoDB
- Preview appears instantly
-
File specifications:
- Max size: 50MB per file
- Supported formats:
- Images: JPEG, JPG, PNG, GIF, WEBP
- Videos: MP4, WEBM, OGG
All media URLs follow this pattern:
https://ik.imagekit.io/your_id/folder/filename.ext
Example:
https://ik.imagekit.io/tdecc/doctors/dr-ahmed-1234567890.jpg
The platform includes a sophisticated ad management system with time-based scheduling:
- Time-Based Scheduling: Ads automatically display based on start/end times (UTC)
- Multiple Ad Types: Support for image ads and text ads
- Popup Display: Ads appear in a modal popup on the homepage
- Auto-Activation: Only active ads (within time range) are shown
- ImageKit Integration: Ad images hosted on CDN
-
Creating Ads (
/admin/ads):- Choose ad type (image or text)
- Upload image (for image ads) or enter text content
- Set start and end date/time (UTC-based)
- Ad is automatically scheduled
-
Ad Activation:
- System checks current UTC time
- Only ads where
startTime <= now <= endTimeare displayed - Multiple active ads can be shown in sequence
-
Frontend Display:
<AdPopup />component on homepage- Fetches active ads from
/api/ads/active - Shows ads in a dismissible modal
- User can close and won't see again in same session
// Get currently active ads
GET /api/ads/active
Response: { success: true, data: Ad[] }
// Admin endpoints (protected)
GET /api/ads // All ads
POST /api/ads // Create ad
PUT /api/ads // Update ad
DELETE /api/ads?id // Delete adImageKit automatically optimizes images. You can add URL parameters for transformations:
// Resize to 400x400
https://ik.imagekit.io/your_id/image.jpg?tr=w-400,h-400
// Quality 80%, auto format
https://ik.imagekit.io/your_id/image.jpg?tr=q-80,f-auto
// Crop and resize
https://ik.imagekit.io/your_id/image.jpg?tr=w-400,h-400,c-at_maxThe application uses Next.js <Image> component with ImageKit URLs:
<Image
src="https://ik.imagekit.io/your_id/doctors/dr-ahmed.jpg"
alt="Doctor Ahmed"
width={400}
height={400}
className="rounded-lg"
/>- Navigate to
/admin/login - Use credentials from
.envfile - JWT token stored in localStorage (24h expiry)
- Automatic redirect to dashboard after successful login
- Dashboard: Overview statistics with quick actions
- Doctors Management: Add, edit, delete doctor profiles with image uploads
- Services Management: Manage eye care services in both languages
- Gallery Management: Upload and organize images/videos with ImageKit CDN
- Ads Management: Create and schedule time-based popup advertisements
- Media Upload: Drag-and-drop file upload with real-time preview
- Bilingual Support: Manage content in both English and Bengali
/admin- Dashboard with statistics/admin/doctors- Doctors CRUD interface/admin/services- Services CRUD interface/admin/gallery- Gallery management/admin/ads- Advertisement management/admin/settings- Settings page (placeholder)
This project follows a clean, layered architecture inspired by MVC principles, adapted for Next.js:
┌─────────────────────────────────────────┐
│ Presentation Layer │
│ (Components, Pages, UI) │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ API Layer (Controllers) │
│ (API Routes in app/api/) │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Business Logic Layer │
│ (Models in src/models/) │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Data Access Layer │
│ (MongoDB Connection) │
└─────────────────────────────────────────┘
- Separation of Concerns: Each layer has a single responsibility
- DRY (Don't Repeat Yourself): Reusable models and utilities
- Type Safety: Comprehensive TypeScript types and DTOs
- API-First: Frontend consumes backend APIs (no hardcoded data)
- Security: JWT authentication, protected routes, validation
The src/models/ directory contains database access logic:
- DoctorModel: CRUD operations for doctors with validation
- ServiceModel: CRUD operations for services
- GalleryModel: CRUD operations for gallery items
- AdModel: CRUD operations for ads with time-based activation logic
Each model includes:
- Data validation
- Business logic
- Database queries (find, create, update, delete)
- Error handling
- Auto-incrementing IDs (for doctors/services)
- UUID generation (for gallery/ads)
All API routes follow RESTful conventions:
Doctors API:
GET /api/doctors - Retrieve all doctors
POST /api/doctors - Create new doctor (protected)
PUT /api/doctors - Update doctor (protected)
DELETE /api/doctors?id - Delete doctor (protected)
Services API:
GET /api/services - Retrieve all services
POST /api/services - Create new service (protected)
PUT /api/services - Update service (protected)
DELETE /api/services?id - Delete service (protected)
Gallery API:
GET /api/gallery?type=[image|video|all] - Retrieve gallery items (filtered)
POST /api/gallery - Create new gallery item (protected)
PUT /api/gallery - Update gallery item (protected)
DELETE /api/gallery?id - Delete gallery item (protected)
Ads API:
GET /api/ads/active - Get currently active ads (based on UTC time)
GET /api/ads - Retrieve all ads (protected)
POST /api/ads - Create new ad (protected)
PUT /api/ads - Update ad (protected)
DELETE /api/ads?id - Delete ad (protected)
Authentication API:
POST /api/admin/login - Admin login (returns JWT token)
POST /api/upload - Upload file to ImageKit (protected)
GET /api/imagekit-auth - Get ImageKit auth params (protected)
Upload Request:
POST /api/upload
Authorization: Bearer <jwt_token>
Content-Type: multipart/form-data
FormData:
file: <binary>
folder: "doctors" | "gallery" | "gallery/thumbnails"Upload Response:
{
"success": true,
"data": {
"url": "https://ik.imagekit.io/your_id/doctors/image.jpg",
"fileId": "xyz123",
"fileName": "image.jpg",
"fileType": "image/jpeg"
}
}npm run dev
# Starts Next.js development server on http://localhost:3000
# Features hot module replacement and Turbopack bundlernpm run build
# Creates an optimized production build
# Runs TypeScript type checking
# Optimizes all assets and pagesnpm start
# Starts the production server (requires build first)
# Runs on port 3000 by defaultnpm run lint
# Runs ESLint to check code quality
# Checks for common errors and style issuesnpx tsc --noEmit
# Runs TypeScript compiler without generating files
# Useful for catching type errors- Start development server:
npm run dev - Make changes to components, pages, or API routes
- Test in browser - changes auto-reload
- Run linting to check code quality
- Test API endpoints using browser or Postman
- Build for production before deployment
- Create file in
src/app/your-page/page.tsx - Add navigation link in
Navbar.tsx - Style using Tailwind CSS classes
- Create route file in
src/app/api/your-endpoint/route.ts - Implement GET/POST/PUT/DELETE handlers
- Use models for database operations
- Add authentication middleware if needed
- Create model file in
src/models/YourModel.ts - Define interface in
src/types/index.ts - Implement CRUD operations
- Export from
src/models/index.ts
- Never commit
.envfile - Update
.env.examplewhen adding new variables - Document all variables in README
{
id: number,
name: string,
nameBn: string,
specialization: string,
specializationBn: string,
qualification: string,
experience: string,
experienceBn: string,
image: string, // ImageKit URL
schedule: string,
scheduleBn: string
}{
id: number,
title: string,
titleBn: string,
description: string,
descriptionBn: string,
icon: string
}{
id: string,
type: 'image' | 'video',
src: string, // ImageKit URL
thumbnail?: string, // ImageKit URL for video thumbnails
title?: string,
titleBn?: string,
createdAt: Date | string
}{
id: string,
type: 'image' | 'text',
imageUrl?: string, // ImageKit URL (for image ads)
textContent?: string, // Text content (for text ads)
startTime: Date | string, // UTC timestamp
endTime: Date | string, // UTC timestamp
createdAt: Date | string
}Error: MongoServerError: bad auth
Solution:
- Verify
MONGODB_URIis correct in.env - Check username and password in connection string
- Ensure IP address is whitelisted in MongoDB Atlas
Error: Invalid token or Unauthorized
Solution:
- Check
JWT_SECRETis set in.env - Clear localStorage and login again
- Token expires after 24 hours - re-login required
Error: Authentication failed
Solution:
- Verify all three ImageKit credentials in
.env - Check ImageKit account is active
- Ensure private key is server-side only (never in client)
Type error: Cannot find module...
Solution:
- Run
npm installto ensure all dependencies are installed - Check import paths are correct
- Restart TypeScript server in VS Code
Port 3000 already in use
Solution:
- Kill the process using port 3000
- Or use different port:
npm run dev -- -p 3001
Solution:
- Check start/end times are in UTC
- Verify ad is active in
/admin/ads - Check browser console for API errors
- Clear browser cache and reload
-
MONGODB_URI- Valid connection string -
MONGODB_DB_NAME- Database name (e.g., "tdecc") -
ADMIN_USERNAME- Admin login username -
ADMIN_PASSWORD- Secure password -
JWT_SECRET- Random 32+ character string -
IMAGEKIT_PUBLIC_KEY- From ImageKit dashboard -
IMAGEKIT_PRIVATE_KEY- From ImageKit dashboard (keep secret!) -
IMAGEKIT_URL_ENDPOINT- Your ImageKit URL
- Vercel (recommended for Next.js)
- Netlify
- AWS Amplify
- DigitalOcean App Platform
- Railway
-
Set up ImageKit (if not already done)
- Create ImageKit account
- Configure folders:
/doctors,/gallery,/ads - Note your credentials for deployment
-
Build the project
npm run build
-
Configure environment variables in your hosting platform
- Add all variables from
.env.example - Ensure ImageKit credentials are correct
- Use strong passwords and secrets
- Add all variables from
-
Deploy
- Connect your Git repository
- Configure build settings:
- Build Command:
npm run build - Output Directory:
.next - Node Version: 18.x or higher
- Build Command:
-
Verify deployment
- Test all public pages
- Test admin login and authentication
- Test CRUD operations for all entities
- Check MongoDB connection
- Verify ImageKit uploads work
- Test ad popup functionality
Ensure all environment variables are set in your hosting platform's settings. Never commit secrets to Git.
-
Enable ImageKit optimizations in production:
- Auto WebP conversion
- Quality auto-adjustment
- Lazy loading
-
Set up CDN caching for optimal performance
-
Configure ImageKit security:
- Restrict API access by IP (optional)
- Set up webhooks for monitoring
- Review usage limits and quotas
✅ Implemented:
- JWT authentication for all admin routes
- Token-based authorization (24h expiry)
- Protected API endpoints with middleware
- Input validation in model layer
- Environment variable configuration
- Secure password storage (configured in .env)
- CORS protection (Next.js default)
- Server-side only operations for sensitive data
- Use HTTPS only (enforced by hosting platform)
- Implement rate limiting on API routes
- Add CSRF protection for forms
- Enable MongoDB IP whitelist
- Regular security audits
- Keep dependencies updated (
npm audit) - Use secrets manager (AWS Secrets Manager, Azure Key Vault)
- Implement request logging and monitoring
- Add brute force protection on login
- Consider adding 2FA for admin access
While tests are not included in the current version, consider adding:
- Unit Tests: Test models and utilities
- Integration Tests: Test API routes
- E2E Tests: Test user flows with Playwright or Cypress
- Type Tests: Ensure TypeScript coverage
Returns all doctors sorted by ID.
Response:
{
"success": true,
"data": [
{
"id": 1,
"name": "Dr. Ahmed Hassan",
"nameBn": "ডাঃ আহমেদ হাসান",
"specialization": "Ophthalmologist",
"specializationBn": "চক্ষু বিশেষজ্ঞ",
"qualification": "MBBS, MS (Ophthalmology)",
"experience": "15+ years",
"experienceBn": "১৫+ বছর",
"image": "https://ik.imagekit.io/your_id/doctors/dr-ahmed.jpg",
"schedule": "Mon-Sat: 9 AM - 5 PM",
"scheduleBn": "সোম-শনি: সকাল ৯টা - বিকাল ৫টা"
}
]
}Returns all services sorted by ID.
Response:
{
"success": true,
"data": [
{
"id": 1,
"title": "Cataract Surgery",
"titleBn": "ছানি অপারেশন",
"description": "Advanced cataract surgery with intraocular lens implantation",
"descriptionBn": "উন্নত ছানি অপারেশন",
"icon": "👁️"
}
]
}Returns gallery items, optionally filtered by type.
Parameters:
type(optional):image,video, orall(default:all)
Response:
{
"success": true,
"data": [
{
"id": "abc123",
"type": "image",
"src": "https://ik.imagekit.io/your_id/gallery/image1.jpg",
"title": "Eye Examination Room",
"titleBn": "চোখ পরীক্ষা কক্ষ",
"createdAt": "2026-02-10T10:00:00.000Z"
}
]
}Returns currently active ads based on UTC time.
Response:
{
"success": true,
"data": [
{
"id": "ad123",
"type": "image",
"imageUrl": "https://ik.imagekit.io/your_id/ads/promo.jpg",
"startTime": "2026-02-01T00:00:00.000Z",
"endTime": "2026-02-28T23:59:59.000Z",
"createdAt": "2026-02-01T08:00:00.000Z"
}
]
}All POST, PUT, DELETE operations require:
- Header:
Authorization: Bearer <jwt_token>
Admin login endpoint.
Request Body:
{
"username": "admin",
"password": "your_password"
}Response:
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"message": "Login successful"
}Create a new doctor (requires authentication).
Headers:
Authorization: Bearer <jwt_token>
Content-Type: application/json
Request Body:
{
"name": "Dr. Sarah Khan",
"nameBn": "ডাঃ সারাহ খান",
"specialization": "Pediatric Ophthalmologist",
"specializationBn": "শিশু চক্ষু বিশেষজ্ঞ",
"qualification": "MBBS, DCH, FCPS (Ophthalmology)",
"experience": "10+ years",
"experienceBn": "১০+ বছর",
"image": "https://ik.imagekit.io/your_id/doctors/dr-sarah.jpg",
"schedule": "Sun-Thu: 10 AM - 4 PM",
"scheduleBn": "রবি-বৃহস্পতি: সকাল ১০টা - বিকাল ৪টা"
}Response:
{
"success": true,
"message": "Doctor created successfully"
}Update an existing doctor.
Request Body:
{
"id": 1,
"name": "Dr. Ahmed Hassan (Updated)",
...
}Delete a doctor by ID.
Response:
{
"success": true,
"message": "Doctor deleted successfully"
}Similar patterns apply for:
/api/services- Services CRUD operations/api/gallery- Gallery CRUD operations/api/ads- Ads CRUD operations
Upload file to ImageKit (requires authentication).
Headers:
Authorization: Bearer <jwt_token>
Content-Type: multipart/form-data
Form Data:
file: <binary>
folder: "doctors" | "gallery" | "gallery/thumbnails" | "ads"
Response:
{
"success": true,
"data": {
"url": "https://ik.imagekit.io/your_id/doctors/image-123.jpg",
"fileId": "xyz123",
"fileName": "image-123.jpg",
"fileType": "image/jpeg"
}
}Potential features and improvements for future versions:
- Online appointment booking system
- Patient portal for medical records
- Multi-language support (add more languages)
- Blog/news section for health articles
- Telemedicine integration
- SMS/email notifications
- Payment gateway integration
- Patient testimonials and reviews
- Live chat support
- Mobile app (React Native)
- Unit and integration tests
- End-to-end testing with Cypress/Playwright
- Performance monitoring (Sentry, LogRocket)
- Analytics integration (Google Analytics, Plausible)
- SEO optimization and sitemap generation
- PWA capabilities (offline support)
- API rate limiting
- Admin activity logging
- Automated backups
- CI/CD pipeline (GitHub Actions)
- Dark mode support
- Animation and transitions
- Advanced gallery features (zoom, slideshow)
- Doctor search and filtering
- Print-friendly pages
- Accessibility improvements (WCAG compliance)
This is a production project. Contact the maintainer for contribution guidelines.
Proprietary - All rights reserved by Trishal Diagnostic & Eye Care Center
Trishal Diagnostic & Eye Care Center
- Location: Trishal Sadar, Mymensingh, Bangladesh
- Phone: [Contact Numbers]
- Email: info@trishaldecc.com
- Next.js Team - For the excellent React framework with App Router
- MongoDB - For reliable cloud database hosting
- ImageKit - For powerful CDN and media optimization
- Tailwind CSS - For the utility-first CSS framework
- Vercel - For Next.js development and hosting platform
- TypeScript Team - For bringing type safety to JavaScript
Production Ready ✅ | Last Updated: February 2026