π Live Site | π Report Bug | β¨ Request Feature
- π― About The Project
- β¨ Core Features
- π Tech Stack
- π Getting Started
- π Dashboard Roles
- π Project Structure
- π¨ UI/UX Highlights
- πΈ Screenshots
- π¨βπ» Developer
GarFlex Client is a feature-rich React-based web application designed to streamline the garments manufacturing and order management process. It provides a seamless experience for buyers to place bulk orders, managers to oversee production, and admins to manage the entire ecosystem.
The application focuses on speed, security, and user-centered design, featuring real-time order tracking with location-based updates and secure payment gateways.
- π― Efficient Order Management β Simplified bulk garment ordering process
- π Real-time Tracking β Live location-based production and delivery updates
- π³ Secure Payments β Integrated Stripe payment gateway
- π₯ Multi-role System β Specialized dashboards for different user types
- π Analytics Dashboard β Comprehensive statistics and insights
β
Dynamic Product Catalog β Browse garments with advanced filtering and search
β
Smart Order Placement β Intuitive bulk order form with instant price calculation
β
Stripe Payment β Secure credit/debit card checkout process
β
Real-time Tracking β Live status updates with location-based tracking on map
β
Multi-role Dashboard β Tailored interfaces for Admin, Manager, and Buyer
β
Order History β Complete transaction and order history with filtering
β
Firebase Auth β Secure login with Email/Password and Google Social Auth
β
Private Routes β Protected dashboard access based on user roles and authentication
β
Axios Interceptors β Automated JWT token injection for secure API communication
β
Form Validation β Robust client-side validation using React Hook Form
β
Role-based Access Control β Granular permissions for different user types
β
Responsive Design β Fully optimized for mobile, tablet, and desktop
β
Interactive Maps β React Leaflet integration for location tracking
β
Pagination β Industry-standard pagination (15 items per page)
β
Smooth Animations β Framer Motion for elegant transitions
β
Dark Mode β Theme switching capability
β
Toast Notifications β Real-time user feedback
- React.js 18 β Component-based UI library
- React Router v6 β Declarative routing for SPA navigation
- TanStack Query (v5) β Powerful data fetching and state management
- Tailwind CSS & DaisyUI β Modern utility-first CSS framework and components
- Motion (Framer Motion) β Smooth UI animations and transitions
- React Leaflet β Interactive maps for order tracking
- Lucide React & React Icons β Modern iconography
- SweetAlert2 β Elegant pop-up notifications
- React Hot Toast β Lightweight toast notifications
- Stripe SDK β Secure online payment processing
- Firebase β Authentication and hosting
- Axios β HTTP client with interceptors
- React Hook Form β Efficient form management
- Vite β Lightning-fast build tool
node >= 18.0.0
npm >= 9.0.01. Clone the repository
git clone https://github.com/aamamunszone/garflex-client.git
cd garflex-client2. Install dependencies
npm install3. Setup environment variables
Create a .env.local file in the project root:
# Firebase Configuration
VITE_apiKey=your_firebase_api_key
VITE_authDomain=your_auth_domain
VITE_projectId=your_project_id
VITE_storageBucket=your_storage_bucket
VITE_messagingSenderId=your_sender_id
VITE_appId=your_app_id
# Stripe
VITE_STRIPE_PUBLIC_KEY=your_stripe_publishable_key
# API
VITE_API_URL=https://garflex-server.vercel.app4. Run the application
npm run devThe application will be available at http://localhost:5173
npm run buildnpm run build
firebase deployPermissions:
- Browse and search product catalog
- Place bulk garment orders
- View order history with filtering
- Track orders in real-time with map
- Make secure payments via Stripe
- Cancel pending orders
- View personal dashboard statistics
Key Pages:
- My Orders
- Track Order (with interactive map)
- Order History
- Profile Settings
Permissions:
- View all orders in the system
- Approve or reject pending orders
- Update order tracking information
- Add production status updates with location
- View manager-specific statistics
- Manage order lifecycle (Cutting, Sewing, Finishing, QC, Packing, Shipping)
Key Pages:
- All Orders Management
- Order Tracking Updates
- Production Statistics
- Approval Queue
Permissions:
- Full access to all system features
- Manage all users (promote/demote roles)
- View global statistics and analytics
- Manage product catalog (CRUD operations)
- Delete any order
- Access comprehensive dashboard with charts
- System configuration and settings
Key Pages:
- Dashboard (with charts and analytics)
- User Management
- Product Management
- Order Management (full access)
- System Statistics
garflex-client/
βββ src/
β βββ api/ # Axios instances and API configurations
β β βββ axiosPublic.js # Public API instance
β β βββ axiosSecure.js # Secure API with interceptors
β βββ components/
β β βββ common/ # Reusable components
β β β βββ Container/
β β β βββ Loader/
β β β βββ Navbar/
β β βββ products/ # Product-related components
β β β βββ ProductCard/
β β βββ dashboard/ # Dashboard components
β βββ hooks/ # Custom React hooks
β β βββ useAuth.jsx # Authentication hook
β β βββ useAxios.jsx # Public axios hook
β β βββ useAxiosSecure.jsx # Secure axios hook
β βββ layouts/
β β βββ MainLayout.jsx # Public layout
β β βββ DashboardLayout.jsx # Dashboard layout
β βββ pages/
β β βββ Home/ # Landing page
β β βββ AllProducts/ # Product catalog
β β βββ Auth/ # Login/Register
β β βββ Dashboard/ # Role-specific dashboards
β β βββ Admin/
β β βββ Manager/
β β βββ Buyer/
β βββ providers/
β β βββ AuthProvider.jsx # Auth context provider
β βββ routes/
β β βββ Routes.jsx # Main routing configuration
β β βββ PrivateRoute.jsx # Protected route wrapper
β βββ firebase/
β β βββ firebase.config.js # Firebase initialization
β βββ assets/ # Images and global styles
β βββ App.jsx
β βββ main.jsx
βββ public/
β βββ products/ # Product images
βββ index.html
βββ tailwind.config.js # Tailwind configuration
βββ vite.config.js # Vite configuration
βββ .firebaserc # Firebase project config
βββ firebase.json # Firebase hosting config
βββ package.json
- Minimalist & Modern β Clean interface with focus on functionality
- Consistent Branding β Cohesive color scheme and typography
- Intuitive Navigation β User-friendly routing and breadcrumbs
- Accessible β WCAG compliant with proper ARIA labels
β
Responsive Design β Fully optimized for Mobile, Tablet, and Desktop
β
Skeleton Loaders β Smooth loading states for premium feel
β
Interactive Charts β Visual representation of statistics (Admin)
β
Toast Notifications β Real-time feedback for every user action
β
Smooth Animations β Page transitions and micro-interactions
β
Optimized Images β Lazy loading and proper image optimization
β
Error Boundaries β Graceful error handling and fallbacks
β
Progressive Enhancement β Works without JavaScript where possible
- Custom Container β Consistent max-width wrapper
- Reusable Cards β Product cards, order cards, stat cards
- Modal System β Dynamic modals for order details and tracking
- Form Components β Validated input fields with error states
- Table Components β Sortable and filterable data tables
- Badge System β Status indicators for orders and payments
- Hero section with call-to-action
- Product showcase with filtering
- Feature highlights
- Coverage area with interactive map
- Grid layout with product cards
- Category filtering
- Search functionality
- Pagination (15 items per page)
- Order history table
- Real-time tracking with map
- Payment history
- Quick stats overview
- Order approval queue
- Tracking update form
- Production statistics
- Status management
- Comprehensive analytics
- User management table
- Product CRUD interface
- System-wide statistics
export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
colors: {
primary: '#6366f1',
secondary: '#8b5cf6',
},
},
},
plugins: [require('daisyui')],
daisyui: {
themes: ['light', 'dark'],
},
};{
"hosting": {
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}- Code Splitting β Lazy loading of routes and components
- React Query Caching β Optimized data fetching with cache management
- Image Optimization β Compressed images and lazy loading
- Bundle Size β Tree-shaking and minification
- Memoization β useMemo and useCallback for expensive operations
- Virtual Scrolling β For large lists (planned feature)
- Email notifications for order updates
- SMS alerts for delivery
- Advanced analytics dashboard
- Multi-language support
- Mobile app (React Native)
- Bulk order import via CSV
- Invoice generation and download
- Live chat support
If you encounter any issues, please create an issue on GitHub.