From 90785c0c60e842bead4ca55ddcb443495ea48ca1 Mon Sep 17 00:00:00 2001 From: nextis-invest Date: Sat, 5 Apr 2025 21:40:04 +0200 Subject: [PATCH 01/61] first commit --- .env.example | 31 +- PROJECT_PLAN.md | 652 +++++ app/chauffeurs/page.tsx | 31 + app/dashboard/data.json | 614 +++++ app/dashboard/page.tsx | 68 +- app/globals.css | 85 + app/layout.tsx | 2 + app/organizations/page.tsx | 607 +++++ app/page.tsx | 126 +- app/rides/page.tsx | 500 ++++ app/settings/page.tsx | 31 + app/test-ride-form/page.tsx | 65 + app/users/page.tsx | 31 + app/vehicles/page.tsx | 31 + components.json | 21 + components/app-sidebar.tsx | 173 ++ components/chart-area-interactive.tsx | 292 ++ components/custom-user-button.tsx | 69 + components/data-table.tsx | 823 ++++++ components/forms/booking-form.tsx | 284 ++ components/forms/ride-form.tsx | 1841 +++++++++++++ components/nav-documents.tsx | 91 + components/nav-main.tsx | 71 + components/nav-secondary.tsx | 49 + components/nav-user.tsx | 110 + components/section-cards.tsx | 101 + components/site-header.tsx | 17 + components/ui/accordion.tsx | 57 + components/ui/alert-dialog.tsx | 141 + components/ui/alert.tsx | 59 + components/ui/aspect-ratio.tsx | 7 + components/ui/avatar.tsx | 50 + components/ui/badge.tsx | 36 + components/ui/breadcrumb.tsx | 115 + components/ui/button.tsx | 57 + components/ui/calendar.tsx | 76 + components/ui/card.tsx | 76 + components/ui/carousel.tsx | 262 ++ components/ui/chart.tsx | 365 +++ components/ui/checkbox.tsx | 30 + components/ui/collapsible.tsx | 11 + components/ui/command.tsx | 153 ++ components/ui/context-menu.tsx | 200 ++ components/ui/dialog.tsx | 122 + components/ui/drawer.tsx | 118 + components/ui/dropdown-menu.tsx | 201 ++ components/ui/form.tsx | 178 ++ components/ui/hover-card.tsx | 29 + components/ui/input-otp.tsx | 71 + components/ui/input.tsx | 22 + components/ui/label.tsx | 26 + components/ui/menubar.tsx | 256 ++ components/ui/navigation-menu.tsx | 128 + components/ui/pagination.tsx | 117 + components/ui/popover.tsx | 33 + components/ui/progress.tsx | 28 + components/ui/radio-group.tsx | 44 + components/ui/resizable.tsx | 45 + components/ui/scroll-area.tsx | 48 + components/ui/select.tsx | 159 ++ components/ui/separator.tsx | 31 + components/ui/sheet.tsx | 140 + components/ui/sidebar.tsx | 773 ++++++ components/ui/skeleton.tsx | 15 + components/ui/slider.tsx | 28 + components/ui/sonner.tsx | 31 + components/ui/switch.tsx | 29 + components/ui/table.tsx | 120 + components/ui/tabs.tsx | 55 + components/ui/textarea.tsx | 22 + components/ui/toggle-group.tsx | 61 + components/ui/toggle.tsx | 45 + components/ui/tooltip.tsx | 32 + hooks/use-mobile.tsx | 19 + lib/utils.ts | 6 + lib/validations/booking.ts | 123 + package-lock.json | 2388 ++++++++++++++++- package.json | 50 +- .../migration.sql | 197 ++ prisma/migrations/migration_lock.toml | 3 + prisma/schema.prisma | 193 ++ tailwind.config.js | 112 +- 82 files changed, 14344 insertions(+), 265 deletions(-) create mode 100644 PROJECT_PLAN.md create mode 100644 app/chauffeurs/page.tsx create mode 100644 app/dashboard/data.json create mode 100644 app/organizations/page.tsx create mode 100644 app/rides/page.tsx create mode 100644 app/settings/page.tsx create mode 100644 app/test-ride-form/page.tsx create mode 100644 app/users/page.tsx create mode 100644 app/vehicles/page.tsx create mode 100644 components.json create mode 100644 components/app-sidebar.tsx create mode 100644 components/chart-area-interactive.tsx create mode 100644 components/custom-user-button.tsx create mode 100644 components/data-table.tsx create mode 100644 components/forms/booking-form.tsx create mode 100644 components/forms/ride-form.tsx create mode 100644 components/nav-documents.tsx create mode 100644 components/nav-main.tsx create mode 100644 components/nav-secondary.tsx create mode 100644 components/nav-user.tsx create mode 100644 components/section-cards.tsx create mode 100644 components/site-header.tsx create mode 100644 components/ui/accordion.tsx create mode 100644 components/ui/alert-dialog.tsx create mode 100644 components/ui/alert.tsx create mode 100644 components/ui/aspect-ratio.tsx create mode 100644 components/ui/avatar.tsx create mode 100644 components/ui/badge.tsx create mode 100644 components/ui/breadcrumb.tsx create mode 100644 components/ui/button.tsx create mode 100644 components/ui/calendar.tsx create mode 100644 components/ui/card.tsx create mode 100644 components/ui/carousel.tsx create mode 100644 components/ui/chart.tsx create mode 100644 components/ui/checkbox.tsx create mode 100644 components/ui/collapsible.tsx create mode 100644 components/ui/command.tsx create mode 100644 components/ui/context-menu.tsx create mode 100644 components/ui/dialog.tsx create mode 100644 components/ui/drawer.tsx create mode 100644 components/ui/dropdown-menu.tsx create mode 100644 components/ui/form.tsx create mode 100644 components/ui/hover-card.tsx create mode 100644 components/ui/input-otp.tsx create mode 100644 components/ui/input.tsx create mode 100644 components/ui/label.tsx create mode 100644 components/ui/menubar.tsx create mode 100644 components/ui/navigation-menu.tsx create mode 100644 components/ui/pagination.tsx create mode 100644 components/ui/popover.tsx create mode 100644 components/ui/progress.tsx create mode 100644 components/ui/radio-group.tsx create mode 100644 components/ui/resizable.tsx create mode 100644 components/ui/scroll-area.tsx create mode 100644 components/ui/select.tsx create mode 100644 components/ui/separator.tsx create mode 100644 components/ui/sheet.tsx create mode 100644 components/ui/sidebar.tsx create mode 100644 components/ui/skeleton.tsx create mode 100644 components/ui/slider.tsx create mode 100644 components/ui/sonner.tsx create mode 100644 components/ui/switch.tsx create mode 100644 components/ui/table.tsx create mode 100644 components/ui/tabs.tsx create mode 100644 components/ui/textarea.tsx create mode 100644 components/ui/toggle-group.tsx create mode 100644 components/ui/toggle.tsx create mode 100644 components/ui/tooltip.tsx create mode 100644 hooks/use-mobile.tsx create mode 100644 lib/utils.ts create mode 100644 lib/validations/booking.ts create mode 100644 prisma/migrations/20250403231736_add_clerk_organization_fields/migration.sql create mode 100644 prisma/migrations/migration_lock.toml create mode 100644 prisma/schema.prisma diff --git a/.env.example b/.env.example index 00f4697..292145e 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,27 @@ -# To access your Clerk keys, first create a clerk.com account then open dashboard.clerk.com. Create a new Clerk application and copy the Keys from step 2 in the Next.js quickstart tab. -CLERK_SECRET_KEY= -NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY= +# Database -NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL=/dashboard -NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/dashboard +# Connect to Supabase via connection pooling. +DATABASE_URL="postgresql://username:password@host:6543/database?pgbouncer=true" + +# Direct connection to the database. Used for migrations. +DIRECT_URL="postgresql://username:password@host:5432/database" + +# Clerk Authentication +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_publishable_key +CLERK_SECRET_KEY=sk_test_your_secret_key +CLERK_WEBHOOK_SECRET=whsec_your_webhook_secret_here +NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in +# Disable sign-up by redirecting to sign-in +NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-in +NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard +# Not used but kept for reference +NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard +# Disable sign-up completely +CLERK_SIGN_UP_DISABLED=true + +# Clerk Organization settings +NEXT_PUBLIC_CLERK_AFTER_CREATE_ORGANIZATION_URL=/dashboard +NEXT_PUBLIC_CLERK_CREATE_ORGANIZATION_URL=/create-organization + +# App URL +NEXT_PUBLIC_APP_URL=http://localhost:3000 diff --git a/PROJECT_PLAN.md b/PROJECT_PLAN.md new file mode 100644 index 0000000..1e0ff34 --- /dev/null +++ b/PROJECT_PLAN.md @@ -0,0 +1,652 @@ +# Chauffeur Management System - Project Plan + +## Overview +This document outlines the detailed plan for building a comprehensive chauffeur management system with features for booking, ride assignment, organization management, and role-based access control. + +## Tech Stack +- **Framework**: Next.js (App Router) +- **Authentication**: Clerk Auth +- **Database**: Prisma with Supabase (PostgreSQL) +- **Form Handling**: react-hook-form with zod validation +- **Data Fetching**: tRPC + react-query +- **UI Components**: shadcn/ui +- **Animations**: Framer Motion +- **Date Utilities**: date-fns +- **AI Integration**: AI Toolkit +- **URL Search Params**: nuqs +- **Charts**: Recharts +- **State Management**: Zustand + +## User Roles +1. **Admin**: Full system access +2. **Sales**: Manage clients and contracts +3. **Customer**: Organization admin who can book rides +4. **Passenger**: End-user who takes rides +5. **Planning**: Schedule and plan rides +6. **Dispatcher**: Assign chauffeurs to rides +7. **Field Manager**: Oversee chauffeur operations +8. **Field Assistant**: Support field operations +9. **Chauffeur**: Execute rides + +## Database Schema + +### Users +```prisma +model User { + id String @id @default(cuid()) + clerkId String @unique + email String @unique + firstName String + lastName String + phone String? + role Role @default(PASSENGER) + organizationId String? + organization Organization? @relation(fields: [organizationId], references: [id]) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + chauffeurProfile Chauffeur? + rides Ride[] @relation("PassengerRides") + assignedRides Ride[] @relation("AssignedRides") + bookings Booking[] +} + +enum Role { + ADMIN + SALES + CUSTOMER + PASSENGER + PLANNING + DISPATCHER + FIELD_MANAGER + FIELD_ASSISTANT + CHAUFFEUR +} +``` + +### Organizations +```prisma +model Organization { + id String @id @default(cuid()) + name String + address String? + city String? + country String? + postalCode String? + phone String? + email String? + website String? + logoUrl String? + active Boolean @default(true) + contractStart DateTime? + contractEnd DateTime? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + users User[] + bookings Booking[] + billingInfo BillingInfo? +} + +model BillingInfo { + id String @id @default(cuid()) + organizationId String @unique + organization Organization @relation(fields: [organizationId], references: [id]) + billingAddress String? + billingCity String? + billingCountry String? + billingPostalCode String? + taxId String? + paymentTerms String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} +``` + +### Chauffeurs +```prisma +model Chauffeur { + id String @id @default(cuid()) + userId String @unique + user User @relation(fields: [userId], references: [id]) + licenseNumber String + licenseExpiry DateTime + vehicleId String? + vehicle Vehicle? @relation(fields: [vehicleId], references: [id]) + status ChauffeurStatus @default(AVAILABLE) + rating Float? + notes String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +enum ChauffeurStatus { + AVAILABLE + BUSY + ON_BREAK + OFF_DUTY + ON_LEAVE +} +``` + +### Vehicles +```prisma +model Vehicle { + id String @id @default(cuid()) + make String + model String + year Int + licensePlate String @unique + color String? + capacity Int @default(4) + vehicleType VehicleType @default(SEDAN) + status VehicleStatus @default(AVAILABLE) + lastMaintenance DateTime? + chauffeurs Chauffeur[] + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +enum VehicleType { + SEDAN + SUV + VAN + LUXURY + LIMOUSINE +} + +enum VehicleStatus { + AVAILABLE + IN_USE + MAINTENANCE + OUT_OF_SERVICE +} +``` + +### Bookings and Rides +```prisma +model Booking { + id String @id @default(cuid()) + bookingNumber String @unique @default(cuid()) + customerId String + customer User @relation(fields: [customerId], references: [id]) + organizationId String? + organization Organization? @relation(fields: [organizationId], references: [id]) + status BookingStatus @default(PENDING) + totalAmount Decimal? @db.Decimal(10, 2) + notes String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + rides Ride[] +} + +enum BookingStatus { + PENDING + CONFIRMED + IN_PROGRESS + COMPLETED + CANCELLED +} + +model Ride { + id String @id @default(cuid()) + rideNumber String @unique @default(cuid()) + bookingId String + booking Booking @relation(fields: [bookingId], references: [id]) + passengerId String + passenger User @relation("PassengerRides", fields: [passengerId], references: [id]) + chauffeurId String? + chauffeur User? @relation("AssignedRides", fields: [chauffeurId], references: [id]) + pickupAddress String + dropoffAddress String + pickupTime DateTime + dropoffTime DateTime? + status RideStatus @default(SCHEDULED) + fare Decimal? @db.Decimal(10, 2) + distance Decimal? @db.Decimal(10, 2) + duration Int? // in minutes + notes String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +enum RideStatus { + SCHEDULED + ASSIGNED + IN_PROGRESS + COMPLETED + CANCELLED +} +``` + +## Project Structure + +``` +dropnow-admin-dashboard/ +├── app/ +│ ├── (auth)/ +│ │ ├── sign-in/[[...sign-in]]/page.tsx +│ │ ├── sign-up/[[...sign-up]]/page.tsx +│ │ └── layout.tsx +│ ├── (dashboard)/ +│ │ ├── dashboard/ +│ │ │ ├── page.tsx +│ │ │ └── loading.tsx +│ │ ├── bookings/ +│ │ │ ├── page.tsx +│ │ │ ├── [id]/page.tsx +│ │ │ ├── new/page.tsx +│ │ │ └── components/ +│ │ ├── rides/ +│ │ │ ├── page.tsx +│ │ │ ├── [id]/page.tsx +│ │ │ └── components/ +│ │ ├── organizations/ +│ │ │ ├── page.tsx +│ │ │ ├── [id]/page.tsx +│ │ │ ├── new/page.tsx +│ │ │ └── components/ +│ │ ├── users/ +│ │ │ ├── page.tsx +│ │ │ ├── [id]/page.tsx +│ │ │ ├── new/page.tsx +│ │ │ └── components/ +│ │ ├── chauffeurs/ +│ │ │ ├── page.tsx +│ │ │ ├── [id]/page.tsx +│ │ │ └── components/ +│ │ ├── vehicles/ +│ │ │ ├── page.tsx +│ │ │ ├── [id]/page.tsx +│ │ │ ├── new/page.tsx +│ │ │ └── components/ +│ │ ├── settings/ +│ │ │ └── page.tsx +│ │ └── layout.tsx +│ ├── api/ +│ │ ├── trpc/[trpc]/route.ts +│ │ ├── clerk/webhook/route.ts +│ │ └── uploadthing/route.ts +│ ├── globals.css +│ ├── layout.tsx +│ └── page.tsx +├── components/ +│ ├── ui/ +│ │ ├── button.tsx +│ │ ├── input.tsx +│ │ ├── select.tsx +│ │ ├── table.tsx +│ │ └── ... (other shadcn components) +│ ├── forms/ +│ │ ├── booking-form.tsx +│ │ ├── organization-form.tsx +│ │ ├── user-form.tsx +│ │ ├── chauffeur-form.tsx +│ │ └── vehicle-form.tsx +│ ├── tables/ +│ │ ├── bookings-table.tsx +│ │ ├── rides-table.tsx +│ │ ├── users-table.tsx +│ │ └── ... (other tables) +│ ├── dashboard/ +│ │ ├── stats-cards.tsx +│ │ ├── recent-bookings.tsx +│ │ ├── upcoming-rides.tsx +│ │ └── charts/ +│ ├── layout/ +│ │ ├── sidebar.tsx +│ │ ├── header.tsx +│ │ ├── user-nav.tsx +│ │ └── mobile-nav.tsx +│ └── shared/ +│ ├── loading-spinner.tsx +│ ├── error-message.tsx +│ └── empty-state.tsx +├── lib/ +│ ├── utils.ts +│ ├── auth.ts +│ ├── db.ts +│ ├── trpc/ +│ │ ├── client.ts +│ │ ├── server.ts +│ │ └── routers/ +│ │ ├── booking.ts +│ │ ├── ride.ts +│ │ ├── user.ts +│ │ ├── organization.ts +│ │ ├── chauffeur.ts +│ │ └── vehicle.ts +│ └── validations/ +│ ├── booking.ts +│ ├── organization.ts +│ ├── user.ts +│ └── ... (other schemas) +├── hooks/ +│ ├── use-bookings.ts +│ ├── use-rides.ts +│ ├── use-organizations.ts +│ ├── use-users.ts +│ └── ... (other hooks) +├── store/ +│ ├── booking-store.ts +│ ├── ride-store.ts +│ ├── user-store.ts +│ └── ... (other stores) +├── types/ +│ ├── index.ts +│ ├── booking.ts +│ ├── ride.ts +│ └── ... (other type definitions) +├── prisma/ +│ ├── schema.prisma +│ ├── migrations/ +│ └── seed.ts +├── public/ +│ ├── images/ +│ ├── icons/ +│ └── ... (other static assets) +├── middleware.ts +├── next.config.ts +├── package.json +├── tsconfig.json +└── ... (other config files) +``` + +## Implementation Plan + +### Phase 1: Project Setup and Authentication +1. **Setup Next.js Project** + - Install required dependencies + - Configure TypeScript + - Set up ESLint and Prettier + +2. **Setup Clerk Authentication** + - Configure Clerk + - Create sign-in and sign-up pages + - Implement middleware for protected routes + - Set up webhook for user synchronization + +3. **Setup Database** + - Configure Prisma with Supabase + - Create initial schema + - Set up database migrations + +4. **Setup tRPC** + - Configure tRPC server + - Set up API routes + - Create base routers + +### Phase 2: Core Features - Users and Organizations +1. **User Management** + - Implement user CRUD operations + - Create user profile pages + - Implement role-based access control + +2. **Organization Management** + - Implement organization CRUD operations + - Create organization profile pages + - Implement organization member management + +### Phase 3: Chauffeur and Vehicle Management +1. **Chauffeur Management** + - Implement chauffeur profile creation + - Create chauffeur availability system + - Implement chauffeur rating system + +2. **Vehicle Management** + - Implement vehicle CRUD operations + - Create vehicle status tracking + - Implement vehicle maintenance scheduling + +### Phase 4: Booking and Ride Management +1. **Booking System** + - Implement booking creation flow + - Create booking management interface + - Implement booking status tracking + +2. **Ride Assignment** + - Create ride scheduling system + - Implement chauffeur assignment algorithm + - Create ride tracking interface + +3. **Ride Execution** + - Implement ride status updates + - Create ride completion flow + - Implement fare calculation + +### Phase 5: Dashboard and Reporting +1. **Dashboard** + - Create role-specific dashboards + - Implement key metrics and statistics + - Create data visualization with Recharts + +2. **Reporting** + - Implement report generation + - Create export functionality + - Implement analytics features + +### Phase 6: Advanced Features +1. **Notifications** + - Implement email notifications + - Create in-app notification system + - Set up SMS notifications for critical updates + +2. **Mobile Optimization** + - Ensure responsive design + - Optimize for mobile usage + - Implement progressive web app features + +3. **AI Integration** + - Implement intelligent ride matching + - Create predictive analytics + - Implement chatbot for customer support + +## Role-Based Access Control + +### Admin +- Full access to all system features +- User management +- Organization management +- System configuration + +### Sales +- Organization management +- Contract management +- Customer onboarding +- Reporting and analytics + +### Customer +- Booking management +- Organization member management +- Billing and invoices +- Reporting for their organization + +### Passenger +- View and track assigned rides +- Update personal profile +- Rate chauffeurs +- Request new rides + +### Planning +- Ride scheduling +- Resource allocation +- Optimization of routes +- Forecasting and planning + +### Dispatcher +- Chauffeur assignment +- Real-time ride management +- Handling exceptions and changes +- Communication with chauffeurs + +### Field Manager +- Chauffeur management +- Performance monitoring +- Quality assurance +- Training coordination + +### Field Assistant +- Support field operations +- Equipment management +- Documentation +- Chauffeur support + +### Chauffeur +- View assigned rides +- Update ride status +- Navigation assistance +- Communication with passengers + +## API Endpoints (tRPC Routers) + +### User Router +- createUser +- updateUser +- deleteUser +- getUserById +- getUsers +- updateUserRole + +### Organization Router +- createOrganization +- updateOrganization +- deleteOrganization +- getOrganizationById +- getOrganizations +- addUserToOrganization +- removeUserFromOrganization + +### Chauffeur Router +- createChauffeurProfile +- updateChauffeurProfile +- deleteChauffeurProfile +- getChauffeurById +- getChauffeurs +- updateChauffeurStatus +- assignVehicleToChauffeur + +### Vehicle Router +- createVehicle +- updateVehicle +- deleteVehicle +- getVehicleById +- getVehicles +- updateVehicleStatus +- getAvailableVehicles + +### Booking Router +- createBooking +- updateBooking +- deleteBooking +- getBookingById +- getBookings +- getBookingsByOrganization +- getBookingsByUser + +### Ride Router +- createRide +- updateRide +- deleteRide +- getRideById +- getRides +- getRidesByBooking +- getRidesByPassenger +- getRidesByChauffeur +- assignChauffeurToRide +- updateRideStatus +- completeRide + +## UI Components (shadcn/ui) + +1. **Layout Components** + - Dashboard layout + - Sidebar navigation + - Header with user menu + - Mobile navigation + +2. **Form Components** + - Input fields + - Select dropdowns + - Date pickers + - Form validation + +3. **Table Components** + - Data tables with sorting and filtering + - Pagination + - Action menus + - Bulk actions + +4. **Card Components** + - Stat cards + - Info cards + - Action cards + - Profile cards + +5. **Modal Components** + - Confirmation dialogs + - Form modals + - Information modals + - Alert dialogs + +6. **Chart Components** + - Line charts + - Bar charts + - Pie charts + - Area charts + +## State Management (Zustand) + +1. **User Store** + - Current user information + - Authentication state + - User preferences + +2. **Booking Store** + - Active bookings + - Booking form state + - Booking filters + +3. **Ride Store** + - Active rides + - Ride assignment state + - Ride filters + +4. **UI Store** + - Sidebar state + - Theme preferences + - Notification state + +## Next Steps and Timeline + +### Week 1-2: Project Setup +- Set up Next.js project +- Configure authentication +- Set up database and schema +- Implement basic UI components + +### Week 3-4: Core Features +- Implement user management +- Create organization management +- Set up role-based access control + +### Week 5-6: Chauffeur and Vehicle Management +- Implement chauffeur profiles +- Create vehicle management +- Set up availability tracking + +### Week 7-8: Booking and Ride Management +- Implement booking system +- Create ride assignment +- Set up ride tracking + +### Week 9-10: Dashboard and Reporting +- Create dashboards +- Implement reporting +- Set up analytics + +### Week 11-12: Advanced Features and Testing +- Implement notifications +- Optimize for mobile +- Comprehensive testing +- Deployment preparation + +## Conclusion +This plan outlines the comprehensive approach to building a chauffeur management system with all the required features and functionality. The modular architecture and phased implementation will ensure a scalable, maintainable, and user-friendly application. diff --git a/app/chauffeurs/page.tsx b/app/chauffeurs/page.tsx new file mode 100644 index 0000000..e9dbcc3 --- /dev/null +++ b/app/chauffeurs/page.tsx @@ -0,0 +1,31 @@ +import { AppSidebar } from "@/components/app-sidebar" +import { SiteHeader } from "@/components/site-header" +import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar" + +export default function ChauffeursPage() { + return ( + + + + +
+
+
+
+

