This project is a clone of the Apollo247 doctor listing page, focusing specifically on the General Physician & Internal Medicine specialists section. The application implements a full-stack solution with Next.js for the frontend and a MongoDB backend with REST APIs.
- Doctor Listing Page: Clone of https://www.apollo247.com/specialties/general-physician-internal-medicine
- Functional Filters: Filter doctors by city, specialization, gender, experience, fees, and more
- Pagination: Navigate through doctor listings with a user-friendly pagination system
- Responsive Design: Works well on both desktop and mobile devices
- SEO Optimization: Implemented offpage SEO with metadata, semantic HTML, and content optimization
- REST APIs: Backend APIs for doctor management
POST /api/doctors
- Add a new doctorGET /api/doctors/list
- List doctors with filtering and pagination
- Frontend: Next.js with TypeScript and Tailwind CSS
- Backend: Next.js API routes
- Database: MongoDB with Mongoose
- State Management: React Hooks (useState, useEffect)
- HTTP Client: Axios for API requests
- Icons: React Icons
/src/app
- Next.js app directory/api
- API routes/specialties/general-physician-internal-medicine
- Main doctor listing page
/src/components
- Reusable UI components/src/lib
- Utility functions and database connection/src/models
- MongoDB models/src/scripts
- Database seeding scripts
- Node.js (v18 or higher)
- MongoDB (local or remote)
- Clone the repository
- Install dependencies:
npm install
- Create a
.env.local
file with your MongoDB connection string:MONGODB_URI=mongodb://localhost:27017/apollo247-clone
- Seed the database with sample data:
npm run seed
- Start the development server:
npm run dev
- Open http://localhost:3000 in your browser
POST /api/doctors
Request body:
{
"name": "Dr. John Doe",
"specialization": "General Physician",
"qualification": "MBBS, MD",
"experience": 10,
"city": "Mumbai",
"clinic": "Apollo Clinic",
"fees": 500,
"gender": "male",
"cashback": 75,
"rating": 90,
"patientCount": 200,
"availableIn": 15
}
GET /api/doctors/list?page=1&limit=10&city=Mumbai&gender=male&sortBy=rating
Query parameters:
page
: Page number (default: 1)limit
: Number of doctors per page (default: 10)specialization
: Filter by specializationcity
: Filter by citygender
: Filter by genderminExperience
: Minimum years of experiencemaxFees
: Maximum consultation feessortBy
: Sort results by (relevance, fees_low, fees_high, experience, rating)query
: Text search query
This project is for educational purposes only. It is not affiliated with or endorsed by Apollo 247.