Index: package.json
===================================================================
--- package.json	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ package.json	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -48,5 +48,4 @@
     "lodash": "^4.17.21",
     "mui-one-time-password-input": "^2.0.0",
-    "mvpmasters-shared": "^1.0.9",
     "next": "^13.4.19",
     "notistack": "^3.0.1",
@@ -93,5 +92,6 @@
     "eslint-plugin-unused-imports": "^3.0.0",
     "prettier": "^3.0.3",
-    "prisma": "^6.3.1"
+    "prisma": "^6.3.1",
+    "typescript": "5.7.3"
   },
   "prisma": {
Index: prisma/schema.prisma
===================================================================
--- prisma/schema.prisma	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ prisma/schema.prisma	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -8,5 +8,5 @@
 }
 
-model Customer {
+model Client {
   id              String        @id @default(uuid())
   companyId       String?       // Optional company identifier
@@ -21,18 +21,5 @@
   status          CustomerStatus @default(active)
 
-  bankAccounts    BankAccount[] // One-to-many relation
-  invoicesSent    Invoice[] @relation("InvoiceFrom")
   invoicesReceived Invoice[] @relation("InvoiceTo")
-}
-
-model BankAccount {
-  id             String   @id @default(uuid())
-  customerId     String
-  customer       Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
-  accountNumber  String?
-  bicSwift       String?
-  iban           String?
-  routingNumber  String?
-  currency       Currency
 }
 
@@ -40,9 +27,11 @@
   id          String  @id @default(uuid())
   name        String
-  sprintPrice Float
-  hourPrice   Float
-  monthPrice  Float
+  sprint      Float
+  hour        Float
+  month       Float
+  tenantId    String
+  tenant      Tenant   @relation(fields: [tenantId], references: [id], onDelete: Cascade)
 
-  invoiceItems InvoiceItem[]
+  lineItems LineItem[]
 }
 
@@ -64,13 +53,13 @@
 
   invoiceFromId String
-  invoiceFrom   Customer       @relation("InvoiceFrom", fields: [invoiceFromId], references: [id], onDelete: Cascade)
+  invoiceFrom   Tenant        @relation(fields: [invoiceFromId], references: [id], onDelete: Cascade)
 
   invoiceToId   String
-  invoiceTo     Customer       @relation("InvoiceTo", fields: [invoiceToId], references: [id], onDelete: Cascade)
+  invoiceTo     Client       @relation("InvoiceTo", fields: [invoiceToId], references: [id], onDelete: Cascade)
 
-  items         InvoiceItem[]
+  items         LineItem[]
 }
 
