This project contains backend and frontend for the technical interview project.
Task
Backend task: create a single API endpoint which will generate a number of randomly located geometry coordinates within a given boundary box and return coordinates as an array of lat/long dictionaries or named arrays.
Frontend task : Using the above API endpoint and plot the coordinates on a map
Tech Stack
-Backend :
-NodeJs/Express,
-TypeScript
-GraphQL,
-Jest for testing.
-Frontend :
-React
-Typescript,
-GraphQL,
-React-testing-library for test.
client\src\config --> Please add your Mapbox Api Token
RUNNING THE BACKEND SERVICE
npm install
npm run serve
This will launch the graphql server . Use query:
{ getCoords(bbox:"10,11,-12,12") }
limit - maximum amount of data coordinates to generate bbox - Boundary box coords
TO run test npm run test
RUNNING THE FRONTEND
npm install
npm start
TO run test npm test