A modern, responsive vendor management application built with Next.js 15, React 19, and HeroUI. This application provides a comprehensive solution for managing vendors with interactive maps, real-time search, and multilingual support.
- Real-time Map Display: Interactive Leaflet maps with vendor locations
- Smart Popups: Click on vendor cards to automatically show map popups
- Location-based Search: Find vendors by geographical proximity
- Responsive Map Controls: Optimized for both desktop and mobile devices
- Real-time Search: Instant vendor search with debounced input
- Multi-language Support: Search in Persian and English
- Status Filtering: Filter vendors by active, inactive, or pending status
- Pagination: Efficient loading with infinite scroll
- Bilingual Support: Full Persian (RTL) and English (LTR) support
- Dynamic Language Switching: Seamless language toggle
- RTL Layout: Proper right-to-left layout for Persian content
- Localized Content: All text and UI elements are translatable
- Mobile-First: Optimized for all screen sizes
- Touch-Friendly: Intuitive touch interactions
- Adaptive Layout: Dynamic layout adjustments
- Modern UI: Clean, professional interface with HeroUI components
- React 19 Features: Latest React optimizations
- Memoization: Extensive use of
useMemoanduseCallback - Code Splitting: Dynamic imports for better loading
- SSR Compatible: Server-side rendering support
- Node.js 18+
- npm or yarn
- Modern web browser
-
Clone the repository
git clone <repository-url> cd vendors-app
-
Install dependencies
npm install # or yarn install -
Start development server
npm run dev # or yarn dev -
Open your browser Navigate to http://localhost:3000
- Next.js 15 - React framework with App Router
- React 19 RC - Latest React features and optimizations
- TypeScript - Type-safe development
- HeroUI - Modern component library
- Tailwind CSS - Utility-first CSS framework
- Leaflet - Interactive maps
- React-Leaflet - React integration for Leaflet
- OpenStreetMap - Free map tiles
- React Context - Global state management
- Custom Hooks - Reusable state logic
- ESLint - Code linting
- Prettier - Code formatting
- TypeScript - Static type checking
src/
βββ app/ # Next.js App Router
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
β βββ providers.tsx # Context providers
βββ components/ # React components
β βββ map-component.tsx # Interactive map
β βββ VendorList.tsx # Vendor listing
β βββ VendorModal.tsx # Add/Edit vendor modal
β βββ SkeletonLoader.tsx # Loading states
β βββ ... # Other components
βββ contexts/ # React contexts
β βββ VendorContext.tsx # Vendor state management
β βββ LanguageContext.tsx # Language management
βββ api/ # Mock data
β βββ vendors.json # Vendor data
β βββ translations.json # Translation files
βββ styles/ # Global styles
βββ globals.css # Tailwind CSS
- Interactive vendor location display
- Automatic popup opening on vendor selection
- Optimized with
useMemoanduseCallback - SSR-safe with dynamic imports
- Real-time search and filtering
- Infinite scroll pagination
- Click-to-map functionality
- Performance optimized with memoization
- Bilingual support (Persian/English)
- RTL/LTR layout switching
- Dynamic translation loading
- Context-based state management
Create a .env.local file:
NEXT_PUBLIC_APP_NAME="Vendor Management"
NEXT_PUBLIC_DEFAULT_LANGUAGE="en"- Map Center: Modify coordinates in
map-component.tsx - Vendor Data: Update
src/api/vendors.json - Translations: Edit
src/api/translations.json - Styling: Customize Tailwind classes
- Touch Gestures: Swipe and tap interactions
- Responsive Breakpoints: Optimized for all devices
- Performance: Optimized for mobile networks
- Accessibility: Screen reader support
- Update
LanguageContext.tsx - Add translation files
- Configure RTL/LTR support
- Test layout adjustments
{
"header": {
"brandName": "ACME",
"searchPlaceholder": "Search vendors..."
},
"vendor": {
"status": {
"active": "Active",
"inactive": "Inactive",
"pending": "Pending"
}
}
}npm run build
vercel --prodFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]npm run build
npm run export# Run tests
npm test
# Run with coverage
npm run test:coverage
# E2E tests
npm run test:e2e- Lighthouse Score: 95+ across all categories
- First Contentful Paint: < 1.5s
- Largest Contentful Paint: < 2.5s
- Cumulative Layout Shift: < 0.1
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - React framework
- HeroUI - Component library
- Leaflet - Interactive maps
- Tailwind CSS - CSS framework
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
Built with β€οΈ using Next.js, React, and modern web technologies



