From 230d5c89f0061dc7bb012eab514b96e3b6757d9e Mon Sep 17 00:00:00 2001 From: Vishnu Date: Thu, 8 May 2025 21:27:29 +0530 Subject: [PATCH] first commit --- .gitignore | 39 + .npmrc | 1 + README.md | 58 + apps/Frontend/.gitignore | 24 + apps/Frontend/README.md | 54 + apps/Frontend/eslint.config.js | 28 + apps/Frontend/index.html | 13 + apps/Frontend/package.json | 94 + apps/Frontend/src/App.tsx | 39 + .../appointments/add-appointment-modal.tsx | 45 + .../appointments/appointment-form.tsx | 462 + .../appointments/appointment-table.tsx | 152 + .../src/components/claims/claim-form.tsx | 328 + .../src/components/claims/claim-modal.tsx | 57 + .../file-upload/file-upload-zone.tsx | 187 + .../src/components/layout/sidebar.tsx | 83 + .../src/components/layout/top-app-bar.tsx | 83 + .../components/patients/add-patient-modal.tsx | 138 + .../src/components/patients/patient-form.tsx | 309 + .../components/patients/patient-search.tsx | 185 + .../src/components/patients/patient-table.tsx | 242 + apps/Frontend/src/components/ui/accordion.tsx | 56 + .../src/components/ui/alert-dialog.tsx | 139 + apps/Frontend/src/components/ui/alert.tsx | 59 + .../src/components/ui/aspect-ratio.tsx | 5 + apps/Frontend/src/components/ui/avatar.tsx | 50 + apps/Frontend/src/components/ui/badge.tsx | 36 + .../Frontend/src/components/ui/breadcrumb.tsx | 115 + apps/Frontend/src/components/ui/button.tsx | 56 + apps/Frontend/src/components/ui/calendar.tsx | 68 + apps/Frontend/src/components/ui/card.tsx | 79 + apps/Frontend/src/components/ui/carousel.tsx | 260 + apps/Frontend/src/components/ui/chart.tsx | 365 + apps/Frontend/src/components/ui/checkbox.tsx | 28 + .../src/components/ui/collapsible.tsx | 11 + apps/Frontend/src/components/ui/command.tsx | 151 + .../src/components/ui/context-menu.tsx | 198 + .../Frontend/src/components/ui/data-table.tsx | 226 + apps/Frontend/src/components/ui/dialog.tsx | 122 + apps/Frontend/src/components/ui/drawer.tsx | 118 + .../src/components/ui/dropdown-menu.tsx | 198 + apps/Frontend/src/components/ui/form.tsx | 178 + .../Frontend/src/components/ui/hover-card.tsx | 29 + apps/Frontend/src/components/ui/input-otp.tsx | 69 + apps/Frontend/src/components/ui/input.tsx | 22 + apps/Frontend/src/components/ui/label.tsx | 24 + apps/Frontend/src/components/ui/menubar.tsx | 256 + .../src/components/ui/navigation-menu.tsx | 128 + .../Frontend/src/components/ui/pagination.tsx | 117 + apps/Frontend/src/components/ui/popover.tsx | 29 + apps/Frontend/src/components/ui/progress.tsx | 28 + .../src/components/ui/radio-group.tsx | 42 + apps/Frontend/src/components/ui/resizable.tsx | 45 + .../src/components/ui/scroll-area.tsx | 46 + apps/Frontend/src/components/ui/select.tsx | 160 + apps/Frontend/src/components/ui/separator.tsx | 29 + apps/Frontend/src/components/ui/sheet.tsx | 140 + apps/Frontend/src/components/ui/sidebar.tsx | 771 + apps/Frontend/src/components/ui/skeleton.tsx | 15 + apps/Frontend/src/components/ui/slider.tsx | 26 + apps/Frontend/src/components/ui/stat-card.tsx | 40 + apps/Frontend/src/components/ui/switch.tsx | 27 + apps/Frontend/src/components/ui/table.tsx | 117 + apps/Frontend/src/components/ui/tabs.tsx | 53 + apps/Frontend/src/components/ui/textarea.tsx | 22 + apps/Frontend/src/components/ui/toast.tsx | 127 + apps/Frontend/src/components/ui/toaster.tsx | 33 + .../src/components/ui/toggle-group.tsx | 61 + apps/Frontend/src/components/ui/toggle.tsx | 43 + apps/Frontend/src/components/ui/tooltip.tsx | 30 + apps/Frontend/src/hooks/use-auth.tsx | 106 + apps/Frontend/src/hooks/use-mobile.tsx | 19 + apps/Frontend/src/hooks/use-toast.ts | 191 + apps/Frontend/src/index.css | 3 + apps/Frontend/src/lib/protected-route.tsx | 33 + apps/Frontend/src/lib/queryClient.ts | 57 + apps/Frontend/src/lib/utils.ts | 6 + apps/Frontend/src/main.tsx | 9 + apps/Frontend/src/pages/appointments-page.tsx | 789 + apps/Frontend/src/pages/auth-page.tsx | 289 + apps/Frontend/src/pages/dashboard.tsx | 512 + apps/Frontend/src/pages/not-found.tsx | 21 + apps/Frontend/src/pages/patients-page.tsx | 425 + apps/Frontend/src/vite-env.d.ts | 1 + apps/Frontend/tsconfig.app.json | 27 + apps/Frontend/tsconfig.json | 15 + apps/Frontend/tsconfig.node.json | 25 + apps/Frontend/vite.config.ts | 7 + package-lock.json | 12230 ++++++++++++++++ package.json | 28 + packages/db/.env.example | 1 + packages/db/.gitignore | 3 + packages/db/generated/prisma/client.d.ts | 1 + packages/db/generated/prisma/client.js | 4 + packages/db/generated/prisma/default.d.ts | 1 + packages/db/generated/prisma/default.js | 4 + packages/db/generated/prisma/edge.d.ts | 1 + packages/db/generated/prisma/edge.js | 230 + packages/db/generated/prisma/index-browser.js | 216 + packages/db/generated/prisma/index.d.ts | 6674 +++++++++ packages/db/generated/prisma/index.js | 251 + packages/db/generated/prisma/package.json | 140 + .../prisma/query_engine-windows.dll.node | Bin 0 -> 20672000 bytes .../db/generated/prisma/runtime/edge-esm.js | 34 + packages/db/generated/prisma/runtime/edge.js | 34 + .../prisma/runtime/index-browser.d.ts | 370 + .../generated/prisma/runtime/index-browser.js | 16 + .../db/generated/prisma/runtime/library.d.ts | 3647 +++++ .../db/generated/prisma/runtime/library.js | 146 + .../generated/prisma/runtime/react-native.js | 83 + packages/db/generated/prisma/runtime/wasm.js | 35 + packages/db/generated/prisma/schema.prisma | 69 + packages/db/generated/prisma/wasm.d.ts | 1 + packages/db/generated/prisma/wasm.js | 216 + packages/db/package.json | 27 + .../20250508142640_init/migration.sql | 62 + .../db/prisma/migrations/migration_lock.toml | 3 + packages/db/prisma/schema.prisma | 70 + .../schemas/aggregateAppointment.schema.ts | 29 + .../shared/schemas/aggregatePatient.schema.ts | 29 + .../db/shared/schemas/aggregateUser.schema.ts | 29 + .../schemas/createManyAppointment.schema.ts | 10 + .../schemas/createManyPatient.schema.ts | 10 + .../shared/schemas/createManyUser.schema.ts | 10 + .../schemas/createOneAppointment.schema.ts | 10 + .../shared/schemas/createOnePatient.schema.ts | 10 + .../db/shared/schemas/createOneUser.schema.ts | 10 + .../schemas/deleteManyAppointment.schema.ts | 6 + .../schemas/deleteManyPatient.schema.ts | 6 + .../shared/schemas/deleteManyUser.schema.ts | 6 + .../schemas/deleteOneAppointment.schema.ts | 6 + .../shared/schemas/deleteOnePatient.schema.ts | 6 + .../db/shared/schemas/deleteOneUser.schema.ts | 6 + .../AppointmentScalarFieldEnum.schema.ts | 15 + .../shared/schemas/enums/NullsOrder.schema.ts | 3 + .../enums/PatientScalarFieldEnum.schema.ts | 23 + .../shared/schemas/enums/QueryMode.schema.ts | 3 + .../shared/schemas/enums/SortOrder.schema.ts | 3 + .../enums/TransactionIsolationLevel.schema.ts | 8 + .../enums/UserScalarFieldEnum.schema.ts | 3 + .../schemas/findFirstAppointment.schema.ts | 19 + .../shared/schemas/findFirstPatient.schema.ts | 19 + .../db/shared/schemas/findFirstUser.schema.ts | 19 + .../schemas/findManyAppointment.schema.ts | 19 + .../shared/schemas/findManyPatient.schema.ts | 19 + .../db/shared/schemas/findManyUser.schema.ts | 19 + .../schemas/findUniqueAppointment.schema.ts | 6 + .../schemas/findUniquePatient.schema.ts | 6 + .../shared/schemas/findUniqueUser.schema.ts | 6 + .../schemas/groupByAppointment.schema.ts | 19 + .../shared/schemas/groupByPatient.schema.ts | 19 + .../db/shared/schemas/groupByUser.schema.ts | 19 + packages/db/shared/schemas/index.ts | 208 + .../AppointmentAvgAggregateInput.schema.ts | 13 + ...ointmentAvgOrderByAggregateInput.schema.ts | 14 + .../AppointmentCountAggregateInput.schema.ts | 22 + ...ntmentCountOrderByAggregateInput.schema.ts | 22 + .../objects/AppointmentCreateInput.schema.ts | 24 + .../AppointmentCreateManyInput.schema.ts | 21 + ...ppointmentCreateManyPatientInput.schema.ts | 20 + ...ntCreateManyPatientInputEnvelope.schema.ts | 16 + .../AppointmentCreateManyUserInput.schema.ts | 20 + ...tmentCreateManyUserInputEnvelope.schema.ts | 16 + ...ateNestedManyWithoutPatientInput.schema.ts | 54 + ...CreateNestedManyWithoutUserInput.schema.ts | 42 + ...eateOrConnectWithoutPatientInput.schema.ts | 19 + ...tCreateOrConnectWithoutUserInput.schema.ts | 18 + ...intmentCreateWithoutPatientInput.schema.ts | 20 + ...ppointmentCreateWithoutUserInput.schema.ts | 22 + .../AppointmentListRelationFilter.schema.ts | 14 + .../AppointmentMaxAggregateInput.schema.ts | 21 + ...ointmentMaxOrderByAggregateInput.schema.ts | 22 + .../AppointmentMinAggregateInput.schema.ts | 21 + ...ointmentMinOrderByAggregateInput.schema.ts | 22 + ...entOrderByRelationAggregateInput.schema.ts | 12 + ...tmentOrderByWithAggregationInput.schema.ts | 48 + ...ointmentOrderByWithRelationInput.schema.ts | 34 + .../AppointmentScalarWhereInput.schema.ts | 62 + ...ntScalarWhereWithAggregatesInput.schema.ts | 83 + .../AppointmentSumAggregateInput.schema.ts | 13 + ...ointmentSumOrderByAggregateInput.schema.ts | 14 + .../AppointmentUncheckedCreateInput.schema.ts | 21 + ...ateNestedManyWithoutPatientInput.schema.ts | 54 + ...CreateNestedManyWithoutUserInput.schema.ts | 44 + ...checkedCreateWithoutPatientInput.schema.ts | 21 + ...tUncheckedCreateWithoutUserInput.schema.ts | 20 + .../AppointmentUncheckedUpdateInput.schema.ts | 81 + ...ointmentUncheckedUpdateManyInput.schema.ts | 81 + ...dateManyWithoutAppointmentsInput.schema.ts | 77 + ...ateManyWithoutPatientNestedInput.schema.ts | 123 + ...UpdateManyWithoutUserNestedInput.schema.ts | 110 + ...checkedUpdateWithoutPatientInput.schema.ts | 76 + ...tUncheckedUpdateWithoutUserInput.schema.ts | 75 + .../objects/AppointmentUpdateInput.schema.ts | 75 + ...pointmentUpdateManyMutationInput.schema.ts | 62 + ...ManyWithWhereWithoutPatientInput.schema.ts | 23 + ...ateManyWithWhereWithoutUserInput.schema.ts | 23 + ...ateManyWithoutPatientNestedInput.schema.ts | 123 + ...UpdateManyWithoutUserNestedInput.schema.ts | 106 + ...thWhereUniqueWithoutPatientInput.schema.ts | 20 + ...eWithWhereUniqueWithoutUserInput.schema.ts | 20 + ...intmentUpdateWithoutPatientInput.schema.ts | 68 + ...ppointmentUpdateWithoutUserInput.schema.ts | 69 + ...thWhereUniqueWithoutPatientInput.schema.ts | 26 + ...tWithWhereUniqueWithoutUserInput.schema.ts | 26 + .../objects/AppointmentWhereInput.schema.ts | 78 + .../AppointmentWhereUniqueInput.schema.ts | 11 + ...teTimeFieldUpdateOperationsInput.schema.ts | 11 + .../schemas/objects/DateTimeFilter.schema.ts | 21 + .../DateTimeWithAggregatesFilter.schema.ts | 29 + .../IntFieldUpdateOperationsInput.schema.ts | 15 + .../schemas/objects/IntFilter.schema.ts | 21 + .../objects/IntWithAggregatesFilter.schema.ts | 31 + .../objects/NestedDateTimeFilter.schema.ts | 20 + ...stedDateTimeWithAggregatesFilter.schema.ts | 28 + .../objects/NestedFloatFilter.schema.ts | 20 + .../schemas/objects/NestedIntFilter.schema.ts | 20 + .../objects/NestedIntNullableFilter.schema.ts | 21 + .../NestedIntWithAggregatesFilter.schema.ts | 30 + .../objects/NestedStringFilter.schema.ts | 23 + .../NestedStringNullableFilter.schema.ts | 24 + ...ringNullableWithAggregatesFilter.schema.ts | 32 + ...NestedStringWithAggregatesFilter.schema.ts | 31 + ...StringFieldUpdateOperationsInput.schema.ts | 11 + .../PatientAvgAggregateInput.schema.ts | 12 + .../PatientAvgOrderByAggregateInput.schema.ts | 13 + .../PatientCountAggregateInput.schema.ts | 30 + ...atientCountOrderByAggregateInput.schema.ts | 30 + .../objects/PatientCreateInput.schema.ts | 33 + .../objects/PatientCreateManyInput.schema.ts | 29 + .../PatientCreateManyUserInput.schema.ts | 28 + ...tientCreateManyUserInputEnvelope.schema.ts | 16 + ...CreateNestedManyWithoutUserInput.schema.ts | 42 + ...estedOneWithoutAppointmentsInput.schema.ts | 28 + ...rConnectWithoutAppointmentsInput.schema.ts | 22 + ...tCreateOrConnectWithoutUserInput.schema.ts | 18 + ...ntCreateWithoutAppointmentsInput.schema.ts | 29 + .../PatientCreateWithoutUserInput.schema.ts | 31 + .../PatientListRelationFilter.schema.ts | 14 + .../PatientMaxAggregateInput.schema.ts | 29 + .../PatientMaxOrderByAggregateInput.schema.ts | 30 + .../PatientMinAggregateInput.schema.ts | 29 + .../PatientMinOrderByAggregateInput.schema.ts | 30 + ...entOrderByRelationAggregateInput.schema.ts | 12 + ...tientOrderByWithAggregationInput.schema.ts | 93 + .../PatientOrderByWithRelationInput.schema.ts | 87 + .../objects/PatientRelationFilter.schema.ts | 19 + .../objects/PatientScalarWhereInput.schema.ts | 95 + ...ntScalarWhereWithAggregatesInput.schema.ts | 133 + .../PatientSumAggregateInput.schema.ts | 12 + .../PatientSumOrderByAggregateInput.schema.ts | 13 + .../PatientUncheckedCreateInput.schema.ts | 36 + ...CreateNestedManyWithoutUserInput.schema.ts | 44 + ...edCreateWithoutAppointmentsInput.schema.ts | 31 + ...tUncheckedCreateWithoutUserInput.schema.ts | 35 + .../PatientUncheckedUpdateInput.schema.ts | 145 + .../PatientUncheckedUpdateManyInput.schema.ts | 138 + ...edUpdateManyWithoutPatientsInput.schema.ts | 134 + ...UpdateManyWithoutUserNestedInput.schema.ts | 104 + ...edUpdateWithoutAppointmentsInput.schema.ts | 140 + ...tUncheckedUpdateWithoutUserInput.schema.ts | 139 + .../objects/PatientUpdateInput.schema.ts | 133 + .../PatientUpdateManyMutationInput.schema.ts | 125 + ...ateManyWithWhereWithoutUserInput.schema.ts | 18 + ...UpdateManyWithoutUserNestedInput.schema.ts | 94 + ...edWithoutAppointmentsNestedInput.schema.ts | 42 + ...eWithWhereUniqueWithoutUserInput.schema.ts | 18 + ...ntUpdateWithoutAppointmentsInput.schema.ts | 129 + .../PatientUpdateWithoutUserInput.schema.ts | 129 + ...tWithWhereUniqueWithoutUserInput.schema.ts | 24 + ...ntUpsertWithoutAppointmentsInput.schema.ts | 22 + .../objects/PatientWhereInput.schema.ts | 107 + .../objects/PatientWhereUniqueInput.schema.ts | 11 + .../schemas/objects/SortOrderInput.schema.ts | 14 + ...StringFieldUpdateOperationsInput.schema.ts | 11 + .../schemas/objects/StringFilter.schema.ts | 26 + .../objects/StringNullableFilter.schema.ts | 27 + ...ringNullableWithAggregatesFilter.schema.ts | 35 + .../StringWithAggregatesFilter.schema.ts | 34 + .../objects/UserAvgAggregateInput.schema.ts | 11 + .../UserAvgOrderByAggregateInput.schema.ts | 12 + .../objects/UserCountAggregateInput.schema.ts | 14 + .../UserCountOrderByAggregateInput.schema.ts | 14 + .../schemas/objects/UserCreateInput.schema.ts | 20 + .../objects/UserCreateManyInput.schema.ts | 13 + ...estedOneWithoutAppointmentsInput.schema.ts | 24 + ...ateNestedOneWithoutPatientsInput.schema.ts | 24 + ...rConnectWithoutAppointmentsInput.schema.ts | 18 + ...ateOrConnectWithoutPatientsInput.schema.ts | 18 + ...erCreateWithoutAppointmentsInput.schema.ts | 16 + .../UserCreateWithoutPatientsInput.schema.ts | 16 + .../objects/UserMaxAggregateInput.schema.ts | 13 + .../UserMaxOrderByAggregateInput.schema.ts | 14 + .../objects/UserMinAggregateInput.schema.ts | 13 + .../UserMinOrderByAggregateInput.schema.ts | 14 + .../UserOrderByWithAggregationInput.schema.ts | 24 + .../UserOrderByWithRelationInput.schema.ts | 22 + .../objects/UserRelationFilter.schema.ts | 19 + ...erScalarWhereWithAggregatesInput.schema.ts | 37 + .../objects/UserSumAggregateInput.schema.ts | 11 + .../UserSumOrderByAggregateInput.schema.ts | 12 + .../UserUncheckedCreateInput.schema.ts | 23 + ...edCreateWithoutAppointmentsInput.schema.ts | 17 + ...heckedCreateWithoutPatientsInput.schema.ts | 19 + .../UserUncheckedUpdateInput.schema.ts | 40 + .../UserUncheckedUpdateManyInput.schema.ts | 30 + ...edUpdateWithoutAppointmentsInput.schema.ts | 34 + ...heckedUpdateWithoutPatientsInput.schema.ts | 36 + .../schemas/objects/UserUpdateInput.schema.ts | 31 + .../UserUpdateManyMutationInput.schema.ts | 23 + ...edWithoutAppointmentsNestedInput.schema.ts | 38 + ...quiredWithoutPatientsNestedInput.schema.ts | 38 + ...erUpdateWithoutAppointmentsInput.schema.ts | 27 + .../UserUpdateWithoutPatientsInput.schema.ts | 27 + ...erUpsertWithoutAppointmentsInput.schema.ts | 22 + .../UserUpsertWithoutPatientsInput.schema.ts | 22 + .../schemas/objects/UserWhereInput.schema.ts | 41 + .../objects/UserWhereUniqueInput.schema.ts | 12 + .../schemas/updateManyAppointment.schema.ts | 8 + .../schemas/updateManyPatient.schema.ts | 8 + .../shared/schemas/updateManyUser.schema.ts | 8 + .../schemas/updateOneAppointment.schema.ts | 12 + .../shared/schemas/updateOnePatient.schema.ts | 12 + .../db/shared/schemas/updateOneUser.schema.ts | 12 + .../schemas/upsertOneAppointment.schema.ts | 18 + .../shared/schemas/upsertOnePatient.schema.ts | 18 + .../db/shared/schemas/upsertOneUser.schema.ts | 18 + packages/db/src/index.ts | 8 + packages/db/src/schema_todelete.txt | 85 + packages/db/tsconfig.json | 113 + packages/eslint-config/README.md | 3 + packages/eslint-config/base.js | 32 + packages/eslint-config/next.js | 49 + packages/eslint-config/package.json | 24 + packages/eslint-config/react-internal.js | 39 + packages/tailwind-config/package.json | 14 + packages/tailwind-config/postcss.config.js | 6 + packages/tailwind-config/shared-styles.css | 7 + packages/typescript-config/base.json | 19 + packages/typescript-config/nextjs.json | 12 + packages/typescript-config/package.json | 9 + packages/typescript-config/react-library.json | 7 + turbo.json | 21 + 343 files changed, 42391 insertions(+) create mode 100644 .gitignore create mode 100644 .npmrc create mode 100644 README.md create mode 100644 apps/Frontend/.gitignore create mode 100644 apps/Frontend/README.md create mode 100644 apps/Frontend/eslint.config.js create mode 100644 apps/Frontend/index.html create mode 100644 apps/Frontend/package.json create mode 100644 apps/Frontend/src/App.tsx create mode 100644 apps/Frontend/src/components/appointments/add-appointment-modal.tsx create mode 100644 apps/Frontend/src/components/appointments/appointment-form.tsx create mode 100644 apps/Frontend/src/components/appointments/appointment-table.tsx create mode 100644 apps/Frontend/src/components/claims/claim-form.tsx create mode 100644 apps/Frontend/src/components/claims/claim-modal.tsx create mode 100644 apps/Frontend/src/components/file-upload/file-upload-zone.tsx create mode 100644 apps/Frontend/src/components/layout/sidebar.tsx create mode 100644 apps/Frontend/src/components/layout/top-app-bar.tsx create mode 100644 apps/Frontend/src/components/patients/add-patient-modal.tsx create mode 100644 apps/Frontend/src/components/patients/patient-form.tsx create mode 100644 apps/Frontend/src/components/patients/patient-search.tsx create mode 100644 apps/Frontend/src/components/patients/patient-table.tsx create mode 100644 apps/Frontend/src/components/ui/accordion.tsx create mode 100644 apps/Frontend/src/components/ui/alert-dialog.tsx create mode 100644 apps/Frontend/src/components/ui/alert.tsx create mode 100644 apps/Frontend/src/components/ui/aspect-ratio.tsx create mode 100644 apps/Frontend/src/components/ui/avatar.tsx create mode 100644 apps/Frontend/src/components/ui/badge.tsx create mode 100644 apps/Frontend/src/components/ui/breadcrumb.tsx create mode 100644 apps/Frontend/src/components/ui/button.tsx create mode 100644 apps/Frontend/src/components/ui/calendar.tsx create mode 100644 apps/Frontend/src/components/ui/card.tsx create mode 100644 apps/Frontend/src/components/ui/carousel.tsx create mode 100644 apps/Frontend/src/components/ui/chart.tsx create mode 100644 apps/Frontend/src/components/ui/checkbox.tsx create mode 100644 apps/Frontend/src/components/ui/collapsible.tsx create mode 100644 apps/Frontend/src/components/ui/command.tsx create mode 100644 apps/Frontend/src/components/ui/context-menu.tsx create mode 100644 apps/Frontend/src/components/ui/data-table.tsx create mode 100644 apps/Frontend/src/components/ui/dialog.tsx create mode 100644 apps/Frontend/src/components/ui/drawer.tsx create mode 100644 apps/Frontend/src/components/ui/dropdown-menu.tsx create mode 100644 apps/Frontend/src/components/ui/form.tsx create mode 100644 apps/Frontend/src/components/ui/hover-card.tsx create mode 100644 apps/Frontend/src/components/ui/input-otp.tsx create mode 100644 apps/Frontend/src/components/ui/input.tsx create mode 100644 apps/Frontend/src/components/ui/label.tsx create mode 100644 apps/Frontend/src/components/ui/menubar.tsx create mode 100644 apps/Frontend/src/components/ui/navigation-menu.tsx create mode 100644 apps/Frontend/src/components/ui/pagination.tsx create mode 100644 apps/Frontend/src/components/ui/popover.tsx create mode 100644 apps/Frontend/src/components/ui/progress.tsx create mode 100644 apps/Frontend/src/components/ui/radio-group.tsx create mode 100644 apps/Frontend/src/components/ui/resizable.tsx create mode 100644 apps/Frontend/src/components/ui/scroll-area.tsx create mode 100644 apps/Frontend/src/components/ui/select.tsx create mode 100644 apps/Frontend/src/components/ui/separator.tsx create mode 100644 apps/Frontend/src/components/ui/sheet.tsx create mode 100644 apps/Frontend/src/components/ui/sidebar.tsx create mode 100644 apps/Frontend/src/components/ui/skeleton.tsx create mode 100644 apps/Frontend/src/components/ui/slider.tsx create mode 100644 apps/Frontend/src/components/ui/stat-card.tsx create mode 100644 apps/Frontend/src/components/ui/switch.tsx create mode 100644 apps/Frontend/src/components/ui/table.tsx create mode 100644 apps/Frontend/src/components/ui/tabs.tsx create mode 100644 apps/Frontend/src/components/ui/textarea.tsx create mode 100644 apps/Frontend/src/components/ui/toast.tsx create mode 100644 apps/Frontend/src/components/ui/toaster.tsx create mode 100644 apps/Frontend/src/components/ui/toggle-group.tsx create mode 100644 apps/Frontend/src/components/ui/toggle.tsx create mode 100644 apps/Frontend/src/components/ui/tooltip.tsx create mode 100644 apps/Frontend/src/hooks/use-auth.tsx create mode 100644 apps/Frontend/src/hooks/use-mobile.tsx create mode 100644 apps/Frontend/src/hooks/use-toast.ts create mode 100644 apps/Frontend/src/index.css create mode 100644 apps/Frontend/src/lib/protected-route.tsx create mode 100644 apps/Frontend/src/lib/queryClient.ts create mode 100644 apps/Frontend/src/lib/utils.ts create mode 100644 apps/Frontend/src/main.tsx create mode 100644 apps/Frontend/src/pages/appointments-page.tsx create mode 100644 apps/Frontend/src/pages/auth-page.tsx create mode 100644 apps/Frontend/src/pages/dashboard.tsx create mode 100644 apps/Frontend/src/pages/not-found.tsx create mode 100644 apps/Frontend/src/pages/patients-page.tsx create mode 100644 apps/Frontend/src/vite-env.d.ts create mode 100644 apps/Frontend/tsconfig.app.json create mode 100644 apps/Frontend/tsconfig.json create mode 100644 apps/Frontend/tsconfig.node.json create mode 100644 apps/Frontend/vite.config.ts create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 packages/db/.env.example create mode 100644 packages/db/.gitignore create mode 100644 packages/db/generated/prisma/client.d.ts create mode 100644 packages/db/generated/prisma/client.js create mode 100644 packages/db/generated/prisma/default.d.ts create mode 100644 packages/db/generated/prisma/default.js create mode 100644 packages/db/generated/prisma/edge.d.ts create mode 100644 packages/db/generated/prisma/edge.js create mode 100644 packages/db/generated/prisma/index-browser.js create mode 100644 packages/db/generated/prisma/index.d.ts create mode 100644 packages/db/generated/prisma/index.js create mode 100644 packages/db/generated/prisma/package.json create mode 100644 packages/db/generated/prisma/query_engine-windows.dll.node create mode 100644 packages/db/generated/prisma/runtime/edge-esm.js create mode 100644 packages/db/generated/prisma/runtime/edge.js create mode 100644 packages/db/generated/prisma/runtime/index-browser.d.ts create mode 100644 packages/db/generated/prisma/runtime/index-browser.js create mode 100644 packages/db/generated/prisma/runtime/library.d.ts create mode 100644 packages/db/generated/prisma/runtime/library.js create mode 100644 packages/db/generated/prisma/runtime/react-native.js create mode 100644 packages/db/generated/prisma/runtime/wasm.js create mode 100644 packages/db/generated/prisma/schema.prisma create mode 100644 packages/db/generated/prisma/wasm.d.ts create mode 100644 packages/db/generated/prisma/wasm.js create mode 100644 packages/db/package.json create mode 100644 packages/db/prisma/migrations/20250508142640_init/migration.sql create mode 100644 packages/db/prisma/migrations/migration_lock.toml create mode 100644 packages/db/prisma/schema.prisma create mode 100644 packages/db/shared/schemas/aggregateAppointment.schema.ts create mode 100644 packages/db/shared/schemas/aggregatePatient.schema.ts create mode 100644 packages/db/shared/schemas/aggregateUser.schema.ts create mode 100644 packages/db/shared/schemas/createManyAppointment.schema.ts create mode 100644 packages/db/shared/schemas/createManyPatient.schema.ts create mode 100644 packages/db/shared/schemas/createManyUser.schema.ts create mode 100644 packages/db/shared/schemas/createOneAppointment.schema.ts create mode 100644 packages/db/shared/schemas/createOnePatient.schema.ts create mode 100644 packages/db/shared/schemas/createOneUser.schema.ts create mode 100644 packages/db/shared/schemas/deleteManyAppointment.schema.ts create mode 100644 packages/db/shared/schemas/deleteManyPatient.schema.ts create mode 100644 packages/db/shared/schemas/deleteManyUser.schema.ts create mode 100644 packages/db/shared/schemas/deleteOneAppointment.schema.ts create mode 100644 packages/db/shared/schemas/deleteOnePatient.schema.ts create mode 100644 packages/db/shared/schemas/deleteOneUser.schema.ts create mode 100644 packages/db/shared/schemas/enums/AppointmentScalarFieldEnum.schema.ts create mode 100644 packages/db/shared/schemas/enums/NullsOrder.schema.ts create mode 100644 packages/db/shared/schemas/enums/PatientScalarFieldEnum.schema.ts create mode 100644 packages/db/shared/schemas/enums/QueryMode.schema.ts create mode 100644 packages/db/shared/schemas/enums/SortOrder.schema.ts create mode 100644 packages/db/shared/schemas/enums/TransactionIsolationLevel.schema.ts create mode 100644 packages/db/shared/schemas/enums/UserScalarFieldEnum.schema.ts create mode 100644 packages/db/shared/schemas/findFirstAppointment.schema.ts create mode 100644 packages/db/shared/schemas/findFirstPatient.schema.ts create mode 100644 packages/db/shared/schemas/findFirstUser.schema.ts create mode 100644 packages/db/shared/schemas/findManyAppointment.schema.ts create mode 100644 packages/db/shared/schemas/findManyPatient.schema.ts create mode 100644 packages/db/shared/schemas/findManyUser.schema.ts create mode 100644 packages/db/shared/schemas/findUniqueAppointment.schema.ts create mode 100644 packages/db/shared/schemas/findUniquePatient.schema.ts create mode 100644 packages/db/shared/schemas/findUniqueUser.schema.ts create mode 100644 packages/db/shared/schemas/groupByAppointment.schema.ts create mode 100644 packages/db/shared/schemas/groupByPatient.schema.ts create mode 100644 packages/db/shared/schemas/groupByUser.schema.ts create mode 100644 packages/db/shared/schemas/index.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentAvgAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentAvgOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCountAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCountOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateManyInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateManyPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateManyPatientInputEnvelope.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateManyUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateManyUserInputEnvelope.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateNestedManyWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateNestedManyWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateOrConnectWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateOrConnectWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentCreateWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentListRelationFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentMaxAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentMaxOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentMinAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentMinOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentOrderByRelationAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentOrderByWithAggregationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentOrderByWithRelationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentScalarWhereInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentScalarWhereWithAggregatesInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentSumAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentSumOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedCreateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedCreateNestedManyWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedCreateNestedManyWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedCreateWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedCreateWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedUpdateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedUpdateManyInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedUpdateManyWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedUpdateManyWithoutPatientNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedUpdateManyWithoutUserNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedUpdateWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUncheckedUpdateWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateManyMutationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateManyWithWhereWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateManyWithWhereWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateManyWithoutPatientNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateManyWithoutUserNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateWithWhereUniqueWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateWithWhereUniqueWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpdateWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpsertWithWhereUniqueWithoutPatientInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentUpsertWithWhereUniqueWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentWhereInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/AppointmentWhereUniqueInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/DateTimeFieldUpdateOperationsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/DateTimeFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/DateTimeWithAggregatesFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/IntFieldUpdateOperationsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/IntFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/IntWithAggregatesFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedDateTimeFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedDateTimeWithAggregatesFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedFloatFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedIntFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedIntNullableFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedIntWithAggregatesFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedStringFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedStringNullableFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedStringNullableWithAggregatesFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NestedStringWithAggregatesFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/NullableStringFieldUpdateOperationsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientAvgAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientAvgOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCountAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCountOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateManyInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateManyUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateManyUserInputEnvelope.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateNestedManyWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateNestedOneWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateOrConnectWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateOrConnectWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientCreateWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientListRelationFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientMaxAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientMaxOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientMinAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientMinOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientOrderByRelationAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientOrderByWithAggregationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientOrderByWithRelationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientRelationFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientScalarWhereInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientScalarWhereWithAggregatesInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientSumAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientSumOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedCreateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedCreateNestedManyWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedCreateWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedCreateWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedUpdateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedUpdateManyInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedUpdateManyWithoutPatientsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedUpdateManyWithoutUserNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedUpdateWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUncheckedUpdateWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpdateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpdateManyMutationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpdateManyWithWhereWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpdateManyWithoutUserNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpdateOneRequiredWithoutAppointmentsNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpdateWithWhereUniqueWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpdateWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpdateWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpsertWithWhereUniqueWithoutUserInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientUpsertWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientWhereInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/PatientWhereUniqueInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/SortOrderInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/StringFieldUpdateOperationsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/StringFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/StringNullableFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/StringNullableWithAggregatesFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/StringWithAggregatesFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserAvgAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserAvgOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCountAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCountOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCreateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCreateManyInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCreateNestedOneWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCreateNestedOneWithoutPatientsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCreateOrConnectWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCreateOrConnectWithoutPatientsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCreateWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserCreateWithoutPatientsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserMaxAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserMaxOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserMinAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserMinOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserOrderByWithAggregationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserOrderByWithRelationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserRelationFilter.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserScalarWhereWithAggregatesInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserSumAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserSumOrderByAggregateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUncheckedCreateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUncheckedCreateWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUncheckedCreateWithoutPatientsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUncheckedUpdateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUncheckedUpdateManyInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUncheckedUpdateWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUncheckedUpdateWithoutPatientsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUpdateInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUpdateManyMutationInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUpdateOneRequiredWithoutAppointmentsNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUpdateOneRequiredWithoutPatientsNestedInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUpdateWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUpdateWithoutPatientsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUpsertWithoutAppointmentsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserUpsertWithoutPatientsInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserWhereInput.schema.ts create mode 100644 packages/db/shared/schemas/objects/UserWhereUniqueInput.schema.ts create mode 100644 packages/db/shared/schemas/updateManyAppointment.schema.ts create mode 100644 packages/db/shared/schemas/updateManyPatient.schema.ts create mode 100644 packages/db/shared/schemas/updateManyUser.schema.ts create mode 100644 packages/db/shared/schemas/updateOneAppointment.schema.ts create mode 100644 packages/db/shared/schemas/updateOnePatient.schema.ts create mode 100644 packages/db/shared/schemas/updateOneUser.schema.ts create mode 100644 packages/db/shared/schemas/upsertOneAppointment.schema.ts create mode 100644 packages/db/shared/schemas/upsertOnePatient.schema.ts create mode 100644 packages/db/shared/schemas/upsertOneUser.schema.ts create mode 100644 packages/db/src/index.ts create mode 100644 packages/db/src/schema_todelete.txt create mode 100644 packages/db/tsconfig.json create mode 100644 packages/eslint-config/README.md create mode 100644 packages/eslint-config/base.js create mode 100644 packages/eslint-config/next.js create mode 100644 packages/eslint-config/package.json create mode 100644 packages/eslint-config/react-internal.js create mode 100644 packages/tailwind-config/package.json create mode 100644 packages/tailwind-config/postcss.config.js create mode 100644 packages/tailwind-config/shared-styles.css create mode 100644 packages/typescript-config/base.json create mode 100644 packages/typescript-config/nextjs.json create mode 100644 packages/typescript-config/package.json create mode 100644 packages/typescript-config/react-library.json create mode 100644 turbo.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b93444e --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +node_modules +.pnp +.pnp.js + +# testing +coverage + +# next.js +.next/ +out/ +build +.swc/ + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# turbo +.turbo + +# ui +dist/ + +# env +*.env \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..ded82e2 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +auto-install-peers = true diff --git a/README.md b/README.md new file mode 100644 index 0000000..438763d --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +# Turborepo Tailwind CSS starter + +This Turborepo starter is maintained by the Turborepo core team. + +## Using this example + +Run the following command: + +```sh +npx create-turbo@latest -e with-tailwind +``` + +## What's inside? + +This Turborepo includes the following packages/apps: + +### Apps and Packages + +- `docs`: a [Next.js](https://nextjs.org/) app with [Tailwind CSS](https://tailwindcss.com/) +- `web`: another [Next.js](https://nextjs.org/) app with [Tailwind CSS](https://tailwindcss.com/) +- `ui`: a stub React component library with [Tailwind CSS](https://tailwindcss.com/) shared by both `web` and `docs` applications +- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) +- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo + +Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). + +### Building packages/ui + +This example is set up to produce compiled styles for `ui` components into the `dist` directory. The component `.tsx` files are consumed by the Next.js apps directly using `transpilePackages` in `next.config.ts`. This was chosen for several reasons: + +- Make sharing one `tailwind.config.ts` to apps and packages as easy as possible. +- Make package compilation simple by only depending on the Next.js Compiler and `tailwindcss`. +- Ensure Tailwind classes do not overwrite each other. The `ui` package uses a `ui-` prefix for it's classes. +- Maintain clear package export boundaries. + +Another option is to consume `packages/ui` directly from source without building. If using this option, you will need to update the `tailwind.config.ts` in your apps to be aware of your package locations, so it can find all usages of the `tailwindcss` class names for CSS compilation. + +For example, in [tailwind.config.ts](packages/tailwind-config/tailwind.config.ts): + +```js + content: [ + // app content + `src/**/*.{js,ts,jsx,tsx}`, + // include packages if not transpiling + "../../packages/ui/*.{js,ts,jsx,tsx}", + ], +``` + +If you choose this strategy, you can remove the `tailwindcss` and `autoprefixer` dependencies from the `ui` package. + +### Utilities + +This Turborepo has some additional tools already setup for you: + +- [Tailwind CSS](https://tailwindcss.com/) for styles +- [TypeScript](https://www.typescriptlang.org/) for static type checking +- [ESLint](https://eslint.org/) for code linting +- [Prettier](https://prettier.io) for code formatting diff --git a/apps/Frontend/.gitignore b/apps/Frontend/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/apps/Frontend/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/apps/Frontend/README.md b/apps/Frontend/README.md new file mode 100644 index 0000000..da98444 --- /dev/null +++ b/apps/Frontend/README.md @@ -0,0 +1,54 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: + +```js +export default tseslint.config({ + extends: [ + // Remove ...tseslint.configs.recommended and replace with this + ...tseslint.configs.recommendedTypeChecked, + // Alternatively, use this for stricter rules + ...tseslint.configs.strictTypeChecked, + // Optionally, add this for stylistic rules + ...tseslint.configs.stylisticTypeChecked, + ], + languageOptions: { + // other options... + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + }, +}) +``` + +You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: + +```js +// eslint.config.js +import reactX from 'eslint-plugin-react-x' +import reactDom from 'eslint-plugin-react-dom' + +export default tseslint.config({ + plugins: { + // Add the react-x and react-dom plugins + 'react-x': reactX, + 'react-dom': reactDom, + }, + rules: { + // other rules... + // Enable its recommended typescript rules + ...reactX.configs['recommended-typescript'].rules, + ...reactDom.configs.recommended.rules, + }, +}) +``` diff --git a/apps/Frontend/eslint.config.js b/apps/Frontend/eslint.config.js new file mode 100644 index 0000000..092408a --- /dev/null +++ b/apps/Frontend/eslint.config.js @@ -0,0 +1,28 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' + +export default tseslint.config( + { ignores: ['dist'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + }, +) diff --git a/apps/Frontend/index.html b/apps/Frontend/index.html new file mode 100644 index 0000000..e4b78ea --- /dev/null +++ b/apps/Frontend/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/apps/Frontend/package.json b/apps/Frontend/package.json new file mode 100644 index 0000000..d075fe5 --- /dev/null +++ b/apps/Frontend/package.json @@ -0,0 +1,94 @@ +{ + "name": "frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "@repo/ui": "*", + "@repo/db": "*", + "@hookform/resolvers": "^3.10.0", + "@jridgewell/trace-mapping": "^0.3.25", + "@radix-ui/react-accordion": "^1.2.4", + "@radix-ui/react-alert-dialog": "^1.1.7", + "@radix-ui/react-aspect-ratio": "^1.1.3", + "@radix-ui/react-avatar": "^1.1.4", + "@radix-ui/react-checkbox": "^1.1.5", + "@radix-ui/react-collapsible": "^1.1.4", + "@radix-ui/react-context-menu": "^2.2.7", + "@radix-ui/react-dialog": "^1.1.7", + "@radix-ui/react-dropdown-menu": "^2.1.7", + "@radix-ui/react-hover-card": "^1.1.7", + "@radix-ui/react-label": "^2.1.3", + "@radix-ui/react-menubar": "^1.1.7", + "@radix-ui/react-navigation-menu": "^1.2.6", + "@radix-ui/react-popover": "^1.1.7", + "@radix-ui/react-progress": "^1.1.3", + "@radix-ui/react-radio-group": "^1.2.4", + "@radix-ui/react-scroll-area": "^1.2.4", + "@radix-ui/react-select": "^2.1.7", + "@radix-ui/react-separator": "^1.1.3", + "@radix-ui/react-slider": "^1.2.4", + "@radix-ui/react-slot": "^1.2.0", + "@radix-ui/react-switch": "^1.1.4", + "@radix-ui/react-tabs": "^1.1.4", + "@radix-ui/react-toast": "^1.2.7", + "@radix-ui/react-toggle": "^1.1.3", + "@radix-ui/react-toggle-group": "^1.1.3", + "@radix-ui/react-tooltip": "^1.2.0", + "@replit/vite-plugin-shadcn-theme-json": "^0.0.4", + "@tailwindcss/vite": "^4.1.3", + "@tanstack/react-query": "^5.60.5", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cmdk": "^1.1.1", + "connect-pg-simple": "^10.0.0", + "cross-env": "^7.0.3", + "date-fns": "^4.1.0", + "dotenv": "^16.5.0", + "embla-carousel-react": "^8.6.0", + "framer-motion": "^11.13.1", + "input-otp": "^1.4.2", + "lucide-react": "^0.453.0", + "memorystore": "^1.6.7", + "next-themes": "^0.4.6", + "passport": "^0.7.0", + "passport-local": "^1.0.0", + "react": "^19.1.0", + "react-contexify": "^6.0.0", + "react-day-picker": "^8.10.1", + "react-dnd": "^16.0.1", + "react-dnd-html5-backend": "^16.0.1", + "react-dom": "^19.1.0", + "react-hook-form": "^7.55.0", + "react-icons": "^5.4.0", + "react-resizable-panels": "^2.1.7", + "recharts": "^2.15.2", + "tailwind-merge": "^2.6.0", + "tailwindcss-animate": "^1.0.7", + "tw-animate-css": "^1.2.5", + "vaul": "^1.1.2", + "wouter": "^3.7.0", + "ws": "^8.18.0", + "zod": "^3.24.2", + "zod-validation-error": "^3.4.0" + }, + "devDependencies": { + "@eslint/js": "^9.25.0", + "@types/react": "^19.1.2", + "@types/react-dom": "^19.1.2", + "@vitejs/plugin-react": "^4.4.1", + "eslint": "^9.25.0", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-react-refresh": "^0.4.19", + "globals": "^16.0.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.30.1", + "vite": "^6.3.5" + } +} diff --git a/apps/Frontend/src/App.tsx b/apps/Frontend/src/App.tsx new file mode 100644 index 0000000..7ba67ab --- /dev/null +++ b/apps/Frontend/src/App.tsx @@ -0,0 +1,39 @@ +import { Switch, Route } from "wouter"; +import { queryClient } from "./lib/queryClient"; +import { QueryClientProvider } from "@tanstack/react-query"; +import { Toaster } from "./components/ui/toaster"; +import { TooltipProvider } from "./components/ui/tooltip"; +import NotFound from "./pages/not-found"; +import Dashboard from "./pages/dashboard"; +import AuthPage from "./pages/auth-page"; +import AppointmentsPage from "./pages/appointments-page"; +import PatientsPage from "./pages/patients-page"; +import { ProtectedRoute } from "./lib/protected-route"; +import { AuthProvider } from "./hooks/use-auth"; + +function Router() { + return ( + + + + + + + + ); +} + +function App() { + return ( + + + + + + + + + ); +} + +export default App; diff --git a/apps/Frontend/src/components/appointments/add-appointment-modal.tsx b/apps/Frontend/src/components/appointments/add-appointment-modal.tsx new file mode 100644 index 0000000..1d1bd74 --- /dev/null +++ b/apps/Frontend/src/components/appointments/add-appointment-modal.tsx @@ -0,0 +1,45 @@ +import { useState } from "react"; +import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; +import { AppointmentForm } from "./appointment-form"; +import { Appointment, InsertAppointment, UpdateAppointment, Patient } from "@shared/schema"; + +interface AddAppointmentModalProps { + open: boolean; + onOpenChange: (open: boolean) => void; + onSubmit: (data: InsertAppointment | UpdateAppointment) => void; + isLoading: boolean; + appointment?: Appointment; + patients: Patient[]; +} + +export function AddAppointmentModal({ + open, + onOpenChange, + onSubmit, + isLoading, + appointment, + patients, +}: AddAppointmentModalProps) { + return ( + + + + + {appointment ? "Edit Appointment" : "Add New Appointment"} + + +
+ { + onSubmit(data); + onOpenChange(false); + }} + isLoading={isLoading} + /> +
+
+
+ ); +} \ No newline at end of file diff --git a/apps/Frontend/src/components/appointments/appointment-form.tsx b/apps/Frontend/src/components/appointments/appointment-form.tsx new file mode 100644 index 0000000..7d6cc6e --- /dev/null +++ b/apps/Frontend/src/components/appointments/appointment-form.tsx @@ -0,0 +1,462 @@ +import { useState, useEffect } from "react"; +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { z } from "zod"; +import { format } from "date-fns"; +import { InsertAppointment, UpdateAppointment, Appointment, Patient } from "@shared/schema"; + +// Define staff members (should match those in appointments-page.tsx) +const staffMembers = [ + { id: "doctor1", name: "Dr. Kai Gao", role: "doctor" }, + { id: "doctor2", name: "Dr. Jane Smith", role: "doctor" }, + { id: "hygienist1", name: "Hygienist One", role: "hygienist" }, + { id: "hygienist2", name: "Hygienist Two", role: "hygienist" }, + { id: "hygienist3", name: "Hygienist Three", role: "hygienist" }, +]; +import { Button } from "@/components/ui/button"; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Calendar } from "@/components/ui/calendar"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { CalendarIcon, Clock } from "lucide-react"; +import { cn } from "@/lib/utils"; + +// Create a schema for appointment validation +const appointmentSchema = z.object({ + patientId: z.coerce.number().positive(), + title: z.string().optional(), + date: z.date({ + required_error: "Appointment date is required", + }), + startTime: z.string().regex(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/, { + message: "Start time must be in format HH:MM", + }), + endTime: z.string().regex(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/, { + message: "End time must be in format HH:MM", + }), + type: z.string().min(1, "Appointment type is required"), + notes: z.string().optional(), + status: z.string().default("scheduled"), + staff: z.string().default(staffMembers[0].id), +}); + +export type AppointmentFormValues = z.infer; + +interface AppointmentFormProps { + appointment?: Appointment; + patients: Patient[]; + onSubmit: (data: InsertAppointment | UpdateAppointment) => void; + isLoading?: boolean; +} + +export function AppointmentForm({ + appointment, + patients, + onSubmit, + isLoading = false +}: AppointmentFormProps) { + // Get the stored data from session storage + const storedDataString = sessionStorage.getItem('newAppointmentData'); + let parsedStoredData = null; + + // Try to parse it if it exists + if (storedDataString) { + try { + parsedStoredData = JSON.parse(storedDataString); + console.log('Initial appointment data from storage:', parsedStoredData); + + // LOG the specific time values for debugging + console.log('Time values in stored data:', { + startTime: parsedStoredData.startTime, + endTime: parsedStoredData.endTime + }); + } catch (error) { + console.error('Error parsing stored appointment data:', error); + } + } + + // Format the date and times for the form + const defaultValues: Partial = appointment + ? { + patientId: appointment.patientId, + title: appointment.title, + date: new Date(appointment.date), + startTime: appointment.startTime.slice(0, 5), // HH:MM from HH:MM:SS + endTime: appointment.endTime.slice(0, 5), // HH:MM from HH:MM:SS + type: appointment.type, + notes: appointment.notes || "", + status: appointment.status || "scheduled", + } + : parsedStoredData + ? { + patientId: parsedStoredData.patientId, + date: new Date(parsedStoredData.date), + title: parsedStoredData.title || "", + startTime: parsedStoredData.startTime, // This should now be correctly applied + endTime: parsedStoredData.endTime, + type: parsedStoredData.type || "checkup", + status: parsedStoredData.status || "scheduled", + notes: parsedStoredData.notes || "", + staff: parsedStoredData.staff || staffMembers[0].id, + } + : { + date: new Date(), + title: "", + startTime: "09:00", + endTime: "09:30", + type: "checkup", + status: "scheduled", + staff: "doctor1", + }; + + const form = useForm({ + resolver: zodResolver(appointmentSchema), + defaultValues, + }); + + // Force form field values to update and clean up storage + useEffect(() => { + if (parsedStoredData) { + // Force-update the form with the stored values + console.log("Force updating form fields with:", parsedStoredData); + + // Update form field values directly + if (parsedStoredData.startTime) { + form.setValue('startTime', parsedStoredData.startTime); + console.log(`Setting startTime to: ${parsedStoredData.startTime}`); + } + + if (parsedStoredData.endTime) { + form.setValue('endTime', parsedStoredData.endTime); + console.log(`Setting endTime to: ${parsedStoredData.endTime}`); + } + + if (parsedStoredData.staff) { + form.setValue('staff', parsedStoredData.staff); + } + + if (parsedStoredData.date) { + form.setValue('date', new Date(parsedStoredData.date)); + } + + // Clean up session storage + sessionStorage.removeItem('newAppointmentData'); + } + }, [form]); + + const handleSubmit = (data: AppointmentFormValues) => { + // Convert date to string format for the API and ensure patientId is properly parsed as a number + console.log("Form data before submission:", data); + + // Make sure patientId is a number + const patientId = typeof data.patientId === 'string' + ? parseInt(data.patientId, 10) + : data.patientId; + + // Get patient name for the title + const patient = patients.find(p => p.id === patientId); + const patientName = patient ? `${patient.firstName} ${patient.lastName}` : 'Patient'; + + // Auto-create title if it's empty + let title = data.title; + if (!title || title.trim() === '') { + // Format: "April 19" - just the date + title = format(data.date, 'MMMM d'); + } + + // Make sure notes include staff information (needed for appointment display in columns) + let notes = data.notes || ''; + + // Get the selected staff member + const selectedStaff = staffMembers.find(staff => staff.id === data.staff) || staffMembers[0]; + + // If there's no staff information in the notes, add it + if (!notes.includes('Appointment with')) { + notes = notes ? `${notes}\nAppointment with ${selectedStaff.name}` : `Appointment with ${selectedStaff.name}`; + } + + onSubmit({ + ...data, + title, + notes, + patientId, // Ensure patientId is a number + date: format(data.date, 'yyyy-MM-dd'), + }); + }; + + return ( +
+ + ( + + Patient + + + + )} + /> + + ( + + Appointment Title (optional) + + + + + + )} + /> + + ( + + Date + + + + + + + + + date < new Date(new Date().setHours(0, 0, 0, 0)) + } + initialFocus + /> + + + + + )} + /> + +
+ ( + + Start Time + +
+ + +
+
+ +
+ )} + /> + + ( + + End Time + +
+ + +
+
+ +
+ )} + /> +
+ + ( + + Appointment Type + + + + )} + /> + + ( + + Status + + + + )} + /> + + ( + + Doctor/Hygienist + + + + )} + /> + + ( + + Notes + +