GithubHelp home page GithubHelp logo

desafio-tecnico-fullstack's Introduction

Full Stack Project - README

The system must be built with a backend in Node.js, a frontend in React.js and use a Postgres database.

The user will be able to upload a CSV file with the product code and the new price, and the tool must validate the information, ensuring that the price is not below cost, does not exceed the 10% readjustment limit and that the price of the package be updated according to the components.

At the end, the system will display the validated product information and allow the price to be updated in the database.

This is a full stack project that utilizes React, Node.js, MySQL, MySQL Workbench, Postman, JavaScript, Sequelize, and PapaParse. The project involves the development of a web application that allows importing data through a CSV file on the frontend. The backend handles routes, models, and validations to ensure data integrity and security.

Technologies Used

  • React
  • Node.js
  • ElephantSQL
  • Postman
  • JavaScript
  • Sequelize
  • PapaParse

Getting Started

To get started with the project, follow the steps below:

  1. Clone the repository: git clone <repository_url>
  2. Navigate to the project directory: cd <project_directory>
  3. Install the necessary dependencies:
    • For the backend:
      • Install Sequelize: npm install sequelize
    • For the frontend:
      • Install PapaParse: npm install papaparse
  4. Set up the MySQL database using MySQL Workbench.
  5. Update the database configuration in the backend to match your MySQL database.
  6. Start the server using the command: npm run dev

Backend

The backend of this project is built using Node.js and utilizes Sequelize as the ORM (Object-Relational Mapping) tool to interact with the MySQL database. It handles routes, models, and validations to ensure the smooth flow of data and maintain data integrity.

Routes

The backend consists of various routes that handle different operations. These routes define the endpoints for data retrieval, creation, update, and deletion. Each route is responsible for processing incoming requests, performing the necessary actions on the data, and sending appropriate responses.

Models

Models in the backend represent the structure of the data stored in the MySQL database. Sequelize simplifies the creation and management of models by providing a robust set of functionalities. Models define the tables and relationships in the database, allowing you to interact with the data using JavaScript objects.

Validations

Data validation is a critical aspect of this project to ensure the accuracy and security of the data. The backend implements validations to check the integrity of the incoming data. By enforcing validation rules, we can prevent invalid or malicious data from being stored in the database. Validations are implemented at the model level to ensure that data meets the specified criteria before being processed or stored.

Frontend

The frontend of this project is developed using React, providing a user-friendly interface for importing data through a CSV file. The data from the CSV file is then processed and sent to the backend for further validation and storage in the MySQL database.

The frontend uses PapaParse, a JavaScript library, to handle CSV parsing. PapaParse offers efficient parsing capabilities and enables the user to preview and manipulate the imported data before submitting it to the backend.

Conclusion

This full stack project demonstrates the integration of multiple technologies to create a powerful web application. By combining React for the frontend, Node.js for the backend, MySQL for database management, and Sequelize for data handling, we achieve a robust and scalable solution. The backend handles routes, models, and validations to ensure data integrity, while the frontend allows easy importing of CSV data.

Deploy

The project is online and can be used using the sample CSV file on the project.

The backend is uploaded to Cyclic using Postgres

link: https://update-product-price.netlify.app/

Techs Used

NodeJs, MySQL, Postman, JavaScript, React, Sequelize, VSCode

Project Status

Finalized

desafio-tecnico-fullstack's People

Contributors

mariofredcast avatar mfcastilho avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.