An interactive, mobile‑responsive dashboard for the fictitious textile company Amana Industries. It visualizes factory locations in Jordan and Egypt on a Leaflet map with detailed popups and status‑based markers, using Tailwind CSS for styling.
- Interactive Leaflet map with markers and popups
- Status‑based marker colors (green: operational, red: maintenance)
- Mobile‑first layout with Tailwind CSS v4
- Local JSON dataset for reliable offline development
- Simple top navigation and footer
- Next.js 15
- React 19
- Tailwind CSS 4
- Leaflet + React‑Leaflet
app/
├── components/
│ └── FactoryMap.tsx
├── data/
│ └── factories.json
├── globals.css
├── layout.tsx
└── page.tsx
- Install dependencies
npm install- Run the dev server
npm run devOpen http://localhost:3000.
npm run dev: Start development server (Turbopack)npm run build: Production build (Turbopack)npm run start: Start prod server
- Source:
app/data/factories.json - The main page (
app/page.tsx) loads this JSON at runtime. Update this file to change factories, locations, or status.
- The
FactoryMapcomponent is dynamically imported to avoid SSR issues with Leaflet. - Tile source: OpenStreetMap. Ensure network access to tile servers during development.
- If markers don’t appear, confirm Leaflet CSS is loaded by
FactoryMap.tsxand network access to icon URLs is allowed. - On Windows/PowerShell, use
Set-ExecutionPolicy -Scope Process Bypassif you hit script policy issues when running tools. - If Tailwind classes don’t apply, verify
postcss.config.mjsincludes@tailwindcss/postcssandapp/globals.cssis imported inapp/layout.tsx.
For educational/demo use.