-model InvoiceItem {
+model LineItem {
   id          String   @id @default(uuid())
   title       String
@@ -85,4 +74,36 @@
 }
 
+model Tenant {
+  id                String    @id @default(cuid())
+  name              String
+  email             String    @unique
+  address           Json      // Holds {street: string, city?: string, country: string, state?: string, zip: string}
+  bankAccounts      Json?     // Holds {eur?: {accountNumber?, bicSwift?, iban?, routingNumber?}, usd?: {...}}
+  logoUrl           String?
+  phoneNumber       String?
+  vatNumber         String?
+  companyNumber     String?
+  representative    String
+  lastInvoiceNumber String       @default("0")
+  createdAt         DateTime  @default(now())
+  updatedAt         DateTime  @updatedAt
+  invoicesSent      Invoice[]
+  services          Service[]
+  employees         Employee[]
+}
+
+model Employee {
+  id          String         @id @default(uuid())
+  name        String
+  email       String         @unique
+  status      EmployeeStatus @default(active)
+  iban        String?
+  cv          String?
+  photo       String?
+  project     String?
+  tenantId    String
+  tenant      Tenant         @relation(fields: [tenantId], references: [id], onDelete: Cascade)
+}
+
 // Enums
 enum CustomerStatus {
@@ -93,9 +114,9 @@
 
 enum InvoiceStatus {
-  DRAFT
-  PROCESSING
-  PENDING
-  OVERDUE
-  PAID
+  draft
+  processing
+  pending
+  overdue
+  paid
 }
 
@@ -106,22 +127,27 @@
 
 enum QuantityType {
-  UNIT
-  HOUR
-  SPRINT
-  MONTH
+  Unit
+  Hour
+  Sprint
+  Month
 }
 
 enum Month {
-  JANUARY
-  FEBRUARY
-  MARCH
-  APRIL
-  MAY
-  JUNE
-  JULY
-  AUGUST
-  SEPTEMBER
-  OCTOBER
-  NOVEMBER
-  DECEMBER
+  January
+  February
+  March
+  April
+  May
+  June
+  July
+  August
+  September
+  October
+  November
+  December
 }
+
+enum EmployeeStatus {
+  active
+  inactive
+}
Index: prisma/seed.js
===================================================================
--- prisma/seed.js	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ prisma/seed.js	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -4,116 +4,75 @@
 
 async function main() {
-  console.log('🌱 Seeding database...');
+  // Clear existing data
+  await prisma.service.deleteMany();
+  await prisma.tenant.deleteMany();
 
-  // Create Customers
-  const customer1 = await prisma.customer.create({
-    data: {
-      name: 'Acme Corp',
-      email: 'contact@acme.com',
-      street: '123 Main St',
-      city: 'New York',
-      country: 'USA',
-      state: 'NY',
-      zip: '10001',
-      phoneNumber: '+1 555-555-5555',
-      vatNumber: 'US123456789',
-      companyNumber: '123456789',
-      representative: 'John Doe',
-      status: 'ACTIVE',
-      logoUrl: 'https://example.com/logo.png',
+  // Define default tenant data
+  const tenantData = {
+    name: "Default Company",
+    email: "contact@defaultcompany.com",
+    address: {
+      street: "123 Business Street",
+      city: "Business City",
+      state: "BS",
+      zip: "12345",
+      country: "United States"
     },
+    phoneNumber: "+1 234 567 8900",
+    representative: "John Doe",
+    lastInvoiceNumber: "1",
+    logoUrl: "https://example.com/default-logo.png",
+    vatNumber: "VAT123456789",
+    companyNumber: "COMP123456",
+    bankAccounts: {
+      eur: {
+        accountNumber: "1234567890",
+        routingNumber: "987654321",
+        bicSwift: "DEFBANKXXX",
+        iban: "DE89370400440532013000"
+      },
+      usd: {
+        accountNumber: "0987654321",
+        routingNumber: "123456789",
+        bicSwift: "DEFBANKXXX",
+        iban: "US89370400440532013000"
+      }
+    },
+    // Add services along with the tenant creation
+    services: {
+      create: [
+        {
+          name: "Web Development",
+          sprint: 5000,
+          hour: 150,
+          month: 8000
+        },
+        {
+          name: "UI/UX Design",
+          sprint: 3000,
+          hour: 120,
+          month: 6000
+        },
+        {
+          name: "Consulting",
+          sprint: 4000,
+          hour: 200,
+          month: 7000
+        }
+      ]
+    }
+  };
+
+  // Create default tenant with services
+  const defaultTenant = await prisma.tenant.create({
+    data: tenantData,
+    include: {
+      services: true
+    }
   });
 
-  const customer2 = await prisma.customer.create({
-    data: {
-      name: 'Globex Ltd.',
-      email: 'info@globex.com',
-      street: '456 Industrial Rd',
-      city: 'Los Angeles',
-      country: 'USA',
-      state: 'CA',
-      zip: '90001',
-      phoneNumber: '+1 555-123-4567',
-      vatNumber: 'US987654321',
-      companyNumber: '987654321',
-      representative: 'Jane Smith',
-      status: 'INACTIVE',
-      logoUrl: 'https://example.com/logo2.png',
-    },
-  });
+  console.log('Seeded default tenant:', defaultTenant);
 
-  // Create Bank Accounts
-  await prisma.bankAccount.createMany({
-    data: [
-      {
-        customerId: customer1.id,
-        accountNumber: '1234567890',
-        bicSwift: 'ACMEUS33',
-        iban: 'US12345678901234567890',
-        routingNumber: '111000025',
-        currency: 'USD',
-      },
-      {
-        customerId: customer2.id,
-        accountNumber: '0987654321',
-        bicSwift: 'GLOBEXUS12',
-        iban: 'US09876543210987654321',
-        routingNumber: '222000033',
-        currency: 'EUR',
-      },
-    ],
-  });
-
-  // Create Services
-  const service1 = await prisma.service.create({
-    data: {
-      name: 'Web Development',
-      sprintPrice: 5000.0,
-      hourPrice: 100.0,
-      monthPrice: 20000.0,
-    },
-  });
-
-  const service2 = await prisma.service.create({
-    data: {
-      name: 'SEO Optimization',
-      sprintPrice: 3000.0,
-      hourPrice: 75.0,
-      monthPrice: 12000.0,
-    },
-  });
-
-  // Create Invoices
-  const invoice1 = await prisma.invoice.create({
-    data: {
-      dueDate: new Date('2025-03-15'),
-      status: 'PENDING',
-      currency: 'USD',
-      quantityType: 'HOUR',
-      subTotal: 5000.0,
-      createDate: new Date(),
-      month: 'FEBRUARY',
-      discount: 0.0,
-      taxes: 500.0,
-      totalAmount: 5500.0,
-      invoiceNumber: 'INV-2025-001',
-      pdfRef: 'https://example.com/invoice1.pdf',
-      invoiceFromId: customer1.id,
-      invoiceToId: customer2.id,
-    },
-  });
-
-  // Create Invoice Items
-  await prisma.invoiceItem.create({
-    data: {
-      title: 'Web Development - Sprint 1',
-      price: 5000.0,
-      total: 5000.0,
-      quantity: 1,
-      description: 'Development of the MVP frontend',
-      serviceId: service1.id,
-      invoiceId: invoice1.id,
-    },
-  });
+  console.log('🌱 Seeding database...');
 
   console.log('✅ Seeding complete!');
@@ -122,5 +81,5 @@
 main()
   .catch((e) => {
-    console.error(e);
+    console.error('Error seeding database:', e);
     process.exit(1);
   })
Index: src/api/customer.ts
===================================================================
--- src/api/customer.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/api/customer.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,5 +1,5 @@
 import { useMemo } from 'react';
 // types
-import { Customer } from 'mvpmasters-shared';
+import { Customer } from 'src/schemas';
 // db
 import { endpoints, fetcher } from 'src/utils/axios';
Index: src/api/employee.ts
===================================================================
--- src/api/employee.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/api/employee.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,45 @@
+import { useMemo } from 'react';
+// types
+import { Employee } from 'src/schemas';
+// db
+import { endpoints, fetcher } from 'src/utils/axios';
+import axios from 'src/utils/axios';
+// swr
+import useSWR, { mutate } from 'swr';
+
+export function useGetEmployees() {
+  const collectionName = endpoints.employee;
+
+  const { data, isLoading, error, isValidating } = useSWR(collectionName, fetcher<Employee[]>, {
+    revalidateOnFocus: false,
+  });
+
+  const memoizedValue = useMemo(
+    () => ({
+      employees: data || [],
+      employeesLoading: isLoading,
+      employeesError: error,
+      employeesValidating: isValidating,
+      employeesEmpty: !isLoading && !data?.length,
+    }),
+    [data, error, isLoading, isValidating]
+  );
+
+  return memoizedValue;
+}
+
+export async function createEmployee(employeeData: Partial<Employee>): Promise<Employee> {
+  try {
+    const response = await axios.post<Employee>(endpoints.employee, employeeData);
+
+    // Mutate the SWR cache to include the new employee
+    await mutate<Employee[]>(endpoints.employee, (currentData = []) => [
+      ...currentData,
+      response.data,
+    ]);
+
+    return response.data;
+  } catch (error) {
+    throw error;
+  }
+}
Index: src/api/invoice.ts
===================================================================
--- src/api/invoice.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/api/invoice.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,8 +1,11 @@
 import { useMemo } from 'react';
 // types
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice, UpdateInvoice } from 'src/schemas';
 // db
 import useSWR from 'swr';
 import { endpoints, fetcher } from 'src/utils/axios';
+import axios from 'src/utils/axios';
+import { mutate } from 'swr';
+import { useSWRConfig } from 'swr';
 
 interface InvoiceFilters {
@@ -51,26 +54,102 @@
 }
 
-// export function useGetInvoice({ id }: { id: string }) {
-//   const collectionName = collections.invoice;
+export function useGetInvoice({ id }: { id: string }) {
+  const path = endpoints.invoice;
 
-//   const { data, isLoading, error, isValidating } = useSWR(
-//     [collectionName, id],
-//     () => documentFetcher<Invoice>(collectionName, id),
-//     {
-//       revalidateOnFocus: false,
-//     }
-//   );
+  const { data, isLoading, error, isValidating } = useSWR(
+    `${path}/${id}`,
+    () => fetcher<Invoice>(`${path}/${id}`),
+    {
+      revalidateOnFocus: false,
+    }
+  );
 
-//   const memoizedValue = useMemo(
-//     () => ({
-//       currentInvoice: data || null,
-//       currentInvoiceLoading: isLoading,
-//       currentInvoiceError: error,
-//       currentInvoiceValidating: isValidating,
-//       currentInvoiceEmpty: !isLoading && !data,
-//     }),
-//     [data, error, isLoading, isValidating]
-//   );
+  const memoizedValue = useMemo(
+    () => ({
+      currentInvoice: data || null,
+      currentInvoiceLoading: isLoading,
+      currentInvoiceError: error,
+      currentInvoiceValidating: isValidating,
+      currentInvoiceEmpty: !isLoading && !data,
+    }),
+    [data, error, isLoading, isValidating]
+  );
 
-//   return memoizedValue;
-// }
+  return memoizedValue;
+}
+
+// Add this interface for the create invoice payload
+interface CreateInvoicePayload {
+  createDate: Date;
+  dueDate: Date;
+  items: any[];
+  invoiceNumber: string;
+  invoiceFrom: any;
+  invoiceTo: any;
+  currency: string;
+  quantityType: string;
+  month: string;
+  status?: string;
+  taxes?: number;
+  discount?: number;
+  totalAmount: number;
+  pdfRef?: string;
+}
+
+export async function createInvoice(data: CreateInvoicePayload): Promise<Invoice> {
+  const response = await axios.post<Invoice>(endpoints.invoice, data);
+
+  // Mutate the SWR cache to include the new invoice
+  await mutate(
+    endpoints.invoice,
+    (existingInvoices: Invoice[] = []) => [response.data, ...existingInvoices],
+    false // Set to false to avoid revalidation since we already have the new data
+  );
+
+  return response.data;
+}
+
+export async function updateInvoice(id: string, data: Partial<UpdateInvoice>) {
+  const response = await axios.patch<Invoice>(`${endpoints.invoice}/${id}`, data);
+
+  // Mutate the individual invoice cache
+  await mutate(`${endpoints.invoice}/${id}`, response.data, false);
+
+  // Mutate the invoice list cache
+  await mutate(
+    endpoints.invoice,
+    (existingInvoices: Invoice[] = []) =>
+      existingInvoices.map((invoice) => (invoice.id === id ? response.data : invoice)),
+    false
+  );
+
+  return response.data;
+}
+
+export async function deleteInvoice(id: string) {
+  const response = await axios.delete<Invoice>(`${endpoints.invoice}/${id}`);
+
+  // Mutate the invoice list cache to remove the deleted invoice
+  await mutate(
+    endpoints.invoice,
+    (existingInvoices: Invoice[] = []) => existingInvoices.filter((invoice) => invoice.id !== id),
+    false
+  );
+
+  return response.data;
+}
+
+// Update the useDeleteInvoice hook to use the new implementation
+export function useDeleteInvoice() {
+  const deleteInvoiceMutation = async (id: string) => {
+    try {
+      await deleteInvoice(id);
+      return true;
+    } catch (error) {
+      console.error('Error deleting invoice:', error);
+      throw error;
+    }
+  };
+
+  return { deleteInvoiceMutation };
+}
Index: src/api/service.ts
===================================================================
--- src/api/service.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/api/service.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,16 +1,17 @@
 import { useMemo } from 'react';
 // types
-import { Service } from 'mvpmasters-shared';
-// db
-import { collections, collectionFetcher as fetcher } from 'src/lib/firestore';
+import { Service } from 'src/schemas';
 // swr
 import useSWR from 'swr';
+import { endpoints, fetcher } from 'src/utils/axios';
 
 export function useGetServices() {
-  const collectionName = collections.service;
-
-  const { data, isLoading, error, isValidating } = useSWR(collectionName, fetcher<Service>, {
-    revalidateOnFocus: false,
-  });
+  const { data, isLoading, error, isValidating } = useSWR<Service[]>(
+    endpoints.service,
+    () => fetcher<Service[]>(endpoints.service),
+    {
+      revalidateOnFocus: false,
+    }
+  );
 
   const memoizedValue = useMemo(
Index: c/api/settings.ts
===================================================================
--- src/api/settings.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ 	(revision )
@@ -1,40 +1,0 @@
-import { useMemo } from 'react';
-// types
-import { Settings } from 'src/types/settings';
-// db
-import { collections, collectionFetcher as fetcher } from 'src/lib/firestore';
-// swr
-import useSWR from 'swr';
-
-export function useGetSettings() {
-  const collectionName = collections.settings;
-
-  const { data, isLoading, error, isValidating } = useSWR(collectionName, fetcher<Settings>, {
-    revalidateOnFocus: false,
-  });
-
-  const dataObject = transformArrayToObject(data);
-
-  const memoizedValue = useMemo(
-    () => ({
-      settings: dataObject || null,
-      settingsLoading: isLoading,
-      settingsError: error,
-      settingsValidating: isValidating,
-      settingsEmpty: !isLoading && !dataObject,
-    }),
-    [dataObject, error, isLoading, isValidating]
-  );
-
-  return memoizedValue;
-}
-
-const transformArrayToObject = (data?: Settings[]): Settings | undefined => {
-  if (!data) return undefined;
-
-  return data.reduce((accumulator: Settings, doc) => {
-    const { id, ...fields } = doc;
-    accumulator[id as keyof Settings] = fields;
-    return accumulator;
-  }, {} as Settings);
-};
Index: src/api/tenant.ts
===================================================================
--- src/api/tenant.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/api/tenant.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,23 @@
+import { useMemo } from 'react';
+import { Tenant } from 'src/schemas';
+import { endpoints, fetcher } from 'src/utils/axios';
+import useSWR from 'swr';
+
+export function useGetTenant() {
+  const { data, isLoading, error, isValidating } = useSWR(endpoints.tenant, fetcher<Tenant>, {
+    revalidateOnFocus: false,
+  });
+
+  const memoizedValue = useMemo(
+    () => ({
+      settings: data || null,
+      settingsLoading: isLoading,
+      settingsError: error,
+      settingsValidating: isValidating,
+      settingsEmpty: !isLoading && !data,
+    }),
+    [data, error, isLoading, isValidating]
+  );
+
+  return memoizedValue;
+}
Index: src/app/api/customers/[id]/route.ts
===================================================================
--- src/app/api/customers/[id]/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/app/api/customers/[id]/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,4 +1,4 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { customerSchema } from 'mvpmasters-shared';
+import { customerSchema } from 'src/schemas';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
@@ -14,7 +14,10 @@
     const validatedData = customerSchema.partial().parse(body);
 
-    const customer = await prisma.customer.update({
-      where: { id: params.id, userId },
-      data: validatedData,
+    const customer = await prisma.client.update({
+      where: { id: params.id },
+      data: {
+        ...validatedData,
+        bankAccounts: undefined,
+      },
     });
 
Index: src/app/api/customers/route.ts
===================================================================
--- src/app/api/customers/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/app/api/customers/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,6 +1,7 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { customerTableFiltersSchema, newCustomerSchema } from 'mvpmasters-shared';
+import { customerTableFiltersSchema, newCustomerSchema } from 'src/schemas';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
+import { CustomerStatus } from '@prisma/client';
 
 export async function GET(request: NextRequest) {
@@ -23,8 +24,10 @@
     const validatedFilters = customerTableFiltersSchema.parse(filters);
 
-    const customers = await prisma.customer.findMany({
+    const customers = await prisma.client.findMany({
       where: {
         name: { contains: validatedFilters.name, mode: 'insensitive' },
-        status: validatedFilters.status ? { equals: validatedFilters.status } : undefined,
+        status: validatedFilters.status
+          ? { equals: validatedFilters.status as CustomerStatus }
+          : undefined,
       },
     });
@@ -50,5 +53,5 @@
     console.log('validatedData', validatedData);
 
-    const customer = await prisma.customer.create({
+    const customer = await prisma.client.create({
       data: {
         ...validatedData,
Index: src/app/api/employees/route.ts
===================================================================
--- src/app/api/employees/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/app/api/employees/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,66 @@
+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 { EmployeeStatus } 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);
+
+    const employees = await prisma.employee.findMany({
+      where: {
+        tenantId,
+        name: { contains: validatedFilters.name, mode: 'insensitive' },
+        status: validatedFilters.status
+          ? { equals: validatedFilters.status as EmployeeStatus }
+          : undefined,
+      },
+    });
+
+    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 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/app/api/invoices/[id]/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,10 +1,16 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { invoiceSchema } from 'mvpmasters-shared';
+import { invoiceSchema, updateInvoiceSchema } from 'src/schemas';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
+import { Prisma } from '@prisma/client';
 
-export async function PATCH(request: NextRequest, { params }: { params: { id: string } }) {
+export async function GET(request: NextRequest, { params }: { params: { id: string } }) {
   try {
-    // Authenticate the request
+    // 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) {
@@ -13,32 +19,181 @@
     const { userId } = authResult;
 
-    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,
+    // Fetch invoice with user check
+    const invoice = await prisma.invoice.findFirst({
+      where: {
+        id: params.id,
+        // invoiceFromId: userId,
       },
       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) {
-    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
+    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 });
   }
 }
+
+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.invoiceItem.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,
+          createDate: validation.data.createDate,
+          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.invoiceItem.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 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/app/api/invoices/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,6 +1,7 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { invoiceSchema, invoiceTableFiltersSchema } from 'mvpmasters-shared';
+import { createInvoiceSchema, invoiceSchema, invoiceTableFiltersSchema } from 'src/schemas';
 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
@@ -41,9 +42,10 @@
     const invoices = await prisma.invoice.findMany({
       where: {
-        userId,
-        status: validatedFilters.status ? { equals: validatedFilters.status } : undefined,
+        status: validatedFilters.status
+          ? { equals: validatedFilters.status as InvoiceStatus }
+          : undefined,
         createDate: {
-          gte: validatedFilters.startDate,
-          lte: validatedFilters.endDate,
+          ...(validatedFilters.startDate && { gte: validatedFilters.startDate }),
+          ...(validatedFilters.endDate && { lte: validatedFilters.endDate }),
         },
         items:
@@ -77,12 +79,52 @@
 
     const body = await request.json();
-    const validatedData = invoiceSchema.parse(body);
+    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 invoice = await prisma.invoice.create({
       data: {
-        ...validatedData,
-        userId,
+        dueDate: validatedData.dueDate,
+        status: validatedData.status,
+        currency: validatedData.currency,
+        quantityType: validatedData.quantityType,
+        subTotal: validatedData.subTotal,
+        createDate: validatedData.createDate,
+        month: validatedData.month,
+        discount: validatedData.discount,
+        taxes: validatedData.taxes,
+        totalAmount: validatedData.totalAmount,
+        invoiceNumber: validatedData.invoiceNumber,
+        invoiceFromId: tenant.id,
+        invoiceToId: toCustomer.id,
         items: {
-          create: validatedData.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 },
+            },
+          })),
         },
       },
@@ -100,4 +142,5 @@
     return NextResponse.json(invoice, { status: 201 });
   } catch (error) {
+    console.error(error);
     return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
   }
Index: src/app/api/services/route.ts
===================================================================
--- src/app/api/services/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/app/api/services/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,11 @@
+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 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/app/api/tenant/route.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,52 @@
+import { NextResponse } from 'next/server';
+import prisma from 'src/lib/prisma';
+import { tenantSchema } from 'src/schemas';
+import { z } from 'zod';
+
+export async function GET() {
+  try {
+    const tenants = await prisma.tenant.findMany();
+    const tenant = tenants[0]; // Get first tenant since we're dealing with single tenant
+    console.log('tenant', tenant);
+    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: Request) {
+  try {
+    const body = await request.json();
+
+    // Validate request body
+    const validatedData = tenantSchema.parse(body);
+
+    // Check if tenant already exists
+    const existingTenants = await prisma.tenant.findMany();
+    if (existingTenants.length > 0) {
+      return NextResponse.json({ error: 'Tenant already exists' }, { status: 400 });
+    }
+
+    // Create new tenant
+    const tenant = await prisma.tenant.create({
+      data: validatedData,
+    });
+
+    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/dashboard/employee/list/page.tsx
===================================================================
--- src/app/dashboard/employee/list/page.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/app/dashboard/employee/list/page.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,9 @@
+'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 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/app/dashboard/employee/new/page.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,9 @@
+'use client';
+
+import { EmployeeCreateView } from 'src/sections/employee/view';
+
+// ----------------------------------------------------------------------
+
+export default function EmployeeCreatePage() {
+  return <EmployeeCreateView />;
+}
Index: src/layouts/dashboard/config-navigation.tsx
===================================================================
--- src/layouts/dashboard/config-navigation.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/layouts/dashboard/config-navigation.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -53,5 +53,5 @@
         items: [
           {
-            title: 'banking',
+            title: 'dashboard',
             path: paths.dashboard.banking,
             icon: ICONS.banking,
@@ -85,4 +85,13 @@
             ],
           },
+          {
+            title: 'Employees',
+            path: paths.dashboard.employee.list,
+            icon: <SvgColor src="/assets/icons/navbar/ic_user.svg" />,
+            children: [
+              { title: 'list', path: paths.dashboard.employee.list },
+              { title: 'create', path: paths.dashboard.employee.new },
+            ],
+          },
         ],
       },
Index: src/lib/auth-middleware.ts
===================================================================
--- src/lib/auth-middleware.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/lib/auth-middleware.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -4,9 +4,10 @@
 export interface AuthenticatedRequest extends NextRequest {
   userId: string;
+  tenantId: string;
 }
 
 export async function authenticateRequest(
   request: NextRequest
-): Promise<{ userId: string } | NextResponse> {
+): Promise<{ userId: string; tenantId: string } | NextResponse> {
   // Get the authorization header
   const authHeader = request.headers.get('Authorization');
@@ -22,10 +23,11 @@
     const decodedToken = await auth.verifyIdToken(token);
     const userId = decodedToken.uid;
+    const tenantId = decodedToken.customClaims?.tenantId || 'cm7bwtjy80000pb0m5qenk8am';
 
-    if (!userId) {
+    if (!userId || !tenantId) {
       return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
     }
 
-    return { userId };
+    return { userId, tenantId };
   } catch (error) {
     return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
Index: src/routes/paths.ts
===================================================================
--- src/routes/paths.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/routes/paths.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -34,4 +34,10 @@
       list: `${ROOTS.DASHBOARD}/customer/list`,
     },
+    employee: {
+      root: '/dashboard/employee',
+      list: '/dashboard/employee/list',
+      new: '/dashboard/employee/new',
+      edit: (id: string) => `/dashboard/employee/${id}/edit`,
+    },
   },
 };
Index: src/schemas/customer.ts
===================================================================
--- src/schemas/customer.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/schemas/customer.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,64 @@
+import { z } from 'zod';
+
+export const customerTableFilterValueSchema = z.union([z.string(), z.array(z.string())]);
+
+export const customerTableFiltersSchema = z.object({
+  name: z.string(),
+  role: z.array(z.string()),
+  status: z.string(),
+});
+
+export const addressSchema = z.object({
+  street: z.string(),
+  city: z.string().optional(),
+  country: z.string(),
+  state: z.string().optional(),
+  zip: z.string(),
+});
+
+export const bankAccountSchema = z.object({
+  accountNumber: z.string().optional(),
+  bicSwift: z.string().optional(),
+  iban: z.string().optional(),
+  routingNumber: z.string().optional(),
+});
+
+export const customerStatusSchema = z.union([
+  z.literal('active'),
+  z.literal('banned'),
+  z.literal('inactive'),
+]);
+
+export const customerSchema = z.object({
+  id: z.string().optional(),
+  name: z.string(),
+  email: z.string(),
+  address: addressSchema,
+  logoUrl: z.string().optional(),
+  phoneNumber: z.string().optional(),
+  vatNumber: z.string().optional(),
+  companyNumber: z.string().optional(),
+  representative: z.string(),
+  status: customerStatusSchema.optional(),
+});
+
+export const tenantSchema = customerSchema
+  .omit({
+    companyId: true,
+    status: true,
+  })
+  .extend({
+    lastInvoiceNumber: z.string(),
+  });
+
+export const newCustomerSchema = z.object({
+  name: z.string(),
+  email: z.string(),
+  address: addressSchema,
+  logoUrl: z.any().nullable().optional(),
+  phoneNumber: z.string().optional(),
+  vatNumber: z.string().optional(),
+  companyNumber: z.string().optional(),
+  representative: z.string(),
+  status: customerStatusSchema,
+});
Index: src/schemas/employee.ts
===================================================================
--- src/schemas/employee.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/schemas/employee.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,29 @@
+import { z } from 'zod';
+
+export const employeeTableFilterValueSchema = z.union([z.string(), z.array(z.string())]);
+
+export const employeeTableFiltersSchema = z.object({
+  name: z.string(),
+  status: z.string(),
+});
+
+export const employeeStatusSchema = z.union([z.literal('active'), z.literal('inactive')]);
+
+export const employeeSchema = z.object({
+  id: z.string().optional(),
+  name: z.string(),
+  email: z.string().email(),
+  status: employeeStatusSchema.optional(),
+  iban: z.string().optional(),
+  cv: z.string().optional(),
+  photo: z.string().optional(),
+  project: z.string().optional(),
+});
+
+export const newEmployeeSchema = employeeSchema
+  .omit({
+    id: true,
+  })
+  .extend({
+    status: employeeStatusSchema,
+  });
Index: src/schemas/index.ts
===================================================================
--- src/schemas/index.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/schemas/index.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,15 @@
+export * from './customer';
+export * from './invoice';
+
+export * from './models/customer';
+export * from './models/invoice';
+export * from './models/employee';
+
+// If not already exported, also export the schemas
+export {
+  employeeSchema,
+  employeeStatusSchema,
+  employeeTableFilterValueSchema,
+  employeeTableFiltersSchema,
+  newEmployeeSchema,
+} from './employee';
Index: src/schemas/invoice.ts
===================================================================
--- src/schemas/invoice.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/schemas/invoice.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,98 @@
+import { z } from 'zod';
+import { customerSchema, tenantSchema } from './customer';
+
+export const serviceSchema = z.object({
+  id: z.string(),
+  name: z.string(),
+  sprint: z.number(),
+  hour: z.number(),
+  month: z.number(),
+});
+
+export const invoiceTableFilterValueSchema = z
+  .union([z.string(), z.array(z.string()), z.date()])
+  .nullable();
+
+export const invoiceTableFiltersSchema = z.object({
+  name: z.string(),
+  service: z.array(z.string()),
+  status: z.string(),
+  startDate: z.date().nullable(),
+  endDate: z.date().nullable(),
+});
+
+export const invoiceItemSchema = z.object({
+  title: z.string(),
+  price: z.number(),
+  total: z.number(),
+  service: serviceSchema,
+  quantity: z.number(),
+  description: z.string(),
+});
+
+export const invoiceStatusSchema = z.union([
+  z.literal('draft'),
+  z.literal('processing'),
+  z.literal('pending'),
+  z.literal('overdue'),
+  z.literal('paid'),
+]);
+
+export const monthSchema = z.union([
+  z.literal('January'),
+  z.literal('February'),
+  z.literal('March'),
+  z.literal('April'),
+  z.literal('May'),
+  z.literal('June'),
+  z.literal('July'),
+  z.literal('August'),
+  z.literal('September'),
+  z.literal('October'),
+  z.literal('November'),
+  z.literal('December'),
+]);
+
+export const invoiceSchema = z.object({
+  id: z.string(),
+  sent: z.number().optional(),
+  dueDate: z.coerce.date(),
+  status: invoiceStatusSchema,
+  currency: z.union([z.literal('EUR'), z.literal('USD')]),
+  quantityType: z.union([
+    z.literal('Unit'),
+    z.literal('Hour'),
+    z.literal('Sprint'),
+    z.literal('Month'),
+  ]),
+  subTotal: z.number(),
+  createDate: z.coerce.date(),
+  month: monthSchema,
+  discount: z.number().optional(),
+  taxes: z.number().optional(),
+  totalAmount: z.number(),
+  invoiceNumber: z.string(),
+  items: z.array(invoiceItemSchema),
+  invoiceFrom: tenantSchema,
+  invoiceTo: customerSchema,
+  pdfRef: z.string().optional(),
+});
+
+export const updateInvoiceSchema = invoiceSchema.omit({
+  id: true,
+  sent: true,
+});
+
+export const createInvoiceSchema = invoiceSchema.omit({
+  id: true,
+  sent: true,
+});
+
+export interface InvoiceFilters {
+  name: string;
+  service: string[];
+  status: string;
+  startDate: Date | null;
+  endDate: Date | null;
+  where?: [string, string, any][];
+}
Index: src/schemas/models/customer.ts
===================================================================
--- src/schemas/models/customer.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/schemas/models/customer.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,21 @@
+import { z } from 'zod';
+import {
+  addressSchema,
+  bankAccountSchema,
+  customerSchema,
+  customerStatusSchema,
+  customerTableFilterValueSchema,
+  customerTableFiltersSchema,
+  newCustomerSchema,
+  tenantSchema,
+} from '../customer';
+
+export type CustomerTableFilters = z.infer<typeof customerTableFiltersSchema>;
+export type CustomerTableFilterValue = z.infer<typeof customerTableFilterValueSchema>;
+
+export type Address = z.infer<typeof addressSchema>;
+export type BankAccount = z.infer<typeof bankAccountSchema>;
+export type CustomerStatus = z.infer<typeof customerStatusSchema>;
+export type Customer = z.infer<typeof customerSchema>;
+export type NewCustomer = z.infer<typeof newCustomerSchema>;
+export type Tenant = z.infer<typeof tenantSchema>;
Index: src/schemas/models/employee.ts
===================================================================
--- src/schemas/models/employee.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/schemas/models/employee.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,15 @@
+import { z } from 'zod';
+import {
+  employeeSchema,
+  employeeStatusSchema,
+  employeeTableFilterValueSchema,
+  employeeTableFiltersSchema,
+  newEmployeeSchema,
+} from '../employee';
+
+export type EmployeeTableFilters = z.infer<typeof employeeTableFiltersSchema>;
+export type EmployeeTableFilterValue = z.infer<typeof employeeTableFilterValueSchema>;
+
+export type EmployeeStatus = z.infer<typeof employeeStatusSchema>;
+export type Employee = z.infer<typeof employeeSchema>;
+export type NewEmployee = z.infer<typeof newEmployeeSchema>;
Index: src/schemas/models/invoice.ts
===================================================================
--- src/schemas/models/invoice.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/schemas/models/invoice.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,23 @@
+import { z } from 'zod';
+import {
+  createInvoiceSchema,
+  invoiceItemSchema,
+  invoiceSchema,
+  invoiceStatusSchema,
+  invoiceTableFilterValueSchema,
+  invoiceTableFiltersSchema,
+  monthSchema,
+  serviceSchema,
+  updateInvoiceSchema,
+} from '../invoice';
+
+export type InvoiceTableFilterValue = z.infer<typeof invoiceTableFilterValueSchema>;
+export type InvoiceTableFilters = z.infer<typeof invoiceTableFiltersSchema>;
+
+export type Service = z.infer<typeof serviceSchema>;
+export type InvoiceItem = z.infer<typeof invoiceItemSchema>;
+export type InvoiceStatus = z.infer<typeof invoiceStatusSchema>;
+export type Month = z.infer<typeof monthSchema>;
+export type Invoice = z.infer<typeof invoiceSchema>;
+export type CreateInvoice = z.infer<typeof createInvoiceSchema>;
+export type UpdateInvoice = z.infer<typeof updateInvoiceSchema>;
Index: src/sections/company/company-item.tsx
===================================================================
--- src/sections/company/company-item.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/company/company-item.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -4,5 +4,5 @@
 import Stack, { StackProps } from '@mui/material/Stack';
 // types
-import { Customer } from 'mvpmasters-shared';
+import { Customer } from 'src/schemas';
 // components
 import Label from 'src/components/label';
Index: src/sections/company/company-list-dialog.tsx
===================================================================
--- src/sections/company/company-list-dialog.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/company/company-list-dialog.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -9,9 +9,10 @@
 import ListItemButton, { listItemButtonClasses } from '@mui/material/ListItemButton';
 // types
-import { Customer } from 'mvpmasters-shared';
+import { Customer } from 'src/schemas';
 // components
 import Iconify from 'src/components/iconify';
 import SearchNotFound from 'src/components/search-not-found';
 import { createFullAddress } from 'src/utils/create-full-address';
+import { Tenant } from 'src/schemas';
 
 // ----------------------------------------------------------------------
@@ -19,5 +20,6 @@
 type Props = {
   title?: string;
-  list: Customer[];
+  tenant?: Tenant;
+  list?: Customer[];
   action?: React.ReactNode;
   //
@@ -26,9 +28,10 @@
   //
   selected: (selectedId: string) => boolean;
-  onSelect: (address: Customer | null) => void;
+  onSelect: (address: Customer | Tenant | null) => void;
 };
 
 export default function AddressListDialog({
   title = 'Address Book',
+  tenant,
   list,
   action,
@@ -43,5 +46,5 @@
 
   const dataFiltered = applyFilter({
-    inputData: list,
+    inputData: list || (tenant ? [tenant] : []),
     query: searchCompany,
   });
@@ -54,5 +57,5 @@
 
   const handleSelectCompany = useCallback(
-    (company: Customer | null) => {
+    (company: Customer | Tenant | null) => {
       onSelect(company);
       setSearchCompany('');
@@ -156,5 +159,5 @@
 // ----------------------------------------------------------------------
 
-function applyFilter({ inputData, query }: { inputData: Customer[]; query: string }) {
+function applyFilter({ inputData, query }: { inputData: Tenant[] | Customer[]; query: string }) {
   if (query) {
     return inputData.filter(
Index: src/sections/employee/employee-new-edit-form.tsx
===================================================================
--- src/sections/employee/employee-new-edit-form.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/sections/employee/employee-new-edit-form.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,74 @@
+import { useCallback } from 'react';
+import { useForm } from 'react-hook-form';
+import { zodResolver } from '@hookform/resolvers/zod';
+// @mui
+import LoadingButton from '@mui/lab/LoadingButton';
+import Card from '@mui/material/Card';
+import Stack from '@mui/material/Stack';
+import Grid from '@mui/material/Unstable_Grid2';
+// routes
+import { paths } from 'src/routes/paths';
+import { useRouter } from 'src/routes/hooks';
+// types
+import { NewEmployee, newEmployeeSchema } from 'src/schemas';
+// components
+import { useSnackbar } from 'src/components/snackbar';
+import FormProvider, { RHFTextField, RHFUploadAvatar } from 'src/components/hook-form';
+import { createEmployee } from 'src/api/employee';
+
+export default function EmployeeNewEditForm() {
+  const router = useRouter();
+  const { enqueueSnackbar } = useSnackbar();
+
+  const methods = useForm<NewEmployee>({
+    resolver: zodResolver(newEmployeeSchema),
+    defaultValues: {
+      name: '',
+      email: '',
+      status: 'active' as const,
+      project: '',
+      iban: '',
+      photo: '',
+      cv: '',
+    },
+  });
+
+  const {
+    handleSubmit,
+    formState: { isSubmitting },
+  } = methods;
+
+  const onSubmit = handleSubmit(async (data) => {
+    try {
+      await createEmployee(data);
+      enqueueSnackbar('Create success!');
+      router.push(paths.dashboard.employee.list);
+    } catch (error) {
+      console.error(error);
+    }
+  });
+
+  return (
+    <FormProvider methods={methods} onSubmit={onSubmit}>
+      <Grid container spacing={3}>
+        <Grid xs={12} md={8}>
+          <Card sx={{ p: 3 }}>
+            <Stack spacing={3}>
+              <RHFTextField name="name" label="Full Name" />
+              <RHFTextField name="email" label="Email Address" />
+              <RHFTextField name="project" label="Project" />
+              <RHFTextField name="iban" label="IBAN" />
+              <RHFTextField name="cv" label="CV Link" />
+            </Stack>
+
+            <Stack alignItems="flex-end" sx={{ mt: 3 }}>
+              <LoadingButton type="submit" variant="contained" loading={isSubmitting}>
+                Create Employee
+              </LoadingButton>
+            </Stack>
+          </Card>
+        </Grid>
+      </Grid>
+    </FormProvider>
+  );
+}
Index: src/sections/employee/employee-quick-edit-form.tsx
===================================================================
--- src/sections/employee/employee-quick-edit-form.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/sections/employee/employee-quick-edit-form.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,110 @@
+import * as Yup from 'yup';
+import { useMemo } from 'react';
+import { useForm } from 'react-hook-form';
+import { zodResolver } from '@hookform/resolvers/zod';
+// @mui
+import LoadingButton from '@mui/lab/LoadingButton';
+import Box from '@mui/material/Box';
+import Button from '@mui/material/Button';
+import Dialog from '@mui/material/Dialog';
+import MenuItem from '@mui/material/MenuItem';
+import DialogTitle from '@mui/material/DialogTitle';
+import DialogActions from '@mui/material/DialogActions';
+import DialogContent from '@mui/material/DialogContent';
+// types
+import { Employee, employeeSchema } from 'src/schemas';
+// components
+import { useSnackbar } from 'src/components/snackbar';
+import FormProvider, { RHFSelect, RHFTextField } from 'src/components/hook-form';
+
+// ----------------------------------------------------------------------
+
+type Props = {
+  open: boolean;
+  onClose: VoidFunction;
+  currentEmployee?: Employee;
+};
+
+export const EMPLOYEE_STATUS_OPTIONS = [
+  { value: 'active', label: 'Active' },
+  { value: 'inactive', label: 'Inactive' },
+];
+
+export default function EmployeeQuickEditForm({ currentEmployee, open, onClose }: Props) {
+  const { enqueueSnackbar } = useSnackbar();
+
+  const defaultValues = useMemo(
+    () => ({
+      name: currentEmployee?.name || '',
+      email: currentEmployee?.email || '',
+      status: currentEmployee?.status || 'active',
+      project: currentEmployee?.project || '',
+      iban: currentEmployee?.iban || '',
+    }),
+    [currentEmployee]
+  );
+
+  const methods = useForm({
+    resolver: zodResolver(employeeSchema),
+    defaultValues,
+  });
+
+  const {
+    reset,
+    handleSubmit,
+    formState: { isSubmitting },
+  } = methods;
+
+  const onSubmit = handleSubmit(async (data) => {
+    try {
+      await new Promise((resolve) => setTimeout(resolve, 500));
+      reset();
+      onClose();
+      enqueueSnackbar('Update success!');
+    } catch (error) {
+      console.error(error);
+    }
+  });
+
+  return (
+    <Dialog fullWidth maxWidth="xs" open={open} onClose={onClose}>
+      <FormProvider methods={methods} onSubmit={onSubmit}>
+        <DialogTitle>Quick Update</DialogTitle>
+
+        <DialogContent>
+          <Box
+            rowGap={3}
+            columnGap={2}
+            display="grid"
+            gridTemplateColumns={{
+              xs: 'repeat(1, 1fr)',
+            }}
+            sx={{ pt: 3 }}
+          >
+            <RHFTextField name="name" label="Full Name" />
+            <RHFTextField name="email" label="Email Address" />
+            <RHFTextField name="project" label="Project" />
+            <RHFTextField name="iban" label="IBAN" />
+            <RHFSelect name="status" label="Status">
+              {EMPLOYEE_STATUS_OPTIONS.map((status) => (
+                <MenuItem key={status.value} value={status.value}>
+                  {status.label}
+                </MenuItem>
+              ))}
+            </RHFSelect>
+          </Box>
+        </DialogContent>
+
+        <DialogActions>
+          <Button variant="outlined" onClick={onClose}>
+            Cancel
+          </Button>
+
+          <LoadingButton type="submit" variant="contained" loading={isSubmitting}>
+            Update
+          </LoadingButton>
+        </DialogActions>
+      </FormProvider>
+    </Dialog>
+  );
+}
Index: src/sections/employee/employee-table-filters-result.tsx
===================================================================
--- src/sections/employee/employee-table-filters-result.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/sections/employee/employee-table-filters-result.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,86 @@
+// @mui
+import Box from '@mui/material/Box';
+import Chip from '@mui/material/Chip';
+import Paper from '@mui/material/Paper';
+import Button from '@mui/material/Button';
+import Stack, { StackProps } from '@mui/material/Stack';
+// types
+import { EmployeeTableFilters } from 'src/schemas';
+// components
+import Iconify from 'src/components/iconify';
+
+// ----------------------------------------------------------------------
+
+interface Props extends StackProps {
+  filters: EmployeeTableFilters;
+  onFilters: (name: string, value: string | string[]) => void;
+  onResetFilters: VoidFunction;
+  results: number;
+}
+
+export default function EmployeeTableFiltersResult({
+  filters,
+  onFilters,
+  onResetFilters,
+  results,
+  ...other
+}: Props) {
+  const handleRemoveStatus = () => {
+    onFilters('status', 'all');
+  };
+
+  const handleRemoveName = () => {
+    onFilters('name', '');
+  };
+
+  return (
+    <Stack spacing={1.5} {...other}>
+      <Box sx={{ typography: 'body2' }}>
+        <strong>{results}</strong>
+        <Box component="span" sx={{ color: 'text.secondary', ml: 0.25 }}>
+          results found
+        </Box>
+      </Box>
+
+      <Stack flexGrow={1} spacing={1} direction="row" flexWrap="wrap" alignItems="center">
+        {filters.status !== 'all' && (
+          <Block label="Status:">
+            <Chip size="small" label={filters.status} onDelete={handleRemoveStatus} />
+          </Block>
+        )}
+
+        {filters.name && (
+          <Block label="Name:">
+            <Chip size="small" label={filters.name} onDelete={handleRemoveName} />
+          </Block>
+        )}
+
+        <Button
+          color="error"
+          onClick={onResetFilters}
+          startIcon={<Iconify icon="solar:trash-bin-trash-bold" />}
+        >
+          Clear
+        </Button>
+      </Stack>
+    </Stack>
+  );
+}
+
+// ----------------------------------------------------------------------
+
+type BlockProps = {
+  label: string;
+  children: React.ReactNode;
+};
+
+function Block({ label, children }: BlockProps) {
+  return (
+    <Stack direction="row" alignItems="center" sx={{ typography: 'body2' }}>
+      <Box component="span" sx={{ color: 'text.secondary' }}>
+        {label}&nbsp;
+      </Box>
+      {children}
+    </Stack>
+  );
+}
Index: src/sections/employee/employee-table-row.tsx
===================================================================
--- src/sections/employee/employee-table-row.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/sections/employee/employee-table-row.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,71 @@
+// @mui
+import Avatar from '@mui/material/Avatar';
+import Tooltip from '@mui/material/Tooltip';
+import TableRow from '@mui/material/TableRow';
+import TableCell from '@mui/material/TableCell';
+import IconButton from '@mui/material/IconButton';
+// hooks
+import { useBoolean } from 'src/hooks/use-boolean';
+// types
+import { Employee } from 'src/schemas';
+// components
+import Label from 'src/components/label';
+import Iconify from 'src/components/iconify';
+//
+import EmployeeQuickEditForm from './employee-quick-edit-form';
+
+// ----------------------------------------------------------------------
+
+type Props = {
+  selected: boolean;
+  onEditRow: VoidFunction;
+  row: Employee;
+};
+
+export default function EmployeeTableRow({ row, selected, onEditRow }: Props) {
+  const { name, photo, project, status, email } = row;
+
+  const quickEdit = useBoolean();
+
+  return (
+    <>
+      <TableRow hover selected={selected}>
+        <TableCell sx={{ display: 'flex', alignItems: 'center' }}>
+          <Avatar alt={name} src={photo || ''} sx={{ mr: 2 }} />
+          <span>{name}</span>
+        </TableCell>
+
+        <TableCell sx={{ whiteSpace: 'nowrap' }}>{email}</TableCell>
+
+        <TableCell sx={{ whiteSpace: 'nowrap' }}>{project || '-'}</TableCell>
+
+        <TableCell>
+          <Label
+            variant="soft"
+            color={
+              (status === 'active' && 'success') ||
+              (status === 'inactive' && 'warning') ||
+              'default'
+            }
+          >
+            {status}
+          </Label>
+        </TableCell>
+
+        <TableCell align="right" sx={{ px: 1, whiteSpace: 'nowrap' }}>
+          <Tooltip title="Quick Edit" placement="top" arrow>
+            <IconButton color={quickEdit.value ? 'inherit' : 'default'} onClick={quickEdit.onTrue}>
+              <Iconify icon="solar:pen-bold" />
+            </IconButton>
+          </Tooltip>
+        </TableCell>
+      </TableRow>
+
+      <EmployeeQuickEditForm
+        currentEmployee={row}
+        open={quickEdit.value}
+        onClose={quickEdit.onFalse}
+      />
+    </>
+  );
+}
Index: src/sections/employee/view/employee-create-view.tsx
===================================================================
--- src/sections/employee/view/employee-create-view.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/sections/employee/view/employee-create-view.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,41 @@
+'use client';
+
+// @mui
+import Container from '@mui/material/Container';
+// routes
+import { paths } from 'src/routes/paths';
+// components
+import { useSettingsContext } from 'src/components/settings';
+import CustomBreadcrumbs from 'src/components/custom-breadcrumbs';
+//
+import EmployeeNewEditForm from '../employee-new-edit-form';
+
+// ----------------------------------------------------------------------
+
+export default function EmployeeCreateView() {
+  const settings = useSettingsContext();
+
+  return (
+    <Container maxWidth={settings.themeStretch ? false : 'lg'}>
+      <CustomBreadcrumbs
+        heading="Create a new employee"
+        links={[
+          {
+            name: 'Dashboard',
+            href: paths.dashboard.root,
+          },
+          {
+            name: 'Employee',
+            href: paths.dashboard.employee.list,
+          },
+          { name: 'New employee' },
+        ]}
+        sx={{
+          mb: { xs: 3, md: 5 },
+        }}
+      />
+
+      <EmployeeNewEditForm />
+    </Container>
+  );
+}
Index: src/sections/employee/view/employee-list-view.tsx
===================================================================
--- src/sections/employee/view/employee-list-view.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/sections/employee/view/employee-list-view.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,265 @@
+'use client';
+
+import isEqual from 'lodash/isEqual';
+import { useState, useCallback } from 'react';
+// @mui
+import { alpha } from '@mui/material/styles';
+import Tab from '@mui/material/Tab';
+import Tabs from '@mui/material/Tabs';
+import Card from '@mui/material/Card';
+import Table from '@mui/material/Table';
+import Button from '@mui/material/Button';
+import Container from '@mui/material/Container';
+import TableBody from '@mui/material/TableBody';
+import TableContainer from '@mui/material/TableContainer';
+// routes
+import { paths } from 'src/routes/paths';
+import { RouterLink } from 'src/routes/components';
+// hooks
+import { useBoolean } from 'src/hooks/use-boolean';
+// components
+import Label from 'src/components/label';
+import Iconify from 'src/components/iconify';
+import Scrollbar from 'src/components/scrollbar';
+import { useSettingsContext } from 'src/components/settings';
+import CustomBreadcrumbs from 'src/components/custom-breadcrumbs';
+import {
+  useTable,
+  getComparator,
+  emptyRows,
+  TableNoData,
+  TableEmptyRows,
+  TableHeadCustom,
+  TablePaginationCustom,
+} from 'src/components/table';
+// types
+import { Employee, EmployeeTableFilters, EmployeeTableFilterValue } from 'src/schemas';
+//
+import { useGetEmployees } from 'src/api/employee';
+import EmployeeTableRow from '../employee-table-row';
+import EmployeeTableFiltersResult from '../employee-table-filters-result';
+
+const STATUS_OPTIONS = [
+  { value: 'all', label: 'All' },
+  { value: 'active', label: 'Active' },
+  { value: 'inactive', label: 'Inactive' },
+];
+
+const TABLE_HEAD = [
+  { id: 'name', label: 'Name' },
+  { id: 'email', label: 'Email' },
+  { id: 'project', label: 'Project' },
+  { id: 'status', label: 'Status', width: 100 },
+  { id: '', width: 88 },
+];
+
+const defaultFilters: EmployeeTableFilters = {
+  name: '',
+  status: 'all',
+};
+
+export default function EmployeeListView() {
+  const table = useTable({ defaultDense: true });
+  const settings = useSettingsContext();
+  const { employees } = useGetEmployees();
+  const [filters, setFilters] = useState(defaultFilters);
+
+  const dataFiltered = applyFilter({
+    inputData: employees,
+    comparator: getComparator(table.order, table.orderBy),
+    filters,
+  });
+
+  const dataInPage = dataFiltered.slice(
+    table.page * table.rowsPerPage,
+    table.page * table.rowsPerPage + table.rowsPerPage
+  );
+
+  const denseHeight = table.dense ? 52 : 72;
+
+  const canReset = !isEqual(defaultFilters, filters);
+
+  const notFound = (!dataFiltered.length && canReset) || !dataFiltered.length;
+
+  const handleFilters = useCallback(
+    (name: string, value: EmployeeTableFilterValue) => {
+      table.onResetPage();
+      setFilters((prevState: EmployeeTableFilters) => ({
+        ...prevState,
+        [name]: value,
+      }));
+    },
+    [table]
+  );
+
+  const handleFilterStatus = useCallback(
+    (event: React.SyntheticEvent, newValue: string) => {
+      handleFilters('status', newValue);
+    },
+    [handleFilters]
+  );
+
+  const handleResetFilters = useCallback(() => {
+    setFilters(defaultFilters);
+  }, []);
+
+  return (
+    <>
+      <Container maxWidth={settings.themeStretch ? false : 'lg'}>
+        <CustomBreadcrumbs
+          heading="List"
+          links={[
+            { name: 'Dashboard', href: paths.dashboard.root },
+            { name: 'Employee', href: paths.dashboard.employee.list },
+            { name: 'List' },
+          ]}
+          action={
+            <Button
+              component={RouterLink}
+              href={paths.dashboard.employee.new}
+              variant="contained"
+              startIcon={<Iconify icon="mingcute:add-line" />}
+            >
+              New Employee
+            </Button>
+          }
+          sx={{
+            mb: { xs: 3, md: 5 },
+          }}
+        />
+
+        <Card>
+          <Tabs
+            value={filters.status}
+            onChange={handleFilterStatus}
+            sx={{
+              px: 2.5,
+              boxShadow: (theme) => `inset 0 -2px 0 0 ${alpha(theme.palette.grey[500], 0.08)}`,
+            }}
+          >
+            {STATUS_OPTIONS.map((tab) => (
+              <Tab
+                key={tab.value}
+                iconPosition="end"
+                value={tab.value}
+                label={tab.label}
+                icon={
+                  <Label
+                    variant={
+                      ((tab.value === 'all' || tab.value === filters.status) && 'filled') || 'soft'
+                    }
+                    color={
+                      (tab.value === 'active' && 'success') ||
+                      (tab.value === 'inactive' && 'warning') ||
+                      'default'
+                    }
+                  >
+                    {tab.value === 'all' && employees.length}
+                    {tab.value === 'active' &&
+                      employees.filter((employee) => employee.status === 'active').length}
+                    {tab.value === 'inactive' &&
+                      employees.filter((employee) => employee.status === 'inactive').length}
+                  </Label>
+                }
+              />
+            ))}
+          </Tabs>
+
+          {canReset && (
+            <EmployeeTableFiltersResult
+              filters={filters}
+              onFilters={handleFilters}
+              onResetFilters={handleResetFilters}
+              results={dataFiltered.length}
+              sx={{ p: 2.5, pt: 0 }}
+            />
+          )}
+
+          <TableContainer sx={{ position: 'relative', overflow: 'unset' }}>
+            <Scrollbar>
+              <Table size={table.dense ? 'small' : 'medium'} sx={{ minWidth: 960 }}>
+                <TableHeadCustom
+                  order={table.order}
+                  orderBy={table.orderBy}
+                  headLabel={TABLE_HEAD}
+                  rowCount={employees.length}
+                  numSelected={table.selected.length}
+                  onSort={table.onSort}
+                />
+
+                <TableBody>
+                  {dataFiltered
+                    .slice(
+                      table.page * table.rowsPerPage,
+                      table.page * table.rowsPerPage + table.rowsPerPage
+                    )
+                    .map((row) => (
+                      <EmployeeTableRow
+                        key={row.id}
+                        row={row}
+                        selected={table.selected.includes(row.id!)}
+                        onEditRow={() => {}}
+                      />
+                    ))}
+
+                  <TableEmptyRows
+                    height={denseHeight}
+                    emptyRows={emptyRows(table.page, table.rowsPerPage, employees.length)}
+                  />
+
+                  <TableNoData notFound={notFound} />
+                </TableBody>
+              </Table>
+            </Scrollbar>
+          </TableContainer>
+
+          <TablePaginationCustom
+            count={dataFiltered.length}
+            page={table.page}
+            rowsPerPage={table.rowsPerPage}
+            onPageChange={table.onChangePage}
+            onRowsPerPageChange={table.onChangeRowsPerPage}
+            dense={table.dense}
+            onChangeDense={table.onChangeDense}
+          />
+        </Card>
+      </Container>
+    </>
+  );
+}
+
+// ----------------------------------------------------------------------
+
+function applyFilter({
+  inputData,
+  comparator,
+  filters,
+}: {
+  inputData: Employee[];
+  comparator: (a: any, b: any) => number;
+  filters: EmployeeTableFilters;
+}) {
+  const { name, status } = filters;
+
+  const stabilizedThis = inputData.map((el, index) => [el, index] as const);
+
+  stabilizedThis.sort((a, b) => {
+    const order = comparator(a[0], b[0]);
+    if (order !== 0) return order;
+    return a[1] - b[1];
+  });
+
+  inputData = stabilizedThis.map((el) => el[0]);
+
+  if (name) {
+    inputData = inputData.filter(
+      (employee) => employee.name.toLowerCase().indexOf(name.toLowerCase()) !== -1
+    );
+  }
+
+  if (status !== 'all') {
+    inputData = inputData.filter((employee) => employee.status === status);
+  }
+
+  return inputData;
+}
Index: src/sections/employee/view/index.ts
===================================================================
--- src/sections/employee/view/index.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
+++ src/sections/employee/view/index.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -0,0 +1,2 @@
+export { default as EmployeeListView } from './employee-list-view';
+export { default as EmployeeCreateView } from './employee-create-view';
Index: src/sections/invoice/invoice-details.tsx
===================================================================
--- src/sections/invoice/invoice-details.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-details.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -18,5 +18,5 @@
 import { fCurrency } from 'src/utils/format-number';
 // types
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice } from 'src/schemas';
 // components
 import Label from 'src/components/label';
@@ -28,4 +28,5 @@
 import { getQuantityType } from 'src/utils/get-invoice-quantity-type';
 import InvoiceToolbar from './invoice-toolbar';
+import { updateInvoice } from 'src/api/invoice';
 
 // ----------------------------------------------------------------------
@@ -59,5 +60,8 @@
   const handleChangeStatus = useCallback(
     async (event: React.ChangeEvent<HTMLInputElement>) => {
-      await updateDocument(collections.invoice, invoice.id, { status: event.target.value });
+      // await updateDocument(collections.invoice, invoice.id, { status: event.target.value });
+      await updateInvoice(invoice.id, {
+        status: event.target.value as 'draft' | 'processing' | 'pending' | 'overdue' | 'paid',
+      });
       mutate([collections.invoice, invoice.id]);
     },
@@ -240,7 +244,7 @@
             {invoice.invoiceTo.name}
             <br />
-            {!!invoice.invoiceTo.companyId && (
+            {!!invoice.invoiceTo.companyNumber && (
               <>
-                Company ID: {invoice.invoiceTo.companyId}
+                Company ID: {invoice.invoiceTo.companyNumber}
                 <br />
               </>
@@ -257,5 +261,5 @@
               Date Issued
             </Typography>
-            {fDate(invoice.createDate.toDate())}
+            {fDate(invoice.createDate)}
           </Stack>
 
@@ -264,5 +268,5 @@
               Due Date
             </Typography>
-            {fDate(invoice.dueDate.toDate())}
+            {fDate(invoice.dueDate)}
           </Stack>
         </Box>
Index: src/sections/invoice/invoice-ee-pdf.tsx
===================================================================
--- src/sections/invoice/invoice-ee-pdf.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-ee-pdf.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -5,5 +5,5 @@
 import { fCurrency } from 'src/utils/format-number';
 // types
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice } from 'src/schemas';
 import { createFullAddress } from 'src/utils/create-full-address';
 import { getQuantityType } from 'src/utils/get-invoice-quantity-type';
@@ -229,9 +229,9 @@
           <View style={styles.col6}>
             <Text style={[styles.subtitle1, styles.mb4]}>Date Issued</Text>
-            <Text style={styles.body2}>{fDate(createDate.toDate())}</Text>
+            <Text style={styles.body2}>{fDate(createDate)}</Text>
           </View>
           <View style={styles.col6}>
             <Text style={[styles.subtitle1, styles.mb4]}>Due date</Text>
-            <Text style={styles.body2}>{fDate(dueDate.toDate())}</Text>
+            <Text style={styles.body2}>{fDate(dueDate)}</Text>
           </View>
         </View>
Index: src/sections/invoice/invoice-mk-pdf.tsx
===================================================================
--- src/sections/invoice/invoice-mk-pdf.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-mk-pdf.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -5,5 +5,5 @@
 import { fCurrency } from 'src/utils/format-number';
 // types
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice } from 'src/schemas';
 import { createFullAddress } from 'src/utils/create-full-address';
 import { getQuantityType } from 'src/utils/get-invoice-quantity-type';
@@ -179,9 +179,9 @@
           <View style={styles.col6}>
             <Text style={[styles.subtitle1, styles.mb4]}>Date Issued</Text>
-            <Text style={styles.body2}>{fDate(createDate.toDate())}</Text>
+            <Text style={styles.body2}>{fDate(createDate)}</Text>
           </View>
           <View style={styles.col6}>
             <Text style={[styles.subtitle1, styles.mb4]}>Due date</Text>
-            <Text style={styles.body2}>{fDate(dueDate.toDate())}</Text>
+            <Text style={styles.body2}>{fDate(dueDate)}</Text>
           </View>
         </View>
Index: src/sections/invoice/invoice-new-edit-address.tsx
===================================================================
--- src/sections/invoice/invoice-new-edit-address.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-new-edit-address.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -7,5 +7,5 @@
 import Typography from '@mui/material/Typography';
 // hooks
-import { useGetSettings } from 'src/api/settings';
+import { useGetTenant } from 'src/api/tenant';
 import { useBoolean } from 'src/hooks/use-boolean';
 import { useResponsive } from 'src/hooks/use-responsive';
@@ -32,5 +32,5 @@
   const { invoiceFrom, invoiceTo } = values;
 
-  const { settings } = useGetSettings();
+  const { settings: tenant } = useGetTenant();
   const { customers } = useGetCustomers();
 
@@ -100,5 +100,5 @@
       </Stack>
 
-      {settings && (
+      {tenant && (
         <CompanyListDialog
           title="Companies"
@@ -106,6 +106,6 @@
           onClose={from.onFalse}
           selected={(selectedId: string) => invoiceFrom?.id === selectedId}
-          onSelect={(company) => setValue('invoiceFrom', company)}
-          list={[settings?.company, settings?.['company-ee']]}
+          onSelect={(tenant) => setValue('invoiceFrom', tenant)}
+          tenant={tenant}
           action={
             <Button
Index: src/sections/invoice/invoice-new-edit-details.tsx
===================================================================
--- src/sections/invoice/invoice-new-edit-details.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-new-edit-details.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -14,5 +14,5 @@
 import { fCurrency } from 'src/utils/format-number';
 // types
-import { InvoiceItem } from 'mvpmasters-shared';
+import { InvoiceItem } from 'src/schemas';
 // components
 import Iconify from 'src/components/iconify';
@@ -75,14 +75,26 @@
   const handleSelectService = useCallback(
     (index: number, option: string) => {
-      setValue(
-        `items[${index}].price`,
-        invoiceServices.find((service) => service.id === option)?.price?.[
-          values.quantityType?.toLowerCase() as 'sprint' | 'hour' | 'month'
-        ]
-      );
-      setValue(
-        `items[${index}].total`,
-        values.items.map((item: InvoiceItem) => item.quantity * item.price)[index]
-      );
+      const service = invoiceServices.find((service) => service.id === option);
+      if (!service) return;
+
+      const quantityType = values.quantityType?.toLowerCase();
+      let price = 0;
+
+      switch (quantityType) {
+        case 'sprint':
+          price = service.sprint;
+          break;
+        case 'hour':
+          price = service.hour;
+          break;
+        case 'month':
+          price = service.month;
+          break;
+        default:
+          price = 0;
+      }
+
+      setValue(`items[${index}].price`, price);
+      setValue(`items[${index}].total`, values.items[index].quantity * price);
     },
     [setValue, values.items, values.quantityType, invoiceServices]
Index: src/sections/invoice/invoice-new-edit-form.tsx
===================================================================
--- src/sections/invoice/invoice-new-edit-form.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-new-edit-form.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -11,5 +11,5 @@
 import { useRouter } from 'src/routes/hooks';
 // types
-import { Invoice } from 'mvpmasters-shared';
+import { CreateInvoice, Invoice } from 'src/schemas';
 // hooks
 import { useBoolean } from 'src/hooks/use-boolean';
@@ -20,19 +20,13 @@
 import uploadToFirebaseStorage from 'src/utils/upload-to-firebase-storage';
 import { pdf } from '@react-pdf/renderer';
-import { useGetSettings } from 'src/api/settings';
-import {
-  collections,
-  documents,
-  firestoreBatch,
-  generateId,
-  updateDocument,
-} from 'src/lib/firestore';
+import { useGetTenant } from 'src/api/tenant';
+import { collections, generateId, updateDocument } from 'src/lib/firestore';
 import { useGetServices } from 'src/api/service';
 import { mutate } from 'swr';
-import { Timestamp } from 'firebase/firestore';
 import InvoiceNewEditStatusDate from './invoice-new-edit-status-date';
 import InvoiceNewEditAddress from './invoice-new-edit-address';
 import InvoiceNewEditDetails from './invoice-new-edit-details';
 import InvoicePDF from './invoice-pdf';
+import { createInvoice, updateInvoice } from 'src/api/invoice';
 
 // ----------------------------------------------------------------------
@@ -58,4 +52,13 @@
 ];
 
+interface InvoiceItem {
+  service: string | null;
+  title: string;
+  price: number;
+  total: number;
+  quantity: number;
+  description: string;
+}
+
 export default function InvoiceNewEditForm({ isCopy, currentInvoice }: Props) {
   const router = useRouter();
@@ -69,5 +72,7 @@
     description: Yup.string().required('Description is required'),
     service: Yup.string().nullable(),
-    quantity: Yup.number().required('Quantity is required').min(0.5, 'Quantity must be at least 1'),
+    quantity: Yup.number()
+      .required('Quantity is required')
+      .min(0.5, 'Quantity must be at least 0.5'),
     price: Yup.number().required('Price is required').min(0, 'Price must be at least 0'),
     total: Yup.number().required('Total is required').min(0, 'Total must be at least 0'),
@@ -91,5 +96,5 @@
       .required('Quantity type is required'),
     month: Yup.string().oneOf(monthNames).required('Month is required'),
-    status: Yup.string().required(),
+    status: Yup.string().oneOf(['draft', 'processing', 'pending', 'overdue', 'paid']).required(),
     totalAmount: Yup.number().required(),
     // not required
@@ -103,5 +108,6 @@
 
   const { services: invoiceServices } = useGetServices();
-  const { settings, settingsEmpty, settingsLoading } = useGetSettings();
+  console.log('invoiceServices', invoiceServices);
+  const { settings: tenant, settingsEmpty, settingsLoading } = useGetTenant();
 
   const defaultValues = useMemo(
@@ -110,7 +116,9 @@
         !isCopy && currentInvoice?.invoiceNumber
           ? currentInvoice?.invoiceNumber
-          : incrementInvoiceNumber(settings?.invoice?.lastInvoiceNumber),
-      createDate: currentInvoice?.createDate?.toDate() || new Date(),
-      dueDate: currentInvoice?.dueDate?.toDate() || null,
+          : incrementInvoiceNumber(tenant?.lastInvoiceNumber),
+      createDate: currentInvoice?.createDate ? new Date(currentInvoice.createDate) : new Date(),
+      dueDate: currentInvoice?.dueDate
+        ? new Date(currentInvoice.dueDate)
+        : new Date(Date.now() + 30 * 24 * 60 * 60 * 1000),
       invoiceFrom: currentInvoice?.invoiceFrom || null,
       invoiceTo: currentInvoice?.invoiceTo || null,
@@ -138,5 +146,5 @@
       totalAmount: currentInvoice?.totalAmount || 0,
     }),
-    [currentInvoice, isCopy, settings]
+    [currentInvoice, isCopy, tenant]
   );
 
@@ -164,6 +172,17 @@
 
     try {
-      // generate collection id
       const id = generateId(collections.invoice);
+
+      // Ensure dates are valid Date objects
+      const createDate =
+        data.createDate instanceof Date ? data.createDate : new Date(data.createDate);
+      const dueDate = data.dueDate instanceof Date ? data.dueDate : new Date(data.dueDate);
+
+      const currentTime = new Date();
+      createDate.setHours(
+        currentTime.getHours(),
+        currentTime.getMinutes(),
+        currentTime.getSeconds()
+      );
 
       // attach serivce details
@@ -173,21 +192,16 @@
       }));
 
-      const currentTime = new Date();
-      const createDateWithCurrentTime = new Date(data.createDate); // This creates a date object using the date from data.createDate
-      // Set the time of createDateWithCurrentTime to the current hour, minutes, and seconds
-      createDateWithCurrentTime.setHours(
-        currentTime.getHours(),
-        currentTime.getMinutes(),
-        currentTime.getSeconds()
-      );
-
       // transform data
-      const writeData = {
+      const writeData: CreateInvoice = {
         ...data,
-        invoiceNumber: incrementInvoiceNumber(settings?.invoice.lastInvoiceNumber),
+        invoiceNumber: incrementInvoiceNumber(tenant?.lastInvoiceNumber),
         status: 'draft',
-        createDate: Timestamp.fromDate(createDateWithCurrentTime),
-        dueDate: Timestamp.fromDate(new Date(data.dueDate)),
-        items,
+        createDate,
+        dueDate,
+        items: items.filter((item) => item.service !== null) as CreateInvoice['items'],
+        subTotal: data.totalAmount - (data.taxes || 0) - (data.discount || 0),
+        month: data.month as Invoice['month'],
+        invoiceFrom: data.invoiceFrom!,
+        invoiceTo: data.invoiceTo!,
       };
 
@@ -199,19 +213,21 @@
 
       // write to DB
-      await firestoreBatch([
-        {
-          docPath: `${collections.invoice}/${id}`,
-          type: 'set',
-          data: {
-            ...writeData,
-            pdfRef: storagePath,
-          },
-        },
-        {
-          docPath: `${collections.settings}/${documents.settingsInvoice}`,
-          type: 'set',
-          data: { lastInvoiceNumber: writeData.invoiceNumber },
-        },
-      ]);
+      // await firestoreBatch([
+      //   {
+      //     docPath: `${collections.invoice}/${id}`,
+      //     type: 'set',
+      //     data: {
+      //       ...writeData,
+      //       pdfRef: storagePath,
+      //     },
+      //   },
+      //   {
+      //     docPath: `${collections.settings}/${documents.settingsInvoice}`,
+      //     type: 'set',
+      //     data: { lastInvoiceNumber: writeData.invoiceNumber },
+      //   },
+      // ]);
+
+      await createInvoice({ ...writeData, pdfRef: storagePath });
 
       loadingSave.onFalse();
@@ -229,4 +245,9 @@
     try {
       if (currentInvoice) {
+        // Ensure dates are valid Date objects
+        const createDate =
+          data.createDate instanceof Date ? data.createDate : new Date(data.createDate);
+        const dueDate = data.dueDate instanceof Date ? data.dueDate : new Date(data.dueDate);
+
         // attach serivce details
         const items = data.items.map((item) => ({
@@ -238,7 +259,9 @@
         const writeData = {
           ...data,
-          createDate: Timestamp.fromDate(new Date(data.createDate)),
-          dueDate: Timestamp.fromDate(new Date(data.dueDate)),
+          createDate,
+          dueDate,
           items,
+          invoiceFrom: data.invoiceFrom!,
+          invoiceTo: data.invoiceTo!,
         };
 
@@ -250,14 +273,46 @@
 
         // update DB
-        await updateDocument(collections.invoice, currentInvoice.id, {
+        // await updateDocument(collections.invoice, currentInvoice.id, {
+        //   ...writeData,
+        //   pdfRef: storagePath,
+        // });
+
+        await updateInvoice(currentInvoice.id, {
           ...writeData,
           pdfRef: storagePath,
+          status: data.status as 'draft' | 'processing' | 'pending' | 'overdue' | 'paid',
+          month: data.month as
+            | 'January'
+            | 'February'
+            | 'March'
+            | 'April'
+            | 'May'
+            | 'June'
+            | 'July'
+            | 'August'
+            | 'September'
+            | 'October'
+            | 'November'
+            | 'December',
+          items: items.filter((item) => item.service !== null) as {
+            service: { id: string; month: number; name: string; sprint: number; hour: number };
+            title: string;
+            price: number;
+            total: number;
+            quantity: number;
+            description: string;
+          }[],
         });
 
         // mutate current data
-        mutate([collections.invoice, currentInvoice.id]);
+        // mutate([collections.invoice, currentInvoice.id]);
       } else {
         // generate collection id
         const id = generateId(collections.invoice);
+
+        // Ensure dates are valid Date objects
+        const createDate =
+          data.createDate instanceof Date ? data.createDate : new Date(data.createDate);
+        const dueDate = data.dueDate instanceof Date ? data.dueDate : new Date(data.dueDate);
 
         // attach serivce details
@@ -270,7 +325,9 @@
         const writeData = {
           ...data,
-          createDate: Timestamp.fromDate(new Date(data.createDate)),
-          dueDate: Timestamp.fromDate(new Date(data.dueDate)),
+          createDate,
+          dueDate,
           items,
+          invoiceFrom: data.invoiceFrom!,
+          invoiceTo: data.invoiceTo!,
         };
 
@@ -282,19 +339,20 @@
 
         // write to DB
-        await firestoreBatch([
-          {
-            docPath: `${collections.invoice}/${id}`,
-            type: 'set',
-            data: {
-              ...writeData,
-              pdfRef: storagePath,
-            },
-          },
-          {
-            docPath: `${collections.settings}/${documents.settingsInvoice}`,
-            type: 'set',
-            data: { lastInvoiceNumber: writeData.invoiceNumber },
-          },
-        ]);
+        // await firestoreBatch([
+        //   {
+        //     docPath: `${collections.invoice}/${id}`,
+        //     type: 'set',
+        //     data: {
+        //       ...writeData,
+        //       pdfRef: storagePath,
+        //     },
+        //   },
+        //   {
+        //     docPath: `${collections.settings}/${documents.settingsInvoice}`,
+        //     type: 'set',
+        //     data: { lastInvoiceNumber: writeData.invoiceNumber },
+        //   },
+        // ]);
+        await createInvoice({ ...writeData, pdfRef: storagePath });
 
         reset();
@@ -314,5 +372,5 @@
     <FormProvider methods={methods}>
       <Card>
-        {settings?.company && <InvoiceNewEditAddress />}
+        {!!tenant && <InvoiceNewEditAddress />}
 
         <InvoiceNewEditStatusDate isCopy={isCopy} />
Index: src/sections/invoice/invoice-new-edit-status-date.tsx
===================================================================
--- src/sections/invoice/invoice-new-edit-status-date.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-new-edit-status-date.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -7,5 +7,5 @@
 import { RHFSelect, RHFTextField } from 'src/components/hook-form';
 // api
-import { useGetSettings } from 'src/api/settings';
+// import { useGetTenant } from 'src/api/settings';
 // utils
 import { incrementInvoiceNumber } from 'src/utils/increment-invoice-number';
@@ -33,5 +33,5 @@
   const values = watch();
 
-  const { settings } = useGetSettings();
+  // const { settings } = useGetTenant();
 
   return (
Index: src/sections/invoice/invoice-pdf.tsx
===================================================================
--- src/sections/invoice/invoice-pdf.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-pdf.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,3 +1,3 @@
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice } from 'src/schemas';
 import InvoiceEEPDF from './invoice-ee-pdf';
 import InvoiceMKPDF from './invoice-mk-pdf';
Index: src/sections/invoice/invoice-table-filters-result.tsx
===================================================================
--- src/sections/invoice/invoice-table-filters-result.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-table-filters-result.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -6,5 +6,5 @@
 import Stack, { StackProps } from '@mui/material/Stack';
 // types
-import { InvoiceTableFilters, InvoiceTableFilterValue } from 'mvpmasters-shared';
+import { InvoiceTableFilters, InvoiceTableFilterValue } from 'src/schemas';
 // components
 import Iconify from 'src/components/iconify';
Index: src/sections/invoice/invoice-table-row.tsx
===================================================================
--- src/sections/invoice/invoice-table-row.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-table-row.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -16,5 +16,5 @@
 import { fNumber } from 'src/utils/format-number';
 // types
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice } from 'src/schemas';
 // components
 import Label from 'src/components/label';
@@ -60,4 +60,6 @@
   } = row;
 
+  console.log(createDate);
+
   const confirmSend = useBoolean();
   const confirmDelete = useBoolean();
@@ -105,6 +107,6 @@
         <TableCell>
           <ListItemText
-            primary={format(createDate.toDate(), 'dd MMM yyyy')}
-            secondary={format(createDate.toDate(), 'p')}
+            primary={format(new Date(createDate), 'dd MMM yyyy')}
+            secondary={format(new Date(createDate), 'p')}
             primaryTypographyProps={{ typography: 'body2', noWrap: true }}
             secondaryTypographyProps={{
@@ -118,6 +120,6 @@
         <TableCell>
           <ListItemText
-            primary={format(dueDate.toDate(), 'dd MMM yyyy')}
-            secondary={format(dueDate.toDate(), 'p')}
+            primary={format(new Date(dueDate), 'dd MMM yyyy')}
+            secondary={format(new Date(dueDate), 'p')}
             primaryTypographyProps={{ typography: 'body2', noWrap: true }}
             secondaryTypographyProps={{
Index: src/sections/invoice/invoice-table-toolbar.tsx
===================================================================
--- src/sections/invoice/invoice-table-toolbar.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-table-toolbar.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -7,5 +7,5 @@
 import InputAdornment from '@mui/material/InputAdornment';
 // types
-import { InvoiceTableFilters, InvoiceTableFilterValue } from 'mvpmasters-shared';
+import { InvoiceTableFilters, InvoiceTableFilterValue } from 'src/schemas';
 // components
 import Iconify from 'src/components/iconify';
Index: src/sections/invoice/invoice-toolbar.tsx
===================================================================
--- src/sections/invoice/invoice-toolbar.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/invoice-toolbar.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -18,5 +18,5 @@
 import { useBoolean } from 'src/hooks/use-boolean';
 // types
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice } from 'src/schemas';
 // components
 import Iconify from 'src/components/iconify';
Index: src/sections/invoice/mail-compose.tsx
===================================================================
--- src/sections/invoice/mail-compose.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/mail-compose.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -13,5 +13,5 @@
 import Iconify from 'src/components/iconify';
 import Editor from 'src/components/editor';
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice } from 'src/schemas';
 import FormProvider from 'src/components/hook-form/form-provider';
 import { RHFTextField } from 'src/components/hook-form';
Index: src/sections/invoice/view/invoice-edit-view.tsx
===================================================================
--- src/sections/invoice/view/invoice-edit-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/view/invoice-edit-view.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -23,4 +23,5 @@
 
   const { currentInvoice } = useGetInvoice({ id });
+  console.log('currentInvoice', currentInvoice);
 
   return (
Index: src/sections/invoice/view/invoice-list-view.tsx
===================================================================
--- src/sections/invoice/view/invoice-list-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/invoice/view/invoice-list-view.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -36,14 +36,9 @@
 } from 'src/components/table';
 // types
-import {
-  Invoice,
-  InvoiceStatus,
-  InvoiceTableFilters,
-  InvoiceTableFilterValue,
-} from 'mvpmasters-shared';
+import { Invoice, InvoiceStatus, InvoiceTableFilters, InvoiceTableFilterValue } from 'src/schemas';
 //
 import deleteFromFirebaseStorage from 'src/utils/delete-from-firebase-storage';
 // fetch
-import { useGetInvoices } from 'src/api/invoice';
+import { useDeleteInvoice, useGetInvoices } from 'src/api/invoice';
 import { collections, removeDocument } from 'src/lib/firestore';
 import { mutate } from 'swr';
@@ -163,9 +158,5 @@
   const [filters, setFilters] = useState(defaultFilters);
 
-  const { invoices: tableData } = useGetInvoices({
-    where: [['createDate', '>=', filters.startDate]],
-    orderBy: 'createDate',
-    direction: 'desc',
-  });
+  const { invoices: tableData } = useGetInvoices({ startDate: filters.startDate?.toISOString() });
 
   const invoiceMutationKey = useMemo(
@@ -269,4 +260,6 @@
   );
 
+  const { deleteInvoiceMutation } = useDeleteInvoice();
+
   const handleDeleteRow = useCallback(
     async (invoice: Invoice) => {
@@ -275,19 +268,11 @@
         orderBy: 'createDate',
         direction: 'desc',
-      }); // Get the same params as used in useGetInvoices
-
-      // Optimistically update the cache before the deletion
-      // mutate(
-      //   [collections.invoice, serializedParams],
-      //   (invoices: Invoice[] = []) => invoices.filter((row) => row.id !== invoice.id),
-      //   false
-      // );
-
-      await removeDocument(collections.invoice, invoice.id);
+      });
+
+      await deleteInvoiceMutation(invoice.id);
       await deleteFromFirebaseStorage(
         `invoices/${invoice.invoiceTo.name}/${invoice.id}-${invoice.invoiceNumber}.pdf`
       );
 
-      // Optionally, rollback optimistic update or refetch data
       mutate(invoiceMutationKey);
     },
@@ -672,6 +657,6 @@
       inputData = inputData.filter(
         (invoice) =>
-          fTimestamp(invoice.createDate.toMillis()) >= fTimestamp(startDate) &&
-          fTimestamp(invoice.createDate.toMillis()) <= fTimestamp(endDate)
+          fTimestamp(invoice.createDate.getTime()) >= fTimestamp(startDate.getTime()) &&
+          fTimestamp(invoice.createDate.getTime()) <= fTimestamp(endDate.getTime())
       );
     }
Index: src/sections/user/customer-new-edit-form.tsx
===================================================================
--- src/sections/user/customer-new-edit-form.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-new-edit-form.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -18,5 +18,5 @@
 import { useRouter } from 'src/routes/hooks';
 // types
-import { Customer, NewCustomer, newCustomerSchema } from 'mvpmasters-shared';
+import { Customer, NewCustomer, newCustomerSchema } from 'src/schemas';
 // components
 import Label from 'src/components/label';
Index: src/sections/user/customer-quick-edit-form.tsx
===================================================================
--- src/sections/user/customer-quick-edit-form.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-quick-edit-form.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -14,5 +14,5 @@
 import DialogContent from '@mui/material/DialogContent';
 // types
-import { Customer, customerSchema } from 'mvpmasters-shared';
+import { Customer, customerSchema } from 'src/schemas';
 // assets
 import { countries } from 'src/assets/data';
Index: src/sections/user/customer-table-filters-result.tsx
===================================================================
--- src/sections/user/customer-table-filters-result.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-table-filters-result.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -9,5 +9,5 @@
 // components
 import Iconify from 'src/components/iconify';
-import { CustomerTableFilterValue, CustomerTableFilters } from 'mvpmasters-shared';
+import { CustomerTableFilterValue, CustomerTableFilters } from 'src/schemas';
 
 // ----------------------------------------------------------------------
Index: src/sections/user/customer-table-row.tsx
===================================================================
--- src/sections/user/customer-table-row.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-table-row.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -9,5 +9,5 @@
 import { useBoolean } from 'src/hooks/use-boolean';
 // types
-import { Customer } from 'mvpmasters-shared';
+import { Customer } from 'src/schemas';
 // components
 import Label from 'src/components/label';
Index: src/sections/user/customer-table-toolbar.tsx
===================================================================
--- src/sections/user/customer-table-toolbar.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-table-toolbar.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -12,5 +12,5 @@
 import Select, { SelectChangeEvent } from '@mui/material/Select';
 // types
-import { CustomerTableFilters, CustomerTableFilterValue } from 'mvpmasters-shared';
+import { CustomerTableFilters, CustomerTableFilterValue } from 'src/schemas';
 // components
 import Iconify from 'src/components/iconify';
Index: src/sections/user/view/customer-list-view.tsx
===================================================================
--- src/sections/user/view/customer-list-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/view/customer-list-view.tsx	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -34,5 +34,5 @@
 } from 'src/components/table';
 // types
-import { Customer, CustomerTableFilters, CustomerTableFilterValue } from 'mvpmasters-shared';
+import { Customer, CustomerTableFilters, CustomerTableFilterValue } from 'src/schemas';
 //
 import { useGetCustomers } from 'src/api/customer';
Index: c/types/settings.ts
===================================================================
--- src/types/settings.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ 	(revision )
@@ -1,8 +1,0 @@
-import { Customer } from 'mvpmasters-shared';
-
-export type Settings = {
-  company: Customer;
-  'company-ee': Customer;
-  invoice: { lastInvoiceNumber: string };
-  [key: string]: any;
-};
Index: src/utils/axios.ts
===================================================================
--- src/utils/axios.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/utils/axios.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -45,5 +45,8 @@
 
 export const endpoints = {
-  invoice: '/api/invoice',
+  invoice: '/api/invoices',
   customer: '/api/customers',
+  tenant: '/api/tenant',
+  service: '/api/services',
+  employee: '/api/employees',
 };
Index: src/utils/create-full-address.ts
===================================================================
--- src/utils/create-full-address.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/utils/create-full-address.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,3 +1,3 @@
-import { Address } from 'mvpmasters-shared';
+import { Address } from 'src/schemas';
 
 export function createFullAddress(data: Address): string {
Index: src/utils/get-invoice-quantity-type.ts
===================================================================
--- src/utils/get-invoice-quantity-type.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/utils/get-invoice-quantity-type.ts	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1,3 +1,3 @@
-import { Invoice } from 'mvpmasters-shared';
+import { Invoice } from 'src/schemas';
 
 export const getQuantityType = (invoice: Invoice) => {
Index: yarn.lock
===================================================================
--- yarn.lock	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ yarn.lock	(revision 057453cdc828f504e8bcd813422d99221b3b5732)
@@ -1534,9 +1534,4 @@
   integrity sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==
 
-"@fastify/busboy@^2.0.0":
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d"
-  integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==
-
 "@fastify/busboy@^3.0.0":
   version "3.1.1"
@@ -1640,15 +1635,4 @@
     tslib "^2.1.0"
 
-"@firebase/app@^0.9.25":
-  version "0.9.29"
-  resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.9.29.tgz#444280f0ddf1da4b2a974c86a6a8c6405d950fb7"
-  integrity sha512-HbKTjfmILklasIu/ij6zKnFf3SgLYXkBDVN7leJfVGmohl+zA7Ig+eXM1ZkT1pyBJ8FTYR+mlOJer/lNEnUCtw==
-  dependencies:
-    "@firebase/component" "0.6.5"
-    "@firebase/logger" "0.4.0"
-    "@firebase/util" "1.9.4"
-    idb "7.1.1"
-    tslib "^2.1.0"
-
 "@firebase/auth-compat@0.4.6":
   version "0.4.6"
@@ -1703,20 +1687,4 @@
   dependencies:
     "@firebase/util" "1.9.3"
-    tslib "^2.1.0"
-
-"@firebase/component@0.6.5":
-  version "0.6.5"
-  resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.6.5.tgz#8cc7334f2081d700f2769caaa8dae3ac4c1fe37e"
-  integrity sha512-2tVDk1ixi12sbDmmfITK8lxSjmcb73BMF6Qwc3U44hN/J1Fi1QY/Hnnb6klFlbB9/G16a3J3d4nXykye2EADTw==
-  dependencies:
-    "@firebase/util" "1.9.4"
-    tslib "^2.1.0"
-
-"@firebase/component@0.6.6":
-  version "0.6.6"
-  resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.6.6.tgz#7ad4013ff37686d355dee0694f1fa4604491b7c3"
-  integrity sha512-pp7sWqHmAAlA3os6ERgoM3k5Cxff510M9RLXZ9Mc8KFKMBc2ct3RkZTWUF7ixJNvMiK/iNgRLPDrLR2gtRJ9iQ==
-  dependencies:
-    "@firebase/util" "1.9.5"
     tslib "^2.1.0"
 
@@ -1801,9 +1769,4 @@
   resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-3.0.0.tgz#f3440d5a1cc2a722d361b24cefb62ca8b3577af3"
   integrity sha512-Meg4cIezHo9zLamw0ymFYBD4SMjLb+ZXIbuN7T7ddXN6MGoICmOTq3/ltdCGoDCS2u+H1XJs2u/cYp75jsX9Qw==
-
-"@firebase/firestore-types@^3.0.0":
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-3.0.1.tgz#5b802f8aeffe6803f594b428054b10e25a73ae66"
-  integrity sha512-mVhPcHr5FICjF67m6JHgj+XRvAz/gZ62xifeGfcm00RFl6tNKfCzCfKeyB2BDIEc9dUnEstkmIXlmLIelOWoaA==
 
 "@firebase/firestore@4.2.0":
@@ -1821,18 +1784,4 @@
     tslib "^2.1.0"
 
-"@firebase/firestore@^4.4.0":
-  version "4.6.1"
-  resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-4.6.1.tgz#4a788103bca46e3ee829ddb816189f23cd26212a"
-  integrity sha512-MaBOBu+QcZOp6SJzCmigiJ4Dt0HNic91w8GghbTE9L//VW/zdO7ezXrcXRK4TjWWOcazBrJZJSHTIsFdwZyvtQ==
-  dependencies:
-    "@firebase/component" "0.6.6"
-    "@firebase/logger" "0.4.1"
-    "@firebase/util" "1.9.5"
-    "@firebase/webchannel-wrapper" "0.10.6"
-    "@grpc/grpc-js" "~1.9.0"
-    "@grpc/proto-loader" "^0.7.8"
-    tslib "^2.1.0"
-    undici "5.28.4"
-
 "@firebase/functions-compat@0.3.5":
   version "0.3.5"
@@ -1897,11 +1846,4 @@
     tslib "^2.1.0"
 
-"@firebase/logger@0.4.1":
-  version "0.4.1"
-  resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.4.1.tgz#b4bb0d266680210a34e7c70a8a92342391e399ab"
-  integrity sha512-tTIixB5UJbG9ZHSGZSZdX7THr3KWOLrejZ9B7jYsm6fpwgRNngKznQKA2wgYVyvBc1ta7dGFh9NtJ8n7qfiYIw==
-  dependencies:
-    tslib "^2.1.0"
-
 "@firebase/logger@0.4.4":
   version "0.4.4"
@@ -2034,27 +1976,8 @@
     tslib "^2.1.0"
 
-"@firebase/util@1.9.4":
-  version "1.9.4"
-  resolved "https://registry.yarnpkg.com/@firebase/util/-/util-1.9.4.tgz#68eee380ab7e7828ec0d8684c46a1abed2d7e334"
-  integrity sha512-WLonYmS1FGHT97TsUmRN3qnTh5TeeoJp1Gg5fithzuAgdZOUtsYECfy7/noQ3llaguios8r5BuXSEiK82+UrxQ==
-  dependencies:
-    tslib "^2.1.0"
-
-"@firebase/util@1.9.5", "@firebase/util@^1.5.1":
-  version "1.9.5"
-  resolved "https://registry.yarnpkg.com/@firebase/util/-/util-1.9.5.tgz#9321fc1695b30a9283c99f768da2e837e02cbddc"
-  integrity sha512-PP4pAFISDxsf70l3pEy34Mf3GkkUcVQ3MdKp6aSVb7tcpfUQxnsdV7twDd8EkfB6zZylH6wpUAoangQDmCUMqw==
-  dependencies:
-    tslib "^2.1.0"
-
 "@firebase/webchannel-wrapper@0.10.3":
   version "0.10.3"
   resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.3.tgz#c894a21e8c911830e36bbbba55903ccfbc7a7e25"
   integrity sha512-+ZplYUN3HOpgCfgInqgdDAbkGGVzES1cs32JJpeqoh87SkRobGXElJx+1GZSaDqzFL+bYiX18qEcBK76mYs8uA==
-
-"@firebase/webchannel-wrapper@0.10.6":
-  version "0.10.6"
-  resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.6.tgz#443efa9f761fd4ed8ca60c353e3a44d3a47e81f1"
-  integrity sha512-EnfRJvrnzkHwN3BPMCayCFT5lCqInzg3RdlRsDjDvB1EJli6Usj26T6lJ67BU2UcYXBS5xcp1Wj4+zRzj2NaZg==
 
 "@floating-ui/core@^1.4.2":
@@ -7474,9 +7397,4 @@
   integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
 
-moment@^2.29.4:
-  version "2.30.1"
-  resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
-  integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
-
 ms@2.0.0:
   version "2.0.0"
@@ -7516,17 +7434,4 @@
     arrify "^2.0.1"
     minimatch "^3.0.4"
-
-mvpmasters-shared@^1.0.9:
-  version "1.0.9"
-  resolved "https://registry.yarnpkg.com/mvpmasters-shared/-/mvpmasters-shared-1.0.9.tgz#964127bb04e25dcdfceab1aa490e106300bf430d"
-  integrity sha512-RluBz76NR5Q2yd25nWgKIuPAWHUa75U4uwR6e7iFw6zFIn+b83fE0upbUY7+iRFF5SSTFfj/7Uk5zZffy1HLlQ==
-  dependencies:
-    "@firebase/app" "^0.9.25"
-    "@firebase/firestore" "^4.4.0"
-    "@firebase/firestore-types" "^3.0.0"
-    "@firebase/util" "^1.5.1"
-    lodash "^4.17.21"
-    moment "^2.29.4"
-    zod "^3.22.4"
 
 nanoid@^3.3.6:
@@ -9513,8 +9418,8 @@
     is-typed-array "^1.1.9"
 
-typescript@^5.2.2:
-  version "5.2.2"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
-  integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
+typescript@5.7.3:
+  version "5.7.3"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e"
+  integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==
 
 unbox-primitive@^1.0.2:
@@ -9532,11 +9437,4 @@
   resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
   integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==
-
-undici@5.28.4:
-  version "5.28.4"
-  resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068"
-  integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==
-  dependencies:
-    "@fastify/busboy" "^2.0.0"
 
 unicode-canonical-property-names-ecmascript@^2.0.0:
@@ -9957,7 +9855,2 @@
   resolved "https://registry.yarnpkg.com/zod/-/zod-3.20.2.tgz#068606642c8f51b3333981f91c0a8ab37dfc2807"
   integrity sha512-1MzNQdAvO+54H+EaK5YpyEy0T+Ejo/7YLHS93G3RnYWh5gaotGHwGeN/ZO687qEDU2y4CdStQYXVHIgrUl5UVQ==
-
-zod@^3.22.4:
-  version "3.23.5"
-  resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.5.tgz#c7b7617d017d4a2f21852f533258d26a9a5ae09f"
-  integrity sha512-fkwiq0VIQTksNNA131rDOsVJcns0pfVUjHzLrNBiF/O/Xxb5lQyEXkhZWcJ7npWsYlvs+h0jFWXXy4X46Em1JA==
