This archive contains the complete source code for the Uber Clone Admin Panel with all features implemented.
- β Complete backend API (tRPC + Express)
- β Admin frontend (React 19 + Vite + Tailwind 4)
- β Database schema (Drizzle ORM)
- β User management system
- β Real-time notifications (Socket.IO)
- β Bilingual support (English + Arabic)
- β All configurations and dependencies
uber-clone/
βββ client/ # Frontend (React + Vite)
β βββ src/
β β βββ pages/ # Admin pages
β β β βββ Home.tsx # Landing page
β β β βββ AdminDashboard.tsx
β β β βββ AdminUsers.tsx # User management
β β β βββ AdminCancellations.tsx
β β βββ components/ # Reusable components
β β β βββ NotificationCenter.tsx
β β β βββ ui/ # shadcn/ui components
β β βββ i18n/ # Translations
β β β βββ locales/
β β β β βββ en.json # English
β β β β βββ ar.json # Arabic
β β β βββ index.ts
β β βββ lib/
β β β βββ trpc.ts # tRPC client
β β βββ hooks/ # Custom hooks
β β βββ contexts/ # React contexts
β β βββ App.tsx # Routes
β β βββ main.tsx # Entry point
β βββ public/ # Static assets
β βββ index.html
β
βββ server/ # Backend (Express + tRPC)
β βββ routers.ts # All API endpoints
β βββ db.ts # Database queries
β βββ _core/ # Core infrastructure
β β βββ socket.ts # Socket.IO setup
β β βββ context.ts # tRPC context
β β βββ env.ts # Environment variables
β β βββ notification.ts # Push notifications
β βββ *.test.ts # Unit tests
β
βββ drizzle/ # Database
β βββ schema.ts # Database schema
β βββ migrations/ # Migration files
β
βββ shared/ # Shared types
βββ storage/ # S3 helpers
βββ package.json # Dependencies
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript config
- Node.js 18+ installed
- MySQL/TiDB database
- npm or pnpm package manager
-
Extract the archive
tar -xzf uber-clone-admin-panel-full.tar.gz cd uber-clone -
Install dependencies
npm install # or pnpm install -
Configure environment variables
The project uses Manus platform environment variables. If running locally, create a
.envfile:DATABASE_URL=mysql://user:password@localhost:3306/uber_clone JWT_SECRET=your-secret-key-here VITE_APP_TITLE=Uber Clone Admin
-
Push database schema
npm run db:push
-
Start development server
npm run dev
-
Access the admin panel
http://localhost:3000
- Platform statistics (total rides, users, revenue)
- Active drivers and riders count
- Recent activity feed
- Real-time metrics
- View all users (riders, drivers, admins)
- Search and filter users
- Edit user information
- Delete users with confirmation
- Change user roles (rider β driver β admin)
- Verify/unverify drivers
- View user statistics (total rides, rating)
- View all cancelled rides
- Filter by cancellation reason
- Filter by who cancelled (rider/driver)
- Process refunds
- Track refund status
- Cancellation analytics
- Real-time notifications
- Unread count badge
- Mark as read functionality
- Notification history
- Socket.IO powered
- English (default)
- Arabic (full translation)
- Language switcher in header
- All admin pages translated
- React 19 - Latest React with modern features
- Vite - Fast build tool
- Tailwind CSS 4 - Utility-first CSS
- shadcn/ui - Beautiful UI components
- tRPC - End-to-end typesafe APIs
- React Router (wouter) - Client-side routing
- i18next - Internationalization
- Socket.IO Client - Real-time updates
- Express 4 - Web framework
- tRPC 11 - TypeScript RPC framework
- Drizzle ORM - Type-safe database ORM
- Socket.IO - WebSocket server
- Zod - Schema validation
- MySQL/TiDB - Database
- TypeScript - Type safety
- Vitest - Unit testing
- ESLint - Code linting
- Prettier - Code formatting
// Get all users with optional filters
admin.getAllUsers.useQuery({
role?: 'rider' | 'driver' | 'admin'
})
// Update user information
admin.updateUser.useMutation({
userId: number,
name?: string,
email?: string,
phone?: string
})
// Delete user
admin.deleteUser.useMutation({
userId: number
})
// Update user role
admin.updateUserRole.useMutation({
userId: number,
role: 'rider' | 'driver' | 'admin'
})
// Verify driver
admin.verifyDriver.useMutation({
userId: number,
isVerified: boolean
})
// Get platform statistics
admin.getStats.useQuery()
// Get recent rides
admin.getRecentRides.useQuery({ limit?: number })
// Get cancelled rides
admin.getCancelledRides.useQuery()
// Process refund
admin.processRefund.useMutation({
rideId: number,
refundAmount: number,
status: 'processed' | 'rejected'
})// Get user notifications
notifications.getNotifications.useQuery()
// Mark notification as read
notifications.markAsRead.useMutation({
notificationId: number
})
// Mark all as read
notifications.markAllAsRead.useMutation()users
- id, openId, name, email, phone
- role (rider/driver/admin)
- driverStatus, isVerified
- totalRides, averageRating
- Timestamps
rides
- id, riderId, driverId
- pickupLocation, dropoffLocation
- status, fare, distance, duration
- Timestamps
notifications
- id, userId, type, title, message
- isRead, createdAt
vehicles
- id, driverId
- make, model, year, color
- vehicleType, licensePlate
payments
- id, rideId, riderId, driverId
- amount, paymentMethod, status
Run all tests:
npm testRun specific test file:
npm test notifications.test.tsTest coverage includes:
- User management operations
- Notification system
- Ride flow constraints
- Vehicle management
- Location tracking
-
Create new locale file:
cp client/src/i18n/locales/en.json client/src/i18n/locales/fr.json
-
Translate all keys in the new file
-
Import in
client/src/i18n/index.ts:import fr from './locales/fr.json'; resources: { en: { translation: en }, ar: { translation: ar }, fr: { translation: fr } // Add new language }
import { useTranslation } from 'react-i18next';
function MyComponent() {
const { t } = useTranslation();
return <h1>{t('admin.dashboard')}</h1>;
}The admin panel uses Manus OAuth for authentication. When deployed on Manus platform, authentication is automatic.
For local development:
- Admin role is required to access admin pages
- Role check happens in tRPC context
- Protected procedures use
protectedProcedure
This package includes only the admin panel. For the mobile apps (iOS/Android), see the separate uber-clone-mobile-v2.tar.gz archive which includes:
- React Native + Expo
- Rider app features
- Driver app features
- Native camera, maps, push notifications
The project is already configured for Manus platform deployment:
- Push code to repository
- Click "Publish" in Manus UI
- Custom domain support available
For other platforms:
-
Build frontend
npm run build
-
Set environment variables on your hosting platform
-
Start production server
npm run start
-
Database migration
npm run db:push
- Platform metrics and statistics
- Recent activity feed
- Quick action cards
- Searchable user list
- Edit/delete operations
- Role management
- Driver verification
- Cancelled rides list
- Refund processing
- Analytics and filters
Vite provides instant HMR. Changes reflect immediately without full reload.
After modifying drizzle/schema.ts:
npm run db:push- Add tRPC procedure in
server/routers.ts - Add database query in
server/db.ts - Create React page in
client/src/pages/ - Add route in
client/src/App.tsx - Add translations in
client/src/i18n/locales/
- Use TypeScript for type safety
- Follow existing patterns
- Write unit tests for new features
- Use shadcn/ui components for consistency
For issues or questions:
- Check existing tests for usage examples
- Review tRPC router definitions
- Inspect database schema in
drizzle/schema.ts
This is a demonstration project. Modify and use as needed for your requirements.
β Complete admin panel with all features β User management (CRUD operations) β Real-time notifications β Bilingual support (English + Arabic) β Dashboard with analytics β Cancellation management β Ride monitoring β Driver verification β Search and filtering β Responsive design β Type-safe APIs β Unit tests β Production-ready code
Happy coding! π