Chauffeurs

+

+ Manage all chauffeurs and their availability +

+
+
+
+ Chauffeurs content will be displayed here +
+
+
+
+
+
+
+ ) +} diff --git a/app/dashboard/data.json b/app/dashboard/data.json new file mode 100644 index 0000000..ec08736 --- /dev/null +++ b/app/dashboard/data.json @@ -0,0 +1,614 @@ +[ + { + "id": 1, + "header": "Cover page", + "type": "Cover page", + "status": "In Process", + "target": "18", + "limit": "5", + "reviewer": "Eddie Lake" + }, + { + "id": 2, + "header": "Table of contents", + "type": "Table of contents", + "status": "Done", + "target": "29", + "limit": "24", + "reviewer": "Eddie Lake" + }, + { + "id": 3, + "header": "Executive summary", + "type": "Narrative", + "status": "Done", + "target": "10", + "limit": "13", + "reviewer": "Eddie Lake" + }, + { + "id": 4, + "header": "Technical approach", + "type": "Narrative", + "status": "Done", + "target": "27", + "limit": "23", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 5, + "header": "Design", + "type": "Narrative", + "status": "In Process", + "target": "2", + "limit": "16", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 6, + "header": "Capabilities", + "type": "Narrative", + "status": "In Process", + "target": "20", + "limit": "8", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 7, + "header": "Integration with existing systems", + "type": "Narrative", + "status": "In Process", + "target": "19", + "limit": "21", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 8, + "header": "Innovation and Advantages", + "type": "Narrative", + "status": "Done", + "target": "25", + "limit": "26", + "reviewer": "Assign reviewer" + }, + { + "id": 9, + "header": "Overview of EMR's Innovative Solutions", + "type": "Technical content", + "status": "Done", + "target": "7", + "limit": "23", + "reviewer": "Assign reviewer" + }, + { + "id": 10, + "header": "Advanced Algorithms and Machine Learning", + "type": "Narrative", + "status": "Done", + "target": "30", + "limit": "28", + "reviewer": "Assign reviewer" + }, + { + "id": 11, + "header": "Adaptive Communication Protocols", + "type": "Narrative", + "status": "Done", + "target": "9", + "limit": "31", + "reviewer": "Assign reviewer" + }, + { + "id": 12, + "header": "Advantages Over Current Technologies", + "type": "Narrative", + "status": "Done", + "target": "12", + "limit": "0", + "reviewer": "Assign reviewer" + }, + { + "id": 13, + "header": "Past Performance", + "type": "Narrative", + "status": "Done", + "target": "22", + "limit": "33", + "reviewer": "Assign reviewer" + }, + { + "id": 14, + "header": "Customer Feedback and Satisfaction Levels", + "type": "Narrative", + "status": "Done", + "target": "15", + "limit": "34", + "reviewer": "Assign reviewer" + }, + { + "id": 15, + "header": "Implementation Challenges and Solutions", + "type": "Narrative", + "status": "Done", + "target": "3", + "limit": "35", + "reviewer": "Assign reviewer" + }, + { + "id": 16, + "header": "Security Measures and Data Protection Policies", + "type": "Narrative", + "status": "In Process", + "target": "6", + "limit": "36", + "reviewer": "Assign reviewer" + }, + { + "id": 17, + "header": "Scalability and Future Proofing", + "type": "Narrative", + "status": "Done", + "target": "4", + "limit": "37", + "reviewer": "Assign reviewer" + }, + { + "id": 18, + "header": "Cost-Benefit Analysis", + "type": "Plain language", + "status": "Done", + "target": "14", + "limit": "38", + "reviewer": "Assign reviewer" + }, + { + "id": 19, + "header": "User Training and Onboarding Experience", + "type": "Narrative", + "status": "Done", + "target": "17", + "limit": "39", + "reviewer": "Assign reviewer" + }, + { + "id": 20, + "header": "Future Development Roadmap", + "type": "Narrative", + "status": "Done", + "target": "11", + "limit": "40", + "reviewer": "Assign reviewer" + }, + { + "id": 21, + "header": "System Architecture Overview", + "type": "Technical content", + "status": "In Process", + "target": "24", + "limit": "18", + "reviewer": "Maya Johnson" + }, + { + "id": 22, + "header": "Risk Management Plan", + "type": "Narrative", + "status": "Done", + "target": "15", + "limit": "22", + "reviewer": "Carlos Rodriguez" + }, + { + "id": 23, + "header": "Compliance Documentation", + "type": "Legal", + "status": "In Process", + "target": "31", + "limit": "27", + "reviewer": "Sarah Chen" + }, + { + "id": 24, + "header": "API Documentation", + "type": "Technical content", + "status": "Done", + "target": "8", + "limit": "12", + "reviewer": "Raj Patel" + }, + { + "id": 25, + "header": "User Interface Mockups", + "type": "Visual", + "status": "In Process", + "target": "19", + "limit": "25", + "reviewer": "Leila Ahmadi" + }, + { + "id": 26, + "header": "Database Schema", + "type": "Technical content", + "status": "Done", + "target": "22", + "limit": "20", + "reviewer": "Thomas Wilson" + }, + { + "id": 27, + "header": "Testing Methodology", + "type": "Technical content", + "status": "In Process", + "target": "17", + "limit": "14", + "reviewer": "Assign reviewer" + }, + { + "id": 28, + "header": "Deployment Strategy", + "type": "Narrative", + "status": "Done", + "target": "26", + "limit": "30", + "reviewer": "Eddie Lake" + }, + { + "id": 29, + "header": "Budget Breakdown", + "type": "Financial", + "status": "In Process", + "target": "13", + "limit": "16", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 30, + "header": "Market Analysis", + "type": "Research", + "status": "Done", + "target": "29", + "limit": "32", + "reviewer": "Sophia Martinez" + }, + { + "id": 31, + "header": "Competitor Comparison", + "type": "Research", + "status": "In Process", + "target": "21", + "limit": "19", + "reviewer": "Assign reviewer" + }, + { + "id": 32, + "header": "Maintenance Plan", + "type": "Technical content", + "status": "Done", + "target": "16", + "limit": "23", + "reviewer": "Alex Thompson" + }, + { + "id": 33, + "header": "User Personas", + "type": "Research", + "status": "In Process", + "target": "27", + "limit": "24", + "reviewer": "Nina Patel" + }, + { + "id": 34, + "header": "Accessibility Compliance", + "type": "Legal", + "status": "Done", + "target": "18", + "limit": "21", + "reviewer": "Assign reviewer" + }, + { + "id": 35, + "header": "Performance Metrics", + "type": "Technical content", + "status": "In Process", + "target": "23", + "limit": "26", + "reviewer": "David Kim" + }, + { + "id": 36, + "header": "Disaster Recovery Plan", + "type": "Technical content", + "status": "Done", + "target": "14", + "limit": "17", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 37, + "header": "Third-party Integrations", + "type": "Technical content", + "status": "In Process", + "target": "25", + "limit": "28", + "reviewer": "Eddie Lake" + }, + { + "id": 38, + "header": "User Feedback Summary", + "type": "Research", + "status": "Done", + "target": "20", + "limit": "15", + "reviewer": "Assign reviewer" + }, + { + "id": 39, + "header": "Localization Strategy", + "type": "Narrative", + "status": "In Process", + "target": "12", + "limit": "19", + "reviewer": "Maria Garcia" + }, + { + "id": 40, + "header": "Mobile Compatibility", + "type": "Technical content", + "status": "Done", + "target": "28", + "limit": "31", + "reviewer": "James Wilson" + }, + { + "id": 41, + "header": "Data Migration Plan", + "type": "Technical content", + "status": "In Process", + "target": "19", + "limit": "22", + "reviewer": "Assign reviewer" + }, + { + "id": 42, + "header": "Quality Assurance Protocols", + "type": "Technical content", + "status": "Done", + "target": "30", + "limit": "33", + "reviewer": "Priya Singh" + }, + { + "id": 43, + "header": "Stakeholder Analysis", + "type": "Research", + "status": "In Process", + "target": "11", + "limit": "14", + "reviewer": "Eddie Lake" + }, + { + "id": 44, + "header": "Environmental Impact Assessment", + "type": "Research", + "status": "Done", + "target": "24", + "limit": "27", + "reviewer": "Assign reviewer" + }, + { + "id": 45, + "header": "Intellectual Property Rights", + "type": "Legal", + "status": "In Process", + "target": "17", + "limit": "20", + "reviewer": "Sarah Johnson" + }, + { + "id": 46, + "header": "Customer Support Framework", + "type": "Narrative", + "status": "Done", + "target": "22", + "limit": "25", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 47, + "header": "Version Control Strategy", + "type": "Technical content", + "status": "In Process", + "target": "15", + "limit": "18", + "reviewer": "Assign reviewer" + }, + { + "id": 48, + "header": "Continuous Integration Pipeline", + "type": "Technical content", + "status": "Done", + "target": "26", + "limit": "29", + "reviewer": "Michael Chen" + }, + { + "id": 49, + "header": "Regulatory Compliance", + "type": "Legal", + "status": "In Process", + "target": "13", + "limit": "16", + "reviewer": "Assign reviewer" + }, + { + "id": 50, + "header": "User Authentication System", + "type": "Technical content", + "status": "Done", + "target": "28", + "limit": "31", + "reviewer": "Eddie Lake" + }, + { + "id": 51, + "header": "Data Analytics Framework", + "type": "Technical content", + "status": "In Process", + "target": "21", + "limit": "24", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 52, + "header": "Cloud Infrastructure", + "type": "Technical content", + "status": "Done", + "target": "16", + "limit": "19", + "reviewer": "Assign reviewer" + }, + { + "id": 53, + "header": "Network Security Measures", + "type": "Technical content", + "status": "In Process", + "target": "29", + "limit": "32", + "reviewer": "Lisa Wong" + }, + { + "id": 54, + "header": "Project Timeline", + "type": "Planning", + "status": "Done", + "target": "14", + "limit": "17", + "reviewer": "Eddie Lake" + }, + { + "id": 55, + "header": "Resource Allocation", + "type": "Planning", + "status": "In Process", + "target": "27", + "limit": "30", + "reviewer": "Assign reviewer" + }, + { + "id": 56, + "header": "Team Structure and Roles", + "type": "Planning", + "status": "Done", + "target": "20", + "limit": "23", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 57, + "header": "Communication Protocols", + "type": "Planning", + "status": "In Process", + "target": "15", + "limit": "18", + "reviewer": "Assign reviewer" + }, + { + "id": 58, + "header": "Success Metrics", + "type": "Planning", + "status": "Done", + "target": "30", + "limit": "33", + "reviewer": "Eddie Lake" + }, + { + "id": 59, + "header": "Internationalization Support", + "type": "Technical content", + "status": "In Process", + "target": "23", + "limit": "26", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 60, + "header": "Backup and Recovery Procedures", + "type": "Technical content", + "status": "Done", + "target": "18", + "limit": "21", + "reviewer": "Assign reviewer" + }, + { + "id": 61, + "header": "Monitoring and Alerting System", + "type": "Technical content", + "status": "In Process", + "target": "25", + "limit": "28", + "reviewer": "Daniel Park" + }, + { + "id": 62, + "header": "Code Review Guidelines", + "type": "Technical content", + "status": "Done", + "target": "12", + "limit": "15", + "reviewer": "Eddie Lake" + }, + { + "id": 63, + "header": "Documentation Standards", + "type": "Technical content", + "status": "In Process", + "target": "27", + "limit": "30", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 64, + "header": "Release Management Process", + "type": "Planning", + "status": "Done", + "target": "22", + "limit": "25", + "reviewer": "Assign reviewer" + }, + { + "id": 65, + "header": "Feature Prioritization Matrix", + "type": "Planning", + "status": "In Process", + "target": "19", + "limit": "22", + "reviewer": "Emma Davis" + }, + { + "id": 66, + "header": "Technical Debt Assessment", + "type": "Technical content", + "status": "Done", + "target": "24", + "limit": "27", + "reviewer": "Eddie Lake" + }, + { + "id": 67, + "header": "Capacity Planning", + "type": "Planning", + "status": "In Process", + "target": "21", + "limit": "24", + "reviewer": "Jamik Tashpulatov" + }, + { + "id": 68, + "header": "Service Level Agreements", + "type": "Legal", + "status": "Done", + "target": "26", + "limit": "29", + "reviewer": "Assign reviewer" + } +] diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 4ca8b8b..d9ceb96 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -1,52 +1,30 @@ -import { UserDetails } from "../components/user-details"; -import { OrganizationSwitcher, UserButton } from "@clerk/nextjs"; -import { CodeSwitcher } from "../components/code-switcher"; -import { LearnMore } from "../components/learn-more"; -import { Footer } from "../components/footer"; -import { ClerkLogo } from "../components/clerk-logo"; -import { NextLogo } from "../components/next-logo"; +import { AppSidebar } from "@/components/app-sidebar" +import { ChartAreaInteractive } from "@/components/chart-area-interactive" +import { DataTable } from "@/components/data-table" +import { SectionCards } from "@/components/section-cards" +import { SiteHeader } from "@/components/site-header" +import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar" -import { DASHBOARD_CARDS } from "../consts/cards"; +import data from "./data.json" -export default async function DashboardPage() { +export default function Page() { return ( - <> -
-
-
-
-
- -
- + + + + +
+
+
+ +
+
-
- - -
-
- -
-
- + +
-
- -