From 547594294ae5130961348a908a58ffe34cafb6ab Mon Sep 17 00:00:00 2001 From: nxtkofi Date: Wed, 1 Apr 2026 18:14:52 +0200 Subject: [PATCH] feat: improve structure --- src/app/api/auth/[...all]/route.ts | 2 +- src/app/sign-up/page.tsx | 4 ++-- {components => src/components}/ui/button.tsx | 0 {components => src/components}/ui/field.tsx | 0 {components => src/components}/ui/input-group.tsx | 0 {components => src/components}/ui/input.tsx | 0 {components => src/components}/ui/label.tsx | 0 {components => src/components}/ui/separator.tsx | 0 {components => src/components}/ui/sonner.tsx | 0 {components => src/components}/ui/textarea.tsx | 0 src/hooks/index.ts | 1 + {lib => src/lib}/utils.ts | 0 tsconfig.json | 7 ++++++- 13 files changed, 10 insertions(+), 4 deletions(-) rename {components => src/components}/ui/button.tsx (100%) rename {components => src/components}/ui/field.tsx (100%) rename {components => src/components}/ui/input-group.tsx (100%) rename {components => src/components}/ui/input.tsx (100%) rename {components => src/components}/ui/label.tsx (100%) rename {components => src/components}/ui/separator.tsx (100%) rename {components => src/components}/ui/sonner.tsx (100%) rename {components => src/components}/ui/textarea.tsx (100%) create mode 100644 src/hooks/index.ts rename {lib => src/lib}/utils.ts (100%) diff --git a/src/app/api/auth/[...all]/route.ts b/src/app/api/auth/[...all]/route.ts index 919be53..f0b40bb 100644 --- a/src/app/api/auth/[...all]/route.ts +++ b/src/app/api/auth/[...all]/route.ts @@ -1,3 +1,3 @@ -import { handler } from '@/src/lib/auth-server'; +import { handler } from '@/lib/auth-server'; export const { GET, POST } = handler; diff --git a/src/app/sign-up/page.tsx b/src/app/sign-up/page.tsx index 46846b8..2859074 100644 --- a/src/app/sign-up/page.tsx +++ b/src/app/sign-up/page.tsx @@ -7,8 +7,8 @@ import { FieldLabel, } from '@/components/ui/field'; import { Input } from '@/components/ui/input'; -import { deafultPasswordValidator } from '@/src/constants'; -import { authClient } from '@/src/lib/auth-client'; +import { deafultPasswordValidator } from '@/constants'; +import { authClient } from '@/lib/auth-client'; import { zodResolver } from '@hookform/resolvers/zod'; import { Controller, useForm } from 'react-hook-form'; import { toast } from 'sonner'; diff --git a/components/ui/button.tsx b/src/components/ui/button.tsx similarity index 100% rename from components/ui/button.tsx rename to src/components/ui/button.tsx diff --git a/components/ui/field.tsx b/src/components/ui/field.tsx similarity index 100% rename from components/ui/field.tsx rename to src/components/ui/field.tsx diff --git a/components/ui/input-group.tsx b/src/components/ui/input-group.tsx similarity index 100% rename from components/ui/input-group.tsx rename to src/components/ui/input-group.tsx diff --git a/components/ui/input.tsx b/src/components/ui/input.tsx similarity index 100% rename from components/ui/input.tsx rename to src/components/ui/input.tsx diff --git a/components/ui/label.tsx b/src/components/ui/label.tsx similarity index 100% rename from components/ui/label.tsx rename to src/components/ui/label.tsx diff --git a/components/ui/separator.tsx b/src/components/ui/separator.tsx similarity index 100% rename from components/ui/separator.tsx rename to src/components/ui/separator.tsx diff --git a/components/ui/sonner.tsx b/src/components/ui/sonner.tsx similarity index 100% rename from components/ui/sonner.tsx rename to src/components/ui/sonner.tsx diff --git a/components/ui/textarea.tsx b/src/components/ui/textarea.tsx similarity index 100% rename from components/ui/textarea.tsx rename to src/components/ui/textarea.tsx diff --git a/src/hooks/index.ts b/src/hooks/index.ts new file mode 100644 index 0000000..f585e01 --- /dev/null +++ b/src/hooks/index.ts @@ -0,0 +1 @@ +// Add your hooks here diff --git a/lib/utils.ts b/src/lib/utils.ts similarity index 100% rename from lib/utils.ts rename to src/lib/utils.ts diff --git a/tsconfig.json b/tsconfig.json index 3a13f90..ff5fc1c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,12 @@ } ], "paths": { - "@/*": ["./*"] + "@/*": ["./*"], + "@/components/*": ["./src/components/*"], + "@/lib/*": ["./src/lib/*"], + "@/hooks/*": ["./src/hooks/*"], + "@/app/*": ["./src/app/*"], + "@/constants": ["./src/constants.ts"] } }, "include": [