This web application allows users to load a CSV file with preformatted data and display the data as cards on the website. Users can also search for data within the loaded CSV file using a search bar.
To run this application, you need to have the following installed on your system:
-
Clone this repository:
git clone https://github.com/FelipeG-Almeida/full-stack-test.git cd full-stack-test
-
Install the dependencies for both frontend and backend:
# Install frontend dependencies cd frontend npm install # Install backend dependencies cd ../backend npm install
-
Start the frontend development server:
cd frontend npm run dev
-
Open your browser and navigate to http://localhost:4000 to access the frontend of the application.
-
Use the "Load CSV" button to load a CSV file from your local machine.
-
Enter search terms in the search bar to filter the displayed cards based on your search.
-
Start the backend server:
cd backend npm run dev
-
The backend will run on http://localhost:3000.
-
Use the following endpoints:
POST /api/files
to upload a CSV file.GET /api/users?q=<searchTerm>
to search through the loaded CSV data.
Desktop:
Mobile:
- Frontend: React, TypeScript
- Backend: Node.js, Express, TypeScript
- Testing: Jest
Here's the coverage from the project:
Given the project instructions, I assumed that the CSV file would have the same structure as the provided example. As a result, I created a "mocked" database structure to match the given structure. However, it is entirely possible to add a bit more complexity and allow for any CSV with any number of columns to be provided.