├── public ├── 10386c2cece606645c9e16fd9f9c12ca.html ├── favicon.ico └── assets │ ├── gifs │ └── success.gif │ ├── images │ ├── admin.png │ ├── dr-lee.png │ ├── dr-cruz.png │ ├── dr-green.png │ ├── dr-peter.png │ ├── dr-powell.png │ ├── dr-sharma.png │ ├── dr-cameron.png │ ├── dr-remirez.png │ ├── pending-bg.png │ ├── cancelled-bg.png │ ├── dr-livingston.png │ ├── register-img.png │ ├── appointment-img.png │ ├── appointments-bg.png │ └── onboarding-img.webp │ └── icons │ ├── check.svg │ ├── arrow.svg │ ├── user.svg │ ├── email.svg │ ├── upload.svg │ ├── appointments.svg │ ├── cancelled.svg │ ├── calendar.svg │ ├── pending.svg │ ├── close.svg │ ├── check-circle.svg │ ├── loader.svg │ ├── logo-icon.svg │ └── logo-full.svg ├── postcss.config.mjs ├── instrumentation.ts ├── components ├── ThemeProvider.tsx ├── AdminLink.tsx ├── NewAppointmentButton.tsx ├── ui │ ├── label.tsx │ ├── separator.tsx │ ├── textarea.tsx │ ├── input.tsx │ ├── checkbox.tsx │ ├── popover.tsx │ ├── radio-group.tsx │ ├── button.tsx │ ├── input-otp.tsx │ ├── table.tsx │ ├── dialog.tsx │ ├── form.tsx │ ├── alert-dialog.tsx │ ├── command.tsx │ └── select.tsx ├── GlobalLoading.tsx ├── StatusBadge.tsx ├── StatCard.tsx ├── GlobalLoadingProvider.tsx ├── SubmitButton.tsx ├── FileUploader.tsx ├── AppointmentModal.tsx ├── PasskeyModal.tsx ├── forms │ ├── PatientForm.tsx │ └── AppointmentForm.tsx ├── table │ ├── columns.tsx │ └── DataTable.tsx ├── PatientModal.tsx └── CustomFormField.tsx ├── app ├── api │ ├── sentry-example-api │ │ └── route.ts │ ├── patients │ │ └── [patientId] │ │ │ └── page.ts │ ├── checkPhone │ │ └── route.ts │ └── checkEmail │ │ └── route.ts ├── loading.tsx ├── global-error.tsx ├── patients │ ├── find-by-email │ │ └── page.tsx │ └── [userId] │ │ ├── new-appointment │ │ ├── page.tsx │ │ └── success │ │ │ └── page.tsx │ │ └── register │ │ └── page.tsx ├── layout.tsx ├── admin │ └── page.tsx ├── sentry-example-page │ └── page.tsx ├── page.tsx └── globals.css ├── components.json ├── .vscode └── settings.json ├── .eslintrc.json ├── .gitignore ├── tsconfig.json ├── sentry.server.config.ts ├── sentry.edge.config.ts ├── types ├── appwrite.types.ts └── index.d.ts ├── sentry.client.config.ts ├── lib ├── appwrite.config.ts ├── utils.ts ├── validation.ts └── actions │ ├── patient.actions.ts │ └── appointment.actions.ts ├── next.config.mjs ├── package.json ├── constants └── index.ts ├── tailwind.config.ts └── README.md /public/10386c2cece606645c9e16fd9f9c12ca.html: -------------------------------------------------------------------------------- 1 | twilio-domain-verification=10386c2cece606645c9e16fd9f9c12ca -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/assets/gifs/success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/gifs/success.gif -------------------------------------------------------------------------------- /public/assets/images/admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/admin.png -------------------------------------------------------------------------------- /public/assets/images/dr-lee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-lee.png -------------------------------------------------------------------------------- /public/assets/images/dr-cruz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-cruz.png -------------------------------------------------------------------------------- /public/assets/images/dr-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-green.png -------------------------------------------------------------------------------- /public/assets/images/dr-peter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-peter.png -------------------------------------------------------------------------------- /public/assets/images/dr-powell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-powell.png -------------------------------------------------------------------------------- /public/assets/images/dr-sharma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-sharma.png -------------------------------------------------------------------------------- /public/assets/images/dr-cameron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-cameron.png -------------------------------------------------------------------------------- /public/assets/images/dr-remirez.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-remirez.png -------------------------------------------------------------------------------- /public/assets/images/pending-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/pending-bg.png -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /public/assets/images/cancelled-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/cancelled-bg.png -------------------------------------------------------------------------------- /public/assets/images/dr-livingston.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/dr-livingston.png -------------------------------------------------------------------------------- /public/assets/images/register-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/register-img.png -------------------------------------------------------------------------------- /public/assets/images/appointment-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/appointment-img.png -------------------------------------------------------------------------------- /public/assets/images/appointments-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/appointments-bg.png -------------------------------------------------------------------------------- /public/assets/images/onboarding-img.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arnobt78/HealthCare-Doctor-Appointment-Management-System--NextJS-FullStack/HEAD/public/assets/images/onboarding-img.webp -------------------------------------------------------------------------------- /public/assets/icons/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /instrumentation.ts: -------------------------------------------------------------------------------- 1 | export async function register() { 2 | if (process.env.NEXT_RUNTIME === "nodejs") { 3 | await import("./sentry.server.config"); 4 | } 5 | 6 | if (process.env.NEXT_RUNTIME === "edge") { 7 | await import("./sentry.edge.config"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /public/assets/icons/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/ThemeProvider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 4 | import { type ThemeProviderProps } from "next-themes/dist/types"; 5 | 6 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 7 | return {children}; 8 | } 9 | -------------------------------------------------------------------------------- /app/api/sentry-example-api/route.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unreachable */ 2 | import { NextResponse } from "next/server"; 3 | 4 | export const dynamic = "force-dynamic"; 5 | 6 | // A faulty API route to test Sentry's error monitoring 7 | export function GET() { 8 | throw new Error("Sentry Example API Route Error"); 9 | return NextResponse.json({ data: "Testing Sentry Error..." }); 10 | } 11 | -------------------------------------------------------------------------------- /public/assets/icons/user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": false, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } -------------------------------------------------------------------------------- /app/loading.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable @next/next/no-img-element */ 2 | // import Image from "next/image"; 3 | 4 | export default function Loading() { 5 | return ( 6 |
7 | loader 14 | Loading... 15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /public/assets/icons/email.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.defaultFormatter": "esbenp.prettier-vscode", 3 | "editor.formatOnSave": true, 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll.eslint": "explicit", 6 | "source.addMissingImports": "explicit" 7 | }, 8 | "prettier.tabWidth": 2, 9 | "prettier.useTabs": false, 10 | "prettier.semi": true, 11 | "prettier.singleQuote": false, 12 | "prettier.jsxSingleQuote": false, 13 | "prettier.trailingComma": "es5", 14 | "prettier.arrowParens": "always", 15 | "[typescriptreact]": { 16 | "editor.defaultFormatter": "esbenp.prettier-vscode" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /public/assets/icons/upload.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /components/AdminLink.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useRouter } from "next/navigation"; 4 | import { useTransition } from "react"; 5 | 6 | export default function AdminLink({ className }: { className?: string }) { 7 | const router = useRouter(); 8 | const [isPending, startTransition] = useTransition(); 9 | 10 | return ( 11 | 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["import"], 3 | "extends": [ 4 | "next/core-web-vitals", 5 | "standard", 6 | "plugin:tailwindcss/recommended", 7 | "prettier" 8 | ], 9 | "rules": { 10 | "no-undef": "off", 11 | "import/order": [ 12 | "error", 13 | { 14 | "groups": [ 15 | "builtin", 16 | "external", 17 | "internal", 18 | "parent", 19 | "sibling", 20 | "index" 21 | ], 22 | "newlines-between": "always", 23 | "alphabetize": { 24 | "order": "asc", 25 | "caseInsensitive": true 26 | } 27 | } 28 | ] 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.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 | 38 | # Sentry Config File 39 | .env.sentry-build-plugin 40 | 41 | # Local backup files 42 | _local_backup 43 | .vscode 44 | .next -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /public/assets/icons/appointments.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/assets/icons/cancelled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/assets/icons/calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/NewAppointmentButton.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useRouter } from "next/navigation"; 4 | import { useTransition } from "react"; 5 | 6 | import { Button } from "@/components/ui/button"; 7 | 8 | export default function NewAppointmentButton({ userId }: { userId: string }) { 9 | const router = useRouter(); 10 | const [isPending, startTransition] = useTransition(); 11 | 12 | return ( 13 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /app/global-error.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as Sentry from "@sentry/nextjs"; 4 | import NextError from "next/error"; 5 | import { useEffect } from "react"; 6 | 7 | export default function GlobalError({ 8 | error, 9 | }: { 10 | error: Error & { digest?: string }; 11 | }) { 12 | useEffect(() => { 13 | Sentry.captureException(error); 14 | }, [error]); 15 | 16 | return ( 17 | 18 | 19 | {/* `NextError` is the default Next.js error page component. Its type 20 | definition requires a `statusCode` prop. However, since the App Router 21 | does not expose status codes for errors, we simply pass 0 to render a 22 | generic error message. */} 23 | 24 | 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /app/api/patients/[patientId]/page.ts: -------------------------------------------------------------------------------- 1 | import { NextApiRequest, NextApiResponse } from "next"; 2 | 3 | import { databases } from "@/lib/appwrite.config"; 4 | 5 | export default async function handler( 6 | req: NextApiRequest, 7 | res: NextApiResponse 8 | ) { 9 | const { patientId } = req.query; 10 | 11 | try { 12 | const response = await databases.getDocument( 13 | "66f8831e001d304c7f4d", // Your database ID 14 | "66f883e700300eb34a8e", // Your collection ID 15 | patientId as string 16 | ); 17 | res.status(200).json(response); 18 | } catch (error) { 19 | console.error( 20 | "An error occurred while retrieving the patient details:", 21 | error 22 | ); 23 | res.status(500).json({ error: "Failed to retrieve patient details" }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /sentry.server.config.ts: -------------------------------------------------------------------------------- 1 | // This file configures the initialization of Sentry on the server. 2 | // The config you add here will be used whenever the server handles a request. 3 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/ 4 | 5 | import * as Sentry from "@sentry/nextjs"; 6 | 7 | Sentry.init({ 8 | dsn: "https://3d627de24f5d06a1fc39000a06ca9a94@o4506813739368448.ingest.us.sentry.io/4507458386526208", 9 | 10 | // Adjust this value in production, or use tracesSampler for greater control 11 | tracesSampleRate: 1, 12 | 13 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 14 | debug: false, 15 | 16 | // Uncomment the line below to enable Spotlight (https://spotlightjs.com) 17 | // spotlight: process.env.NODE_ENV === 'development', 18 | }); 19 | -------------------------------------------------------------------------------- /sentry.edge.config.ts: -------------------------------------------------------------------------------- 1 | // This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on). 2 | // The config you add here will be used whenever one of the edge features is loaded. 3 | // Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally. 4 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/ 5 | 6 | import * as Sentry from "@sentry/nextjs"; 7 | 8 | Sentry.init({ 9 | dsn: "https://3d627de24f5d06a1fc39000a06ca9a94@o4506813739368448.ingest.us.sentry.io/4507458386526208", 10 | 11 | // Adjust this value in production, or use tracesSampler for greater control 12 | tracesSampleRate: 1, 13 | 14 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 15 | debug: false, 16 | }); 17 | -------------------------------------------------------------------------------- /components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as LabelPrimitive from "@radix-ui/react-label"; 4 | import { cva, type VariantProps } from "class-variance-authority"; 5 | import * as React from "react"; 6 | 7 | import { cn } from "@/lib/utils"; 8 | 9 | const labelVariants = cva( 10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 11 | ); 12 | 13 | const Label = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | VariantProps 17 | >(({ className, ...props }, ref) => ( 18 | 23 | )); 24 | Label.displayName = LabelPrimitive.Root.displayName; 25 | 26 | export { Label }; 27 | -------------------------------------------------------------------------------- /components/GlobalLoading.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable @next/next/no-img-element */ 2 | // Replaced next/image with native img for Vercel quota 3 | 4 | export default function GlobalLoading({ 5 | text = "Processing...", 6 | }: { 7 | text?: string; 8 | }) { 9 | return ( 10 |
11 | loader 26 | 27 | {text} 28 | 29 |
30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /components/ui/separator.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as SeparatorPrimitive from "@radix-ui/react-separator"; 4 | import * as React from "react"; 5 | 6 | import { cn } from "@/lib/utils"; 7 | 8 | const Separator = React.forwardRef< 9 | React.ElementRef, 10 | React.ComponentPropsWithoutRef 11 | >( 12 | ( 13 | { className, orientation = "horizontal", decorative = true, ...props }, 14 | ref 15 | ) => ( 16 | 27 | ) 28 | ); 29 | Separator.displayName = SeparatorPrimitive.Root.displayName; 30 | 31 | export { Separator }; 32 | -------------------------------------------------------------------------------- /public/assets/icons/pending.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |