Goal of the assignment is to create a minimalistic product inventory system. This repository contains a stub of the application with the same tech stack that our real application is built with:
- Docker
- Postgres SQL database
- Hasura GraphQL server
- Typescript
- React
- Apollo GraphQL client
- Ant Design UI library
Please complete all of the following:
- List available products, their stock and prices
- Calculate total value of all products in the inventory
- Create a form to add new product to inventory
# Git Clone to your Loacal Machine
git clone https://github.com/Kanon11/test-assignment.git
# Go to project directory
cd test-assignment
# start postgres & hasura
docker compose up -d
# install dependencies
npm i
# start frontend server
npm start
now you are done, open http://localhost:3000 in your browser.
Hasura serves a grapql endpoint with schema auto generated from Postgres schema. It is available at http://localhost:8080/v1/graphql. Frontend should interact with the database only through this endpoint.
Hasura console is available at http://localhost:8080/console.
To add migrations for new database tables, you would have to run Hasura console locally using Hasura CLI.