Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

collective-technical-test

Technical test for Collective.Work using NestJS and ReactJS.

Description

This project is composed of two parts:

Backend

The backend has the following features:

  • Endpoint to fetch the top 150 cryptos, it also allows us to search by keyword.
  • A caching system to store the data in memory, so we don't have to fetch it every time.
  • A scheduled task to fetch the data every 5 seconds and cache it to stay up to date.
  • Swagger documentation.
  • It also contains tests for the cryptos service.

Frontend

The frontend has the following features:

  • A simple search bar to search by keyword. The input is debounced in order to avoid unnecessary api calls.
  • A DataGrid to display the cryptos. it also supports features like sorting by columns and pagination.
  • The data is fetched from the backend dynamically every 5 seconds in order to stay up to date.
  • The table is animated with colors when the data changes.
  • We use snackbars to display errors.

Running the project

Requirements

  • Docker 20.10.7+
  • docker-compose 1.29.2+

in order to run the project without Docker, please follow the instructions in both folders:

Configuration

Start by setting the environment variables:

  • cp .env_example to .env using the following command:
    cp .env_example .env

Build

Once the environment variables are set, you can build the project by running the following command:

docker-compose build

Run

to run the project, you can run the following command:

docker-compose up -d 

in order to stop the containers, you can run the following command:

docker-compose down

Usage

Improvements

I would suggest that we collect the data more frequently, and send it to the frontend using sockets in order to avoid fetching it every time and to stay always up to date.

About

Collective - Technical test using NestJS and ReactJS

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages