A proof-of-concept React application that merges product data from three companies, allowing for editable fields and Excel export functionality.
- React Frontend: Modern React application with component-based architecture
- Three Company Data Tables: Displays 10 products each with editable ItemCode and ItemCodeDesc fields
- Real-time Editing: Click on any description field to edit it directly
- Smart Merge Logic: Finds common ItemCodes across all three companies
- Backend Processing: Sends descriptions to backend for intelligent processing
- Excel Export: Export merged results to Excel format
- Modern UI: Built with Tailwind CSS for a clean, responsive interface
-
Install Dependencies:
npm install
-
Start Development Server:
npm run dev
This will start both the backend server (port 3000) and React dev server (port 3001)
-
Open the Application:
- Navigate to
http://localhost:3001in your browser
- Navigate to
-
Workflow:
- Click "Load Product Data" to populate the three company tables
- Edit any description fields by clicking on them
- Click "MERGE" to find common ItemCodes and process descriptions
- View results in the merge results table
- Click "Export to Excel" to download the results
The application comes with sample data for three companies:
- Company A: Laptop Computer, Wireless Mouse, Mechanical Keyboard, etc.
- Company B: Portable Laptop, Gaming Mouse, RGB Keyboard, etc.
- Company C: Business Laptop, Ergonomic Mouse, Silent Keyboard, etc.
All companies share the same ItemCodes (ITEM001-ITEM010) but with different descriptions.
GET /api/data- Returns sample data for all three companiesPOST /api/merge- Processes descriptions through backend logicPOST /api/export- Exports merged results to Excel format
- Backend: Node.js, Express.js
- Frontend: React 18, Vite
- Styling: Tailwind CSS
- Excel Export: xlsx library
- Build Tool: Vite for fast development and building
├── package.json # Project dependencies
├── vite.config.js # Vite configuration
├── server.js # Express server with API endpoints
├── index.html # HTML entry point
├── src/
│ ├── main.jsx # React entry point
│ ├── App.jsx # Main App component
│ ├── index.css # Global styles with Tailwind
│ └── components/ # React components
│ ├── ControlPanel.jsx
│ ├── CompanyTable.jsx
│ ├── MergeResults.jsx
│ └── StatusMessage.jsx
└── README.md # This file
For development with hot reload:
npm run devFor production build:
npm run build
npm startnpm run dev- Start both backend and frontend in development modenpm run server- Start only the backend servernpm run client- Start only the React dev servernpm run build- Build React app for productionnpm start- Start production server