This project consists of two main sections: Front-End (React) and Back-End (Node.js). The objective of the project is to allow users to upload a CSV file, split its content based on gender, and download the resulting CSV files as a zipped archive.
- A single-page React interface containing a CSV file upload form.
- Displays a progress indicator during the file upload.
- Displays an appropriate error message if there is an issue during the upload.
- Navigate to the
frontenddirectory. - Install the required dependencies:
npm install
- Start the React development server:
npm start
The front-end should be accessible at http://localhost:3000 in your browser.
- A Node.js API with a route to handle CSV file uploads.
- The route efficiently handles CSV files, separating them based on gender.
- The resulting CSV files are compressed into a
.zipfile and sent back to the client. - Error handling for issues during the file upload or processing.
- Navigate to the
backenddirectory. - Install the required dependencies:
npm install
- Start the Node.js server:
npm start
The back-end should be accessible at http://localhost:5000.
-
Clone the repository:
git clone <your-repository-url>
-
Install the required dependencies for both front-end and back-end:
- In the
frontenddirectory:npm install
- In the
backenddirectory:npm install
- In the
-
Start both the front-end and back-end servers:
- In the
frontenddirectory, run:npm start
- In the
backenddirectory, run:npm start
- In the
Once both servers are running, you can access the React application at http://localhost:3000, and the back-end API will be available at http://localhost:5000.
Both the front-end and back-end have basic error handling for common issues such as:
- Incorrect file format
- Upload interruptions
- Processing errors
- If the
data.csvfile does not contain any rows with the genders "male" and "female", the code creates an empty ZIP file with no CSV files inside.
This project is licensed under the MIT License.








