├── .env ├── .eslintrc.json ├── .gitignore ├── PH Health Care Landing Page.jpg ├── PH Health Care Patient Register Page.png ├── PH Health Care User Login Page.png ├── README.md ├── next.config.js ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── next.svg └── vercel.svg ├── src ├── app │ ├── (withCommonLayout) │ │ ├── doctors │ │ │ ├── [id] │ │ │ │ └── page.tsx │ │ │ ├── components │ │ │ │ └── DoctorScheduleSlots.tsx │ │ │ └── page.tsx │ │ ├── forgot-password │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ ├── page.tsx │ │ ├── payment │ │ │ └── page.tsx │ │ ├── reset-password │ │ │ └── page.tsx │ │ └── video │ │ │ └── page.tsx │ ├── (withDashboardLayout) │ │ ├── dashboard │ │ │ ├── admin │ │ │ │ ├── appointments │ │ │ │ │ └── page.tsx │ │ │ │ ├── doctors │ │ │ │ │ ├── components │ │ │ │ │ │ └── DoctorModal.tsx │ │ │ │ │ ├── edit │ │ │ │ │ │ └── [doctorId] │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── page.tsx │ │ │ │ ├── schedules │ │ │ │ │ ├── components │ │ │ │ │ │ └── ScheduleModal.tsx │ │ │ │ │ └── page.tsx │ │ │ │ └── specialties │ │ │ │ │ ├── components │ │ │ │ │ └── SpecialtyModal.tsx │ │ │ │ │ └── page.tsx │ │ │ ├── change-password │ │ │ │ └── page.tsx │ │ │ ├── doctor │ │ │ │ ├── appointment │ │ │ │ │ └── page.tsx │ │ │ │ ├── page.tsx │ │ │ │ ├── profile │ │ │ │ │ ├── components │ │ │ │ │ │ ├── DoctorInformations.tsx │ │ │ │ │ │ ├── MultipleSelectChip.tsx │ │ │ │ │ │ └── ProfileUpdateModal.tsx │ │ │ │ │ └── page.tsx │ │ │ │ └── schedules │ │ │ │ │ ├── components │ │ │ │ │ ├── DoctorScheduleModal.tsx │ │ │ │ │ └── MultipleSelectFieldChip.tsx │ │ │ │ │ └── page.tsx │ │ │ ├── page.tsx │ │ │ ├── patient │ │ │ │ ├── appointments │ │ │ │ │ └── page.tsx │ │ │ │ └── page.tsx │ │ │ └── super_admin │ │ │ │ └── page.tsx │ │ └── layout.tsx │ ├── favicon.ico │ ├── globals.css │ ├── layout.tsx │ ├── login │ │ └── page.tsx │ ├── not-found.tsx │ └── register │ │ └── page.tsx ├── assets │ ├── choose-us.png │ ├── doctor-image1.png │ ├── doctor-image2.png │ ├── how-it-works-img.png │ ├── icons │ │ ├── appointment-icon.png │ │ ├── charity-icon.png │ │ ├── doctor-icon.png │ │ └── search-icon.png │ ├── images │ │ ├── Stetoscope.png │ │ ├── doctor1.png │ │ ├── doctor2.png │ │ ├── doctor3.png │ │ └── familyOnBeach.png │ ├── index.ts │ ├── landing_page │ │ ├── atm-card.png │ │ ├── badge.png │ │ ├── calender.png │ │ ├── diagnostic.png │ │ ├── doctors.png │ │ ├── facebook.png │ │ ├── folder.png │ │ ├── instagram.png │ │ ├── linkedin.png │ │ ├── location.png │ │ ├── search.jpg │ │ ├── search.png │ │ ├── twitter.png │ │ ├── user.png │ │ └── video_call.png │ └── svgs │ │ ├── Cardiology.svg │ │ ├── Dentist.svg │ │ ├── Neurology.svg │ │ ├── Ophthalmology.svg │ │ ├── Orthopedic.svg │ │ ├── Urology.svg │ │ ├── arrow.svg │ │ ├── award-icon.svg │ │ ├── brain.svg │ │ ├── calender.svg │ │ ├── call-icon.svg │ │ ├── care-icon.svg │ │ ├── dna.svg │ │ ├── doctorSearch.svg │ │ ├── grid.svg │ │ ├── kidney.svg │ │ ├── location.svg │ │ ├── logo.svg │ │ ├── medical-equipment-icon.svg │ │ ├── profile.svg │ │ ├── schedule.svg │ │ ├── search.svg │ │ └── solution.svg ├── components │ ├── Dashboard │ │ ├── AccountMenu │ │ │ └── AccountMenu.tsx │ │ ├── DashboardDrawer │ │ │ └── DashboardDrawer.tsx │ │ └── SideBar │ │ │ ├── SideBar.tsx │ │ │ └── SidebarItem.tsx │ ├── Forms │ │ ├── AutoFileUploader.tsx │ │ ├── PHDatePicker.tsx │ │ ├── PHFileUploader.tsx │ │ ├── PHForm.tsx │ │ ├── PHInput.tsx │ │ ├── PHSelectField.tsx │ │ └── PHTimePicker.tsx │ ├── Shared │ │ ├── Footer │ │ │ └── Footer.tsx │ │ ├── Navbar │ │ │ └── Navbar.tsx │ │ ├── PHModal │ │ │ ├── PHAlert.tsx │ │ │ ├── PHFullScreenModal.tsx │ │ │ └── PHModal.tsx │ │ └── PhChip │ │ │ └── PhChips.tsx │ └── UI │ │ ├── AuthButton │ │ └── AuthButton.tsx │ │ ├── Doctor │ │ ├── DashedLine.tsx │ │ ├── DoctorCard.tsx │ │ └── ScrollCategory.tsx │ │ ├── HomePage │ │ ├── HeroSection │ │ │ └── HeroSection.tsx │ │ ├── HowItWorks │ │ │ └── HowItWorks.tsx │ │ ├── Specialist │ │ │ └── Specialist.tsx │ │ ├── Stats │ │ │ └── Stats.tsx │ │ ├── TopRatedDoctors │ │ │ └── TopRatedDoctors.tsx │ │ └── WhyUs │ │ │ └── WhyUs.tsx │ │ └── VideoCall │ │ └── VideoCall.tsx ├── contants │ ├── authkey.ts │ └── role.ts ├── helpers │ └── axios │ │ ├── axiosBaseQuery.ts │ │ └── axiosInstance.ts ├── hooks │ └── useUserInfo.tsx ├── lib │ ├── Providers │ │ └── Providers.tsx │ └── theme │ │ └── theme.ts ├── middleware.ts ├── redux │ ├── api │ │ ├── appointmentApi.ts │ │ ├── authApi.ts │ │ ├── baseApi.ts │ │ ├── doctorApi.ts │ │ ├── doctorScheduleApi.ts │ │ ├── myProfile.ts │ │ ├── paymentApi.ts │ │ ├── scheduleApi.ts │ │ ├── specialtiesApi.ts │ │ └── userApi.ts │ ├── hooks.ts │ ├── rootReducer.ts │ ├── store.ts │ └── tag-types.ts ├── services │ ├── actions │ │ ├── deleteCookies.ts │ │ ├── logoutUser.ts │ │ ├── registerPatient.ts │ │ ├── setAccessToken.ts │ │ └── userLogin.ts │ └── auth.services.ts ├── types │ ├── common.ts │ ├── doctor │ │ └── index.ts │ ├── doctorSchedules │ │ └── index.tsx │ ├── index.ts │ ├── schedule │ │ └── index.ts │ └── specialties │ │ └── specialties.ts └── utils │ ├── dateFormatter.ts │ ├── drawerItems.ts │ ├── jwt.ts │ ├── local-storage.ts │ ├── modifyPayload.ts │ └── timeFormatter.ts ├── tailwind.config.ts └── tsconfig.json /.env: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_BACKEND_API_URL=http://localhost:5000/api/v1 2 | NEXT_PUBLIC_VIDEO_CALL_APP_ID="dc0163fa709945c29446cc895354247e" -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /PH Health Care Landing Page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apollo-Level2-Web-Dev/PH-HealthCare-Frontend/c4cad3ca08de608c041ca19bf3a460f485bc5d45/PH Health Care Landing Page.jpg -------------------------------------------------------------------------------- /PH Health Care Patient Register Page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apollo-Level2-Web-Dev/PH-HealthCare-Frontend/c4cad3ca08de608c041ca19bf3a460f485bc5d45/PH Health Care Patient Register Page.png -------------------------------------------------------------------------------- /PH Health Care User Login Page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apollo-Level2-Web-Dev/PH-HealthCare-Frontend/c4cad3ca08de608c041ca19bf3a460f485bc5d45/PH Health Care User Login Page.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | # or 14 | bun dev 15 | ``` 16 | 17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 18 | 19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 20 | 21 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 22 | 23 | ## Learn More 24 | 25 | To learn more about Next.js, take a look at the following resources: 26 | 27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 29 | 30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 31 | 32 | ## Deploy on Vercel 33 | 34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 35 | 36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 37 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | images: { 4 | remotePatterns: [ 5 | { 6 | protocol: "https", 7 | hostname: "**", 8 | }, 9 | ], 10 | }, 11 | }; 12 | 13 | module.exports = nextConfig; 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ph-healthcare-frontend", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@emotion/cache": "^11.11.0", 13 | "@emotion/react": "^11.11.4", 14 | "@emotion/styled": "^11.11.0", 15 | "@hookform/resolvers": "^3.3.4", 16 | "@mui/icons-material": "^5.15.13", 17 | "@mui/lab": "^5.0.0-alpha.170", 18 | "@mui/material": "^5.15.13", 19 | "@mui/material-nextjs": "^5.15.11", 20 | "@mui/x-data-grid": "^7.1.0", 21 | "@mui/x-date-pickers": "^7.1.0", 22 | "@reduxjs/toolkit": "^2.2.2", 23 | "agora-react-uikit": "^1.2.0", 24 | "axios": "^1.6.8", 25 | "dayjs": "^1.11.10", 26 | "jwt-decode": "^4.0.0", 27 | "next": "14.0.3", 28 | "react": "^18", 29 | "react-dom": "^18", 30 | "react-hook-form": "^7.51.1", 31 | "react-redux": "^9.1.0", 32 | "sonner": "^1.4.41", 33 | "zod": "^3.22.4" 34 | }, 35 | "devDependencies": { 36 | "@types/node": "^20", 37 | "@types/react": "^18", 38 | "@types/react-dom": "^18", 39 | "autoprefixer": "^10.0.1", 40 | "eslint": "^8", 41 | "eslint-config-next": "14.0.3", 42 | "postcss": "^8", 43 | "tailwindcss": "^3.3.0", 44 | "typescript": "^5" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/(withCommonLayout)/doctors/page.tsx: -------------------------------------------------------------------------------- 1 | import DashedLine from '@/components/UI/Doctor/DashedLine'; 2 | import DoctorCard from '@/components/UI/Doctor/DoctorCard'; 3 | import ScrollCategory from '@/components/UI/Doctor/ScrollCategory'; 4 | import { Doctor } from '@/types/doctor'; 5 | import { Box, Container } from '@mui/material'; 6 | import React from 'react'; 7 | 8 | interface PropType { 9 | searchParams: { specialties: string }; 10 | } 11 | 12 | const Doctors = async ({ searchParams }: PropType) => { 13 | let res; 14 | 15 | if (searchParams.specialties) { 16 | res = await fetch( 17 | `http://localhost:5000/api/v1/doctor?specialties=${searchParams.specialties}` 18 | ); 19 | } else { 20 | res = await fetch('http://localhost:5000/api/v1/doctor'); 21 | } 22 | 23 | const { data } = await res.json(); 24 | 25 | // console.log(data); 26 | 27 | return ( 28 | 29 | 30 | 31 | 32 | 33 | 34 | {data?.map((doctor: Doctor, index: number) => ( 35 | 36 | 37 | 38 | {index === data.length - 1 ? null : } 39 | 40 | ))} 41 | 42 | {data.length === 0 && ( 43 | No Doctor Found With This Specialty 44 | )} 45 | 46 | 47 | ); 48 | }; 49 | 50 | export default Doctors; 51 | -------------------------------------------------------------------------------- /src/app/(withCommonLayout)/forgot-password/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { zodResolver } from '@hookform/resolvers/zod'; 4 | import { Alert, Box, Button, Grid, Stack, Typography } from '@mui/material'; 5 | import { z } from 'zod'; 6 | import KeyIcon from '@mui/icons-material/Key'; 7 | import PHForm from '@/components/Forms/PHForm'; 8 | import PHInput from '@/components/Forms/PHInput'; 9 | import { FieldValues } from 'react-hook-form'; 10 | import { useForgotPasswordMutation } from '@/redux/api/authApi'; 11 | import { toast } from 'sonner'; 12 | import CheckIcon from '@mui/icons-material/Check'; 13 | 14 | const validationSchema = z.object({ 15 | email: z.string().email('Please enter a valid email address!'), 16 | }); 17 | 18 | const ForgotPassword = () => { 19 | const [forgotPassword, { isSuccess }] = useForgotPasswordMutation(); 20 | 21 | const onSubmit = async (values: FieldValues) => { 22 | try { 23 | const res = await forgotPassword(values); 24 | 25 | if ('data' in res && res.data.status === 200) { 26 | toast.success('Check Your Email for Reset Link'); 27 | } else { 28 | throw new Error('Something Went Wrong, Try Again'); 29 | } 30 | } catch (error) { 31 | console.log(error); 32 | } 33 | }; 34 | 35 | return ( 36 | 43 | 53 | 54 | 62 | 63 | 64 | 65 | Forgot password 66 | 67 | 68 | 69 | {isSuccess && ( 70 | 71 | } 73 | severity='success' 74 | > 75 | An Email with reset password link was sent to your email 76 | 77 | 78 | )} 79 | 80 | {!isSuccess && ( 81 | 86 | 87 | 88 | 95 | 96 | 97 | 98 | 101 | 102 | )} 103 | 104 | 105 | ); 106 | }; 107 | 108 | export default ForgotPassword; 109 | -------------------------------------------------------------------------------- /src/app/(withCommonLayout)/layout.tsx: -------------------------------------------------------------------------------- 1 | import Footer from "@/components/Shared/Footer/Footer"; 2 | import Navbar from "@/components/Shared/Navbar/Navbar"; 3 | import { Box } from "@mui/material"; 4 | 5 | const CommonLayout = ({ children }: { children: React.ReactNode }) => { 6 | return ( 7 | <> 8 | 9 | {children} 10 |