Index: src/app/api/customers/route.ts
===================================================================
--- src/app/api/customers/route.ts	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/api/customers/route.ts	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -3,6 +3,5 @@
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
-import { CustomerStatus } from '@prisma/client';
-import { Prisma } from '@prisma/client';
+import { Prisma, ClientStatus } from '@prisma/client';
 
 export async function GET(request: NextRequest) {
@@ -25,15 +24,27 @@
     const validatedFilters = customerTableFiltersSchema.parse(filters);
 
-    // Replace Prisma query with raw SQL
-    const customers = await prisma.$queryRaw`
-      SELECT * FROM "Client"
-      WHERE "tenantId" = ${tenantId}
-        AND LOWER(name) LIKE LOWER(${`%${validatedFilters.name}%`})
-        ${
-          validatedFilters.status
-            ? Prisma.sql`AND status = ${validatedFilters.status}::"CustomerStatus"`
-            : Prisma.sql`AND TRUE`
-        }
-    `;
+    //   const customers = await prisma.$queryRaw`
+    //   SELECT * FROM "Client"
+    //   WHERE "tenant_id" = ${tenantId}
+    //     AND LOWER(name) LIKE LOWER(${`%${validatedFilters.name}%`})
+    //     ${
+    //       validatedFilters.status
+    //         ? Prisma.sql`AND status = ${validatedFilters.status}::"CustomerStatus"`
+    //         : Prisma.sql`AND TRUE`
+    //     }
+    // `;
+
+    const customers = await prisma.client.findMany({
+      where: {
+        tenantId,
+        name: {
+          contains: validatedFilters.name,
+          mode: 'insensitive',
+        },
+        ...(validatedFilters.status && {
+          status: validatedFilters.status as ClientStatus,
+        }),
+      },
+    });
 
     return NextResponse.json(customers);
@@ -60,5 +71,4 @@
       data: {
         ...validatedData,
-        // userId,
         tenantId,
       },
Index: src/app/api/invoices/[id]/route.ts
===================================================================
--- src/app/api/invoices/[id]/route.ts	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/api/invoices/[id]/route.ts	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -100,5 +100,5 @@
         data: {
           invoiceNumber: validation.data.invoiceNumber,
-          createDate: validation.data.createDate,
+          issueDate: validation.data.issueDate,
           dueDate: validation.data.dueDate,
           status: validation.data.status,
Index: src/app/api/invoices/route.ts
===================================================================
--- src/app/api/invoices/route.ts	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/api/invoices/route.ts	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -45,5 +45,5 @@
           ? { equals: validatedFilters.status as InvoiceStatus }
           : undefined,
-        createDate: {
+        issueDate: {
           ...(validatedFilters.startDate && { gte: validatedFilters.startDate }),
           ...(validatedFilters.endDate && { lte: validatedFilters.endDate }),
@@ -108,5 +108,5 @@
         quantityType: validatedData.quantityType,
         subTotal: validatedData.subTotal,
-        createDate: validatedData.createDate,
+        issueDate: validatedData.issueDate,
         month: validatedData.month,
         discount: validatedData.discount,
Index: src/app/api/invoices/totals/route.ts
===================================================================
--- src/app/api/invoices/totals/route.ts	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/api/invoices/totals/route.ts	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -20,5 +20,5 @@
     const searchParams = request.nextUrl.searchParams;
     const startDate = searchParams.get('startDate')
-      ? new Date(searchParams.get('startDate')!)
+      ? new Date(searchParams.get('issueDate')!)
       : null;
 
@@ -32,8 +32,8 @@
         status,
         currency,
-        SUM("totalAmount") as total
+        SUM("total_amount") as total
       FROM "Invoice"
-      WHERE "createDate" >= ${startDate}
-        AND "invoiceFromId" = ${tenantId}
+      WHERE "issue_date" >= ${startDate}
+        AND "tenant_id" = ${tenantId}
       GROUP BY status, currency
     `;
Index: src/app/api/user/route.ts
===================================================================
--- src/app/api/user/route.ts	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
+++ src/app/api/user/route.ts	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -0,0 +1,30 @@
+import { NextResponse } from 'next/server';
+import { authenticateRequest } from 'src/lib/auth-middleware';
+import { type NextRequest } from 'next/server';
+import prisma from 'src/lib/prisma';
+
+export async function GET(request: NextRequest) {
+  try {
+    const authResult = await authenticateRequest(request);
+
+    if (authResult instanceof NextResponse) {
+      return authResult;
+    }
+
+    // Get user from Prisma
+    const user = await prisma.user.findUnique({
+      where: {
+        id: authResult.userId,
+      },
+    });
+
+    if (!user) {
+      return NextResponse.json({ error: 'User not found' }, { status: 404 });
+    }
+
+    return NextResponse.json(user);
+  } catch (error) {
+    console.error(error);
+    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
+  }
+}
Index: src/app/dashboard/customer/list/page.tsx
===================================================================
--- src/app/dashboard/customer/list/page.tsx	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/dashboard/customer/list/page.tsx	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -1,4 +1,4 @@
 // sections
-import { CustomerListView } from 'src/sections/user/view';
+import { CustomerListView } from 'src/sections/client/view';
 
 // ----------------------------------------------------------------------
Index: src/app/dashboard/customer/new/page.tsx
===================================================================
--- src/app/dashboard/customer/new/page.tsx	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/dashboard/customer/new/page.tsx	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -1,4 +1,4 @@
 // sections
-import { CustomerCreateView } from 'src/sections/user/view';
+import { CustomerCreateView } from 'src/sections/client/view';
 
 // ----------------------------------------------------------------------
Index: src/app/error.tsx
===================================================================
--- src/app/error.tsx	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
+++ src/app/error.tsx	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -0,0 +1,28 @@
+'use client';
+
+import { useEffect } from 'react';
+
+export default function Error({
+  error,
+  reset,
+}: {
+  error: Error & { digest?: string };
+  reset: () => void;
+}) {
+  useEffect(() => {
+    // Log the error to your error reporting service
+    console.error(error);
+  }, [error]);
+
+  return (
+    <div className="flex min-h-screen flex-col items-center justify-center">
+      <h2 className="text-2xl font-bold mb-4">Something went wrong!</h2>
+      <button
+        className="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"
+        onClick={() => reset()}
+      >
+        Try again
+      </button>
+    </div>
+  );
+}
Index: src/app/loading.tsx
===================================================================
--- src/app/loading.tsx	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/loading.tsx	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -7,4 +7,8 @@
 
 export default function Loading() {
-  return <SplashScreen />;
+  return (
+    <div className="flex min-h-screen items-center justify-center">
+      <div className="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-blue-500"></div>
+    </div>
+  );
 }
Index: src/app/not-found.tsx
===================================================================
--- src/app/not-found.tsx	(revision 299af01b89703f010e0519c717f8e1c8bb9bb299)
+++ src/app/not-found.tsx	(revision dc3406b4adcd188a5b90d471779b2da7665882cc)
@@ -1,4 +1,5 @@
 // sections
 import { NotFoundView } from 'src/sections/error';
+import Link from 'next/link';
 
 // ----------------------------------------------------------------------
@@ -8,5 +9,13 @@
 };
 
-export default function NotFoundPage() {
-  return <NotFoundView />;
+export default function NotFound() {
+  return (
+    <div className="flex min-h-screen flex-col items-center justify-center">
+      <h2 className="text-2xl font-bold mb-4">Page Not Found</h2>
+      <p className="mb-4">Could not find requested resource</p>
+      <Link href="/" className="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600">
+        Return Home
+      </Link>
+    </div>
+  );
 }
