/onduken_hackathon

Platform for finding products in various stores and view stores on the map

OnDuken Platform | for AITUHackDay: GIS Technologies Hackathon (KazAeroSpace)

OnDuken - Platform for finding products in various stores and view stores on the map.

The technical task was provided by KazAeroSpace, during AITUHackDay: GIS Technologies.

Separate GitHub Repositories: Backend, Frontend

Features:

  • Beautiful design
  • JWT Authentication (login/register/logout)
  • Dynamic search
  • Map with stores where you can buy selected product (Clustering, store info on map)
  • Data parsing (technodom, sulpak) with recording to database. Runs once an hour (cron) or using post request
  • Logging requests and parsing with rotation (rotation once an hour, archiving)

Technologies:

  • Front: React.js, Redux.js, Swiper.js, Material UI
  • Back: Node.js, TypeScript, Express.js, MikroORM, PostgreSQL
  • Deploy: Docker, docker-compose, (Nginx)

Endpoints:

  • [POST] /api/users/login - {email, password} (token, user)
  • [POST] /api/users/register - {email, name, password, repeat_password} (token, user)
  • [GET] /api/users/logout
  • [GET] /api/users/getMe (user)
  • [GET] /api/users/validate - {jwt} (token, user)
  • [POST] /api/products/parser - {category, store} (oldProductsTotal, newProductsTotal, parsedTotal, productsTotal)
  • [GET] /api/products/getAllProducts (data)
  • [GET] /api/products/getProductById/:id (data)
  • [GET] /api/products/getProductByTitle/:title (data)

Screenshots:

image image image image image

Getting Started

Prerequisites

Installing

# Get the latest snapshot
git clone https://github.com/Bioneisme/onduken_hackathon.git
# Change directory
cd onduken_hackathon
# Init submodules
git submodule init
# Update submodules
git submodule update
# Install dependencies in server side
cd server && npm install
# Install dependencies in client side
cd client && npm install

In server create an .env file locally. You can duplicate .env.example and name the new copy .env. Adapt the variables to your needs.

# After setting up .env start app
npm run start # in all project sides (client/server)

Docker

Alternatively it is also possible to setup project through docker. To setup the container you have to checkout the repository and run the following commands:

! Don't forget to init and update git submodule !

docker-compose build
docker-compose up