Index: src/app/api/clients/summary/route.ts
===================================================================
--- src/app/api/clients/summary/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,51 +1,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import prisma from 'src/lib/prisma';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-
-// Simple API endpoint using SQL VIEWs
-export async function GET(request: NextRequest) {
-  try {
-    // Authenticate the request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId, tenantId } = authResult;
-
-    // Use the comprehensive client financial summary view
-    const clientSummary = await prisma.$queryRaw`
-      SELECT 
-        client_name,
-        client_email,
-        client_status,
-        total_invoices,
-        paid_invoices,
-        pending_invoices,
-        overdue_invoices,
-        total_invoiced,
-        total_paid,
-        total_outstanding,
-        total_overdue,
-        average_invoice_amount,
-        risk_level,
-        payment_behavior
-      FROM v_client_financial_summary
-      WHERE tenant_id = ${tenantId}
-      ORDER BY total_invoiced DESC
-    `;
-
-    return NextResponse.json({
-      success: true,
-      data: clientSummary,
-      message: 'Client summary using SQL VIEW',
-    });
-  } catch (error) {
-    console.error('Error fetching client summary:', error);
-    return NextResponse.json(
-      {
-        error: 'Internal Server Error',
-      },
-      { status: 500 }
-    );
-  }
-}
Index: src/app/api/customers/[id]/route.ts
===================================================================
--- src/app/api/customers/[id]/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/api/customers/[id]/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,4 +1,4 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { customerSchema } from 'src/schemas';
+import { customerSchema } from 'mvpmasters-shared';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
@@ -6,22 +6,15 @@
 export async function PATCH(request: NextRequest, { params }: { params: { id: string } }) {
   try {
-    const auth = await authenticateRequest(request);
-    if (!auth || auth instanceof NextResponse) {
+    const userId = await authenticateRequest(request);
+    if (!userId) {
       return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
     }
-
-    const { userId, tenantId } = auth;
 
     const body = await request.json();
     const validatedData = customerSchema.partial().parse(body);
 
-    console.log('validatedData', validatedData);
-
-    const customer = await prisma.client.update({
-      where: { id: params.id },
-      data: {
-        ...validatedData,
-        tenantId,
-      },
+    const customer = await prisma.customer.update({
+      where: { id: params.id, userId },
+      data: validatedData,
     });
 
Index: src/app/api/customers/route.ts
===================================================================
--- src/app/api/customers/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/api/customers/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,7 +1,6 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { customerTableFiltersSchema, newCustomerSchema } from 'src/schemas';
+import { customerTableFiltersSchema, newCustomerSchema } from 'mvpmasters-shared';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
-import { Prisma, ClientStatus } from '@prisma/client';
 
 export async function GET(request: NextRequest) {
@@ -12,5 +11,5 @@
       return authResult;
     }
-    const { userId, tenantId } = authResult;
+    const { userId } = authResult;
 
     const searchParams = request.nextUrl.searchParams;
@@ -24,31 +23,14 @@
     const validatedFilters = customerTableFiltersSchema.parse(filters);
 
-    //   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({
+    const customers = await prisma.customer.findMany({
       where: {
-        tenantId,
-        name: {
-          contains: validatedFilters.name,
-          mode: 'insensitive',
-        },
-        ...(validatedFilters.status && {
-          status: validatedFilters.status as ClientStatus,
-        }),
+        name: { contains: validatedFilters.name, mode: 'insensitive' },
+        status: validatedFilters.status ? { equals: validatedFilters.status } : undefined,
       },
     });
+    console.log('customers', customers);
 
     return NextResponse.json(customers);
   } catch (error) {
-    console.error('Error fetching customers:', error);
     return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
   }
@@ -62,5 +44,5 @@
       return authResult;
     }
-    const { userId, tenantId } = authResult;
+    const { userId } = authResult;
 
     const body = await request.json();
@@ -68,8 +50,8 @@
     console.log('validatedData', validatedData);
 
-    const customer = await prisma.client.create({
+    const customer = await prisma.customer.create({
       data: {
         ...validatedData,
-        tenantId,
+        // userId,
       },
     });
Index: src/app/api/employees/route.ts
===================================================================
--- src/app/api/employees/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,68 +1,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import { employeeTableFiltersSchema, newEmployeeSchema } from 'src/schemas';
-import prisma from 'src/lib/prisma';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-import { Prisma } from '@prisma/client';
-
-export async function GET(request: NextRequest) {
-  try {
-    // Authenticate the request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId, tenantId } = authResult;
-
-    const searchParams = request.nextUrl.searchParams;
-    const filters = {
-      name: searchParams.get('name') || '',
-      status: searchParams.get('status') || '',
-    };
-
-    // Validate filters
-    const validatedFilters = employeeTableFiltersSchema.parse(filters);
-
-    // Replace Prisma query with raw SQL
-    const employees = await prisma.$queryRaw`
-      SELECT * FROM "Employee"
-      WHERE "tenantId" = ${tenantId}
-        AND LOWER(name) LIKE LOWER(${`%${validatedFilters.name}%`})
-        ${
-          validatedFilters.status
-            ? Prisma.sql`AND status = ${validatedFilters.status}:::"EmployeeStatus"`
-            : Prisma.sql`AND TRUE`
-        }
-    `;
-
-    return NextResponse.json(employees);
-  } catch (error) {
-    console.error('Error fetching employees:', error);
-    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
-  }
-}
-
-export async function POST(request: NextRequest) {
-  try {
-    // Authenticate the request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId, tenantId } = authResult;
-
-    const body = await request.json();
-    const validatedData = newEmployeeSchema.parse(body);
-
-    const employee = await prisma.employee.create({
-      data: {
-        ...validatedData,
-        tenantId,
-      },
-    });
-
-    return NextResponse.json(employee, { status: 201 });
-  } catch (error) {
-    console.error('Error creating employee:', error);
-    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
-  }
-}
Index: src/app/api/invoices/[id]/route.ts
===================================================================
--- src/app/api/invoices/[id]/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/api/invoices/[id]/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,16 +1,10 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { updateInvoiceSchema } from 'src/schemas';
+import { invoiceSchema } from 'mvpmasters-shared';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
-import { Prisma } from '@prisma/client';
 
-export async function GET(request: NextRequest, { params }: { params: { id: string } }) {
+export async function PATCH(request: NextRequest, { params }: { params: { id: string } }) {
   try {
-    // Validate ID format
-    if (!params.id || !/^[0-9a-fA-F-]+$/.test(params.id)) {
-      return NextResponse.json({ error: 'Invalid invoice ID format' }, { status: 400 });
-    }
-
-    // Authenticate request
+    // Authenticate the request
     const authResult = await authenticateRequest(request);
     if (authResult instanceof NextResponse) {
@@ -19,181 +13,32 @@
     const { userId } = authResult;
 
-    // Fetch invoice with user check
-    const invoice = await prisma.invoice.findFirst({
-      where: {
-        id: params.id,
-        // invoiceFromId: userId,
+    const body = await request.json();
+    const validatedData = invoiceSchema.partial().parse(body);
+
+    const invoice = await prisma.invoice.update({
+      where: { id: params.id, userId },
+      data: {
+        ...validatedData,
+        items: validatedData.items
+          ? {
+              deleteMany: {},
+              create: validatedData.items,
+            }
+          : undefined,
       },
       include: {
+        items: {
+          include: {
+            service: true,
+          },
+        },
         invoiceFrom: true,
         invoiceTo: true,
-        items: true,
       },
     });
 
-    if (!invoice) {
-      return NextResponse.json({ error: 'Invoice not found or access denied' }, { status: 404 });
-    }
-
     return NextResponse.json(invoice);
   } catch (error) {
-    console.error('Error fetching invoice:', error);
-
-    if (error instanceof Prisma.PrismaClientKnownRequestError) {
-      return NextResponse.json({ error: 'Database error occurred' }, { status: 500 });
-    }
-
-    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
+    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
   }
 }
-
-export async function PATCH(request: NextRequest, { params }: { params: { id: string } }) {
-  try {
-    // Validate ID format
-    if (!params.id || !/^[0-9a-fA-F-]+$/.test(params.id)) {
-      return NextResponse.json({ error: 'Invalid invoice ID format' }, { status: 400 });
-    }
-
-    // Authenticate request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId } = authResult;
-
-    // Parse and validate request body
-    const body = await request.json();
-
-    const validation = updateInvoiceSchema.partial().safeParse(body);
-
-    if (!validation.success) {
-      return NextResponse.json(
-        { error: 'Invalid invoice data', details: validation.error.format() },
-        { status: 400 }
-      );
-    }
-
-    // Verify invoice exists and belongs to user
-    const existingInvoice = await prisma.invoice.findFirst({
-      where: {
-        id: params.id,
-        // invoiceFromId: userId,
-      },
-    });
-
-    if (!existingInvoice) {
-      return NextResponse.json({ error: 'Invoice not found or access denied' }, { status: 404 });
-    }
-
-    // Update invoice and related data
-    const updatedInvoice = await prisma.$transaction(async (tx) => {
-      // Conditionally delete and recreate items only if they are provided
-      if (validation.data.items) {
-        await tx.lineItem.deleteMany({
-          where: { invoiceId: params.id },
-        });
-      }
-
-      // Update the invoice and create new items if provided
-      return tx.invoice.update({
-        where: { id: params.id },
-        data: {
-          invoiceNumber: validation.data.invoiceNumber,
-          issueDate: validation.data.issueDate,
-          dueDate: validation.data.dueDate,
-          status: validation.data.status,
-          currency: validation.data.currency,
-          quantityType: validation.data.quantityType,
-          subTotal: validation.data.subTotal,
-          month: validation.data.month,
-          totalAmount: validation.data.totalAmount,
-          discount: validation.data.discount,
-          taxes: validation.data.taxes,
-          pdfRef: validation.data.pdfRef,
-          invoiceTo: {
-            update: validation.data.invoiceTo,
-          },
-          items: validation.data.items
-            ? {
-                create: validation.data.items.map((item) => ({
-                  ...item,
-                  service: {
-                    connect: { id: item.service.id },
-                  },
-                })),
-              }
-            : undefined,
-        },
-        include: {
-          invoiceFrom: true,
-          invoiceTo: true,
-          items: true,
-        },
-      });
-    });
-
-    return NextResponse.json(updatedInvoice);
-  } catch (error) {
-    console.error('Error updating invoice:', error);
-
-    if (error instanceof Prisma.PrismaClientKnownRequestError) {
-      return NextResponse.json({ error: 'Database error occurred' }, { status: 500 });
-    }
-
-    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
-  }
-}
-
-export async function DELETE(request: NextRequest, { params }: { params: { id: string } }) {
-  try {
-    // Validate ID format
-    if (!params.id || !/^[0-9a-fA-F-]+$/.test(params.id)) {
-      return NextResponse.json({ error: 'Invalid invoice ID format' }, { status: 400 });
-    }
-
-    // Authenticate request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId } = authResult;
-    console.log('userId', userId);
-
-    // Verify invoice exists and belongs to user
-    const existingInvoice = await prisma.invoice.findFirst({
-      where: {
-        id: params.id,
-      },
-    });
-
-    if (!existingInvoice) {
-      return NextResponse.json({ error: 'Invoice not found or access denied' }, { status: 404 });
-    }
-
-    // Delete invoice and related items in a transaction
-    await prisma.$transaction(async (tx) => {
-      // Delete related items first
-      await tx.lineItem.deleteMany({
-        where: { invoiceId: params.id },
-      });
-
-      // Delete the invoice
-      await tx.invoice.delete({
-        where: { id: params.id },
-      });
-    });
-
-    return NextResponse.json({ message: 'Invoice deleted successfully' }, { status: 200 });
-  } catch (error) {
-    console.error('Error deleting invoice:', error);
-
-    if (error instanceof Prisma.PrismaClientKnownRequestError) {
-      if (error.code === 'P2025') {
-        return NextResponse.json({ error: 'Invoice not found' }, { status: 404 });
-      }
-      return NextResponse.json({ error: 'Database error occurred' }, { status: 500 });
-    }
-
-    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
-  }
-}
Index: src/app/api/invoices/route.ts
===================================================================
--- src/app/api/invoices/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/api/invoices/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,7 +1,6 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { createInvoiceSchema, invoiceSchema, invoiceTableFiltersSchema } from 'src/schemas';
+import { invoiceSchema, invoiceTableFiltersSchema } from 'mvpmasters-shared';
 import prisma from 'src/lib/prisma';
 import { auth } from 'src/lib/firebase-admin';
-import { InvoiceStatus } from '@prisma/client';
 
 // Helper function to get userId from Authorization header
@@ -24,7 +23,7 @@
   try {
     const userId = await getUserId(request);
-    // if (!userId) {
-    //   return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
-    // }
+    if (!userId) {
+      return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+    }
 
     const searchParams = request.nextUrl.searchParams;
@@ -42,10 +41,9 @@
     const invoices = await prisma.invoice.findMany({
       where: {
-        status: validatedFilters.status
-          ? { equals: validatedFilters.status as InvoiceStatus }
-          : undefined,
-        issueDate: {
-          ...(validatedFilters.startDate && { gte: validatedFilters.startDate }),
-          ...(validatedFilters.endDate && { lte: validatedFilters.endDate }),
+        userId,
+        status: validatedFilters.status ? { equals: validatedFilters.status } : undefined,
+        createDate: {
+          gte: validatedFilters.startDate,
+          lte: validatedFilters.endDate,
         },
         items:
@@ -74,57 +72,17 @@
   try {
     const userId = await getUserId(request);
-    // if (!userId) {
-    //   return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
-    // }
+    if (!userId) {
+      return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+    }
 
     const body = await request.json();
-    const validatedData = createInvoiceSchema.parse(body);
-
-    const tenant = await prisma.tenant.findUnique({
-      where: { id: validatedData.invoiceFrom.id },
-    });
-
-    const toCustomer = await prisma.client.findUnique({
-      where: { id: validatedData.invoiceTo.id },
-    });
-
-    if (!tenant || !toCustomer) {
-      return NextResponse.json({ error: 'Invoice sender or recipient not found' }, { status: 404 });
-    }
-
-    // Update lastInvoiceNumber in tenant
-    const updatedTenant = await prisma.tenant.update({
-      where: { id: tenant.id },
-      data: {
-        lastInvoiceNumber: validatedData.invoiceNumber,
-      },
-    });
+    const validatedData = invoiceSchema.parse(body);
 
     const invoice = await prisma.invoice.create({
       data: {
-        dueDate: validatedData.dueDate,
-        status: validatedData.status,
-        currency: validatedData.currency,
-        quantityType: validatedData.quantityType,
-        subTotal: validatedData.subTotal,
-        issueDate: validatedData.issueDate,
-        month: validatedData.month,
-        discount: validatedData.discount,
-        taxes: validatedData.taxes,
-        totalAmount: validatedData.totalAmount,
-        invoiceNumber: validatedData.invoiceNumber,
-        invoiceFromId: tenant.id,
-        invoiceToId: toCustomer.id,
+        ...validatedData,
+        userId,
         items: {
-          create: validatedData.items.map((item) => ({
-            title: item.title,
-            price: item.price,
-            total: item.total,
-            quantity: item.quantity,
-            description: item.description,
-            service: {
-              connect: { id: item.service.id },
-            },
-          })),
+          create: validatedData.items,
         },
       },
@@ -142,5 +100,4 @@
     return NextResponse.json(invoice, { status: 201 });
   } catch (error) {
-    console.error(error);
     return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
   }
Index: src/app/api/invoices/totals/route.ts
===================================================================
--- src/app/api/invoices/totals/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,71 +1,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import prisma from 'src/lib/prisma';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-
-type InvoiceStatus = 'processing' | 'paid' | 'pending' | 'overdue' | 'draft';
-type CurrencyTotals = { EUR: number; USD: number };
-type Results = Record<InvoiceStatus | 'total', CurrencyTotals>;
-
-export async function GET(request: NextRequest) {
-  try {
-    // Authenticate the request
-    const authResult = await authenticateRequest(request);
-
-    if (!authResult || authResult instanceof NextResponse) {
-      return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
-    }
-
-    const { userId, tenantId } = authResult;
-
-    const searchParams = request.nextUrl.searchParams;
-    const startDate = searchParams.get('startDate')
-      ? new Date(searchParams.get('issueDate')!)
-      : null;
-
-    if (!startDate) {
-      return NextResponse.json({ error: 'Start date is required' }, { status: 400 });
-    }
-
-    // Calculate totals using the business intelligence view
-    const totals = await prisma.$queryRaw`
-      SELECT 
-        invoice_status as status,
-        invoice_currency as currency,
-        SUM(invoice_total_amount) as total
-      FROM v_invoice_analytics
-      WHERE invoice_issue_date >= ${startDate}
-        AND tenant_id = ${tenantId}
-      GROUP BY invoice_status, invoice_currency
-    `;
-
-    // Format the response
-    const results: Results = {
-      total: { EUR: 0, USD: 0 },
-      processing: { EUR: 0, USD: 0 },
-      paid: { EUR: 0, USD: 0 },
-      pending: { EUR: 0, USD: 0 },
-      overdue: { EUR: 0, USD: 0 },
-      draft: { EUR: 0, USD: 0 },
-    };
-
-    // Process the results - adjusted for raw SQL response format
-    for (const row of totals as {
-      status: string;
-      currency: 'EUR' | 'USD';
-      total: string | number;
-    }[]) {
-      const { status, currency, total } = row;
-      const statusKey = status.toLowerCase() as InvoiceStatus;
-      if (statusKey in results && (currency === 'EUR' || currency === 'USD')) {
-        const amount = Number(total) || 0;
-        results[statusKey][currency] = amount;
-        results.total[currency] += amount;
-      }
-    }
-
-    return NextResponse.json(results);
-  } catch (error) {
-    console.error('Error calculating totals:', error);
-    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
-  }
-}
Index: src/app/api/services/route.ts
===================================================================
--- src/app/api/services/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,11 +1,0 @@
-import prisma from 'src/lib/prisma';
-import { NextResponse } from 'next/server';
-
-export async function GET() {
-  try {
-    const services = await prisma.service.findMany();
-    return NextResponse.json(services);
-  } catch (error) {
-    return NextResponse.json({ error: 'Failed to fetch services' }, { status: 500 });
-  }
-}
Index: src/app/api/tenant/route.ts
===================================================================
--- src/app/api/tenant/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,74 +1,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import prisma from 'src/lib/prisma';
-import { tenantSchema } from 'src/schemas';
-import { z } from 'zod';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-
-export async function GET(request: NextRequest) {
-  try {
-    const auth = await authenticateRequest(request);
-    if (auth instanceof NextResponse) {
-      return auth; // Return error response if authentication failed
-    }
-    const { tenantId } = auth;
-
-    const tenant = await prisma.tenant.findUnique({
-      where: { id: tenantId },
-    });
-
-    if (!tenant) {
-      return NextResponse.json({ error: 'No tenant found' }, { status: 404 });
-    }
-
-    return NextResponse.json(tenant);
-  } catch (error) {
-    console.error('Error fetching tenant:', error);
-    return NextResponse.json({ error: 'Failed to fetch tenant' }, { status: 500 });
-  }
-}
-
-export async function POST(request: NextRequest) {
-  try {
-    const auth = await authenticateRequest(request);
-    if (auth instanceof NextResponse) {
-      return auth;
-    }
-    const { tenantId } = auth;
-
-    const body = await request.json();
-
-    // Validate request body
-    const validatedData = tenantSchema.parse(body);
-
-    // Check if tenant already exists
-    const existingTenant = await prisma.tenant.findUnique({
-      where: {
-        id: tenantId,
-      },
-    });
-
-    if (existingTenant) {
-      return NextResponse.json({ error: 'Tenant already exists' }, { status: 400 });
-    }
-
-    // Create new tenant with the authenticated tenantId
-    const tenant = await prisma.tenant.create({
-      data: {
-        ...validatedData,
-        id: tenantId, // Ensure the tenant is created with the authenticated tenantId
-      },
-    });
-
-    return NextResponse.json(tenant, { status: 201 });
-  } catch (error) {
-    if (error instanceof z.ZodError) {
-      return NextResponse.json(
-        { error: 'Invalid request data', details: error.errors },
-        { status: 400 }
-      );
-    }
-
-    console.error('Error creating tenant:', error);
-    return NextResponse.json({ error: 'Failed to create tenant' }, { status: 500 });
-  }
-}
Index: src/app/api/user/route.ts
===================================================================
--- src/app/api/user/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,30 +1,0 @@
-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 d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/dashboard/customer/list/page.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,4 +1,4 @@
 // sections
-import { CustomerListView } from 'src/sections/client/view';
+import { CustomerListView } from 'src/sections/user/view';
 
 // ----------------------------------------------------------------------
Index: src/app/dashboard/customer/new/page.tsx
===================================================================
--- src/app/dashboard/customer/new/page.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/dashboard/customer/new/page.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,4 +1,4 @@
 // sections
-import { CustomerCreateView } from 'src/sections/client/view';
+import { CustomerCreateView } from 'src/sections/user/view';
 
 // ----------------------------------------------------------------------
Index: src/app/dashboard/employee/list/page.tsx
===================================================================
--- src/app/dashboard/employee/list/page.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,9 +1,0 @@
-'use client';
-
-import { EmployeeListView } from 'src/sections/employee/view';
-
-// ----------------------------------------------------------------------
-
-export default function EmployeeListPage() {
-  return <EmployeeListView />;
-}
Index: src/app/dashboard/employee/new/page.tsx
===================================================================
--- src/app/dashboard/employee/new/page.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,9 +1,0 @@
-'use client';
-
-import { EmployeeCreateView } from 'src/sections/employee/view';
-
-// ----------------------------------------------------------------------
-
-export default function EmployeeCreatePage() {
-  return <EmployeeCreateView />;
-}
Index: src/app/error.tsx
===================================================================
--- src/app/error.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,28 +1,0 @@
-'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 d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/loading.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -7,8 +7,4 @@
 
 export default function Loading() {
-  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>
-  );
+  return <SplashScreen />;
 }
Index: src/app/not-found.tsx
===================================================================
--- src/app/not-found.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/not-found.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,5 +1,4 @@
 // sections
 import { NotFoundView } from 'src/sections/error';
-import Link from 'next/link';
 
 // ----------------------------------------------------------------------
@@ -9,13 +8,5 @@
 };
 
-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>
-  );
+export default function NotFoundPage() {
+  return <NotFoundView />;
 }
