Skip to content

Commit 2ff987c

Browse files
committed
file Upload: implemented Add,Delete files in s3 bucket
1 parent 7b90ddb commit 2ff987c

22 files changed

Lines changed: 8761 additions & 1277 deletions

api-gateway/src/middlewares/patient.guard.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export function requirePatientSelf(
1919
if (
2020
patientIdFromPath === 'me' ||
2121
patientIdFromPath === 'upload' ||
22-
patientIdFromPath === 'profile-image'
22+
patientIdFromPath === 'profile-image' ||
23+
patientIdFromPath === 'documents'
2324
) {
2425
return next();
2526
}

frontend/components.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "radix-nova",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"rtl": false,
15+
"aliases": {
16+
"components": "@/components",
17+
"utils": "@/lib/utils",
18+
"ui": "@/components/ui",
19+
"lib": "@/lib",
20+
"hooks": "@/hooks"
21+
},
22+
"menuColor": "default",
23+
"menuAccent": "subtle",
24+
"registries": {}
25+
}

frontend/components/ui/tooltip.tsx

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
"use client"
2+
3+
import * as React from "react"
4+
import { Tooltip as TooltipPrimitive } from "radix-ui"
5+
6+
import { cn } from "@/lib/utils"
7+
8+
function TooltipProvider({
9+
delayDuration = 0,
10+
...props
11+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
12+
return (
13+
<TooltipPrimitive.Provider
14+
data-slot="tooltip-provider"
15+
delayDuration={delayDuration}
16+
{...props}
17+
/>
18+
)
19+
}
20+
21+
function Tooltip({
22+
...props
23+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
24+
return <TooltipPrimitive.Root data-slot="tooltip" {...props} />
25+
}
26+
27+
function TooltipTrigger({
28+
...props
29+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
30+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
31+
}
32+
33+
function TooltipContent({
34+
className,
35+
sideOffset = 0,
36+
children,
37+
...props
38+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
39+
return (
40+
<TooltipPrimitive.Portal>
41+
<TooltipPrimitive.Content
42+
data-slot="tooltip-content"
43+
sideOffset={sideOffset}
44+
className={cn(
45+
"z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
46+
className
47+
)}
48+
{...props}
49+
>
50+
{children}
51+
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />
52+
</TooltipPrimitive.Content>
53+
</TooltipPrimitive.Portal>
54+
)
55+
}
56+
57+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }

frontend/lib/utils.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { clsx, type ClassValue } from 'clsx';
2+
import { twMerge } from 'tailwind-merge';
3+
4+
export function cn(...inputs: ClassValue[]) {
5+
return twMerge(clsx(inputs));
6+
}

frontend/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@
1111
"dependencies": {
1212
"@tanstack/react-query": "^5.90.21",
1313
"axios": "^1.13.5",
14+
"class-variance-authority": "^0.7.1",
15+
"clsx": "^2.1.1",
1416
"date-fns": "^4.1.0",
17+
"framer-motion": "^12.35.0",
1518
"lucide-react": "^0.575.0",
1619
"next": "16.1.6",
20+
"radix-ui": "^1.4.3",
1721
"react": "19.2.3",
1822
"react-dom": "19.2.3",
23+
"shadcn": "^4.0.0",
24+
"tailwind-merge": "^3.5.0",
25+
"tw-animate-css": "^1.4.0",
1926
"zod": "^4.3.6"
2027
},
2128
"devDependencies": {

0 commit comments

Comments
 (0)