A modern, responsive React application for managing orders across multiple service categories including Printing & Branding, Food Delivery, Recruitment, Real Estate, Wedding Planning, and Spa & Wellness.
- π Authentication System - Secure login/signup with JWT tokens
- π User Dashboard - Track orders, view invoices, manage profile
- π¨βπΌ Admin Panel - Manage all orders, view statistics, export reports
- π PDF Invoices - Download individual or bulk invoices
- π Excel Export - Export order data with custom formatting
- πΌοΈ Profile Management - Update profile with picture upload (up to 50MB)
- π± Responsive Design - Works seamlessly on desktop, tablet, and mobile
- π¨ Modern UI - Built with Tailwind CSS for a clean, professional look
| Technology | Version | Purpose |
|---|---|---|
| React | 19.1.1 | UI Framework |
| Vite | 7.1.14 | Build Tool & Dev Server |
| Tailwind CSS | 4.1.16 | Styling |
| Axios | 1.13.1 | HTTP Client |
| React Router | 7.2.0 | Routing |
| jsPDF | 2.5.2 | PDF Generation |
| xlsx | 0.18.5 | Excel Export |
| JSZip | 3.10.1 | Bulk Invoice Download |
Before running this project, make sure you have:
- Node.js (v18 or higher)
- npm or yarn
- Backend API running (see Backend repository)
-
Clone the repository
git clone <your-repo-url> cd Frontend
-
Install dependencies
npm install
-
Create environment file
# Create .env file in the root directory touch .env -
Add environment variables
VITE_API_URL=http://localhost:3000
npm run devThe app will be available at http://localhost:5173
npm run buildThis creates an optimized production build in the dist/ folder.
npm run previewFrontend/
βββ public/ # Static assets
β βββ logo.png
β βββ logo2.png
β βββ ...
βββ src/
β βββ assets/ # Images, icons, etc.
β βββ components/ # Reusable components
β β βββ EditOrder.jsx
β β βββ EditProfile.jsx
β β βββ Header.jsx
β β βββ OrderForm.jsx
β β βββ ViewInvoices.jsx
β β βββ ui/ # UI primitives
β βββ context/ # React Context (Auth)
β β βββ AuthContext.jsx
β βββ pages/ # Page components
β β βββ Admin.jsx
β β βββ Dashboard.jsx
β β βββ Home.jsx
β β βββ Login.jsx
β β βββ ...
β βββ services/ # API integration
β β βββ api.js
β βββ App.jsx # Main app component
β βββ main.jsx # Entry point
β βββ index.css # Global styles
βββ .env # Environment variables
βββ vite.config.js # Vite configuration
βββ tailwind.config.js # Tailwind configuration
βββ package.json # Dependencies
- JWT-based authentication with 30-day token expiration
- Protected routes for authenticated users
- Role-based access (User/Admin)
- Automatic token refresh and logout on expiration
- View all your orders with real-time status
- Create new orders with service-specific fields
- Download invoices individually or in bulk
- Filter and search orders
- View all orders from all users
- Dashboard statistics (total orders, users, revenue)
- Edit or delete any order
- Export data to Excel with custom formatting
- Auto-refresh every 30 seconds
- Update personal information
- Upload profile picture (base64, up to 50MB)
- Change password with validation
- Password reset functionality
The frontend communicates with the backend API at VITE_API_URL. All requests include:
- JWT token in Authorization header
- Error handling with user-friendly messages
- Automatic logout on 401 (unauthorized)
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current userPUT /api/auth/profile- Update profileGET /api/orders- Get user ordersPOST /api/orders- Create new orderGET /api/admin/stats- Admin statisticsGET /api/admin/orders- All orders (admin)
Edit tailwind.config.js to customize colors:
theme: {
extend: {
colors: {
primary: '#your-color',
// ...
}
}
}Replace public/logo.png and public/logo2.png with your own branding.
npm run build# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod# Install Netlify CLI
npm i -g netlify-cli
# Deploy
netlify deploy --prod --dir=distRemember to set environment variables on your deployment platform:
VITE_API_URL- Your backend API URL
- Ensure backend is running and accessible
- Check
VITE_API_URLin.envfile - Verify CORS is enabled on backend
- Clear node_modules:
rm -rf node_modules && npm install - Clear Vite cache:
rm -rf node_modules/.vite
- Rebuild Tailwind:
npm run build - Check Tailwind config:
tailwind.config.js
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For support, email your-email@example.com or open an issue in the repository.
Website β’ Documentation β’ Report Bug