Skip to content

tallysdev/shawandpartners-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Take Home Test


📖 Documentation

📑 About

The purpose of this test is to evaluate your skills in Fullstack, Backend(my choice), and/or Frontend development. You will be required to build a web application that allows users to load a CSV file with preformatted data and display the data as cards on the website. The application should also include a search bar that allows users to search for data within the loaded CSV file.

Requirements for Backend

An endpoint that allows the frontend to load the CSV file. An endpoint that allows the frontend to search through the loaded CSV data. The search endpoint should accept query parameters for search terms and filters, and should return the matching results. Appropriate error handling for invalid search queries or other errors.

Instructions for Backend

  • The backend should be implemented as a RESTful API using Node. (Try not to use an opinionated framework such as Adonis or Nest).
  • The backend must include the following endpoints:
  • [POST /api/files] An endpoint that accepts a CSV file upload from the frontend and stores the data in a database or a data structure.
  • [GET /api/users] Should include an endpoint that allows the frontend to search through the loaded CSV data.
  • The search endpoint should accept a ?q= query parameter for search terms and should search through EVERY column of the CSV
  • The backend should include appropriate error handling for invalid requests or other errors.

📥 Packages

The project was developed using NPM, but you can use any of the managers below:

  • Yarn
  • PNPM
  • NPM

🚀 Starting

Step 1:

When cloning the project run the command npm install in the terminal to install the dependencies.

Step 2:

Create the .env file in the root of the project to connect to the database.

Step 3:

To connect to the database, write the following line in the .env file: DATABASE_URL="file:./dev.db" or find the same line in the [.env.example] (./ .env.example)

Step 4:

To connect to the database, write the following line in the .env file: DATABASE_URL="file:./dev.db" or find the same line in the [.env.example] (./ .env.example)

Step 5:

Run the npx prisma migrate dev command to initialize the application database

Step 6:

Then run the command:npm run studio in the terminal. This will show your database using the prism layout.

Step 7:

If you have errors with migrate, run:npx prisma migrate reset and the migrations will be reset, then repeat the previous steps.

Step 8:

To run the tests run the command npm test.

About

Test resolution for shawandpartners.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published