Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“¦ GarFlex Client

Modern Garments Manufacturing & Order Management Dashboard

🌐 Live Site | πŸ› Report Bug | ✨ Request Feature


πŸ“‹ Table of Contents


🎯 About The Project

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.

Why GarFlex?

  • 🎯 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

✨ Core Features

🧩 User Experience

βœ… 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

πŸ” Security & Logic

βœ… 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

πŸ“± Additional Features

βœ… 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


πŸ›  Tech Stack

Frontend Core

  • 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

UI & Animation

  • 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

Tools & Integrations

  • 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

πŸš€ Getting Started

πŸ”§ Prerequisites

node >= 18.0.0
npm >= 9.0.0

πŸͺ„ Installation

1. Clone the repository

git clone https://github.com/aamamunszone/garflex-client.git
cd garflex-client

2. Install dependencies

npm install

3. 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.app

4. Run the application

npm run dev

The application will be available at http://localhost:5173

πŸ“¦ Build for Production

npm run build

πŸš€ Deploy to Firebase

npm run build
firebase deploy

πŸ” Dashboard Roles

πŸ‘€ Buyer

Permissions:

  • 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

πŸ’Ό Manager

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

πŸ›  Admin

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

πŸ“‚ Project Structure

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

🎨 UI/UX Highlights

Design Philosophy

  • 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

Technical Highlights

βœ… 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

Component Library

  • 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

πŸ“Έ Screenshots

🏠 Landing Page

  • Hero section with call-to-action
  • Product showcase with filtering
  • Feature highlights
  • Coverage area with interactive map

πŸ“¦ Product Catalog

  • Grid layout with product cards
  • Category filtering
  • Search functionality
  • Pagination (15 items per page)

πŸ“Š Dashboards

Buyer Dashboard

  • Order history table
  • Real-time tracking with map
  • Payment history
  • Quick stats overview

Manager Dashboard

  • Order approval queue
  • Tracking update form
  • Production statistics
  • Status management

Admin Dashboard

  • Comprehensive analytics
  • User management table
  • Product CRUD interface
  • System-wide statistics

πŸ”§ Configuration Files

Tailwind Config (tailwind.config.js)

export default {
  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
  theme: {
    extend: {
      colors: {
        primary: '#6366f1',
        secondary: '#8b5cf6',
      },
    },
  },
  plugins: [require('daisyui')],
  daisyui: {
    themes: ['light', 'dark'],
  },
};

Firebase Config (firebase.json)

{
  "hosting": {
    "public": "dist",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

πŸš€ Performance Optimizations

  • 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)

πŸ› Known Issues & Future Enhancements

Planned Features

  • 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

Bug Reports

If you encounter any issues, please create an issue on GitHub.


πŸ‘¨β€πŸ’» Developer

Abdullah Al Mamun
Full Stack Developer | MERN Stack Specialist

GitHub LinkedIn Portfolio Email


πŸ“Š Project Stats

React Vite TailwindCSS Firebase License


Made with ❀️ and πŸ“¦ by Abdullah Al Mamun

⭐ Star this repo if you like it!

About

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.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages