Skip to content

nilesim/LinkTransformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

Linker

A Web Service application to convert URLs to deeplinks and deeplinks to URLs.

Application is dockerized and a spring boot - maven - postgres - actuator application.

To run:

    docker-compose up --build

To shutdown and cleanup:

    docker-compose down

There are two endpoints for this transition.

  1. web2deep
  2. deep2web
  • httpTrace endpoint is enabled in our application:

      management.endpoints.web.exposure.include=httptrace
    

    Could be modified in our application.properties file to disable if necessary.

    Request and response traces could be monitored via:

      http://localhost:8080/actuator/httptrace/
    

For project setup, postgresql initilize script is provided. docker-compose already initilize it. In case there is an error, db can be initilized as following:

  • cd \LinkTransformer\docker-entrypoint-initdb.d\
  • docker network create selin
  • docker network ls
  • docker run --name selin-db --network selin -p 5432:5432 -e POSTGRES_PASSWORD=Passw0rd -d postgres

done creating the db, next steps are not needed but incase if you want to check anything, you can use postbird or jump into db console by:

  • docker exec -it selin-db bash

psql -U postgres -W

... insert password (Passw0rd)

to clean the docker parts after all is well(to shut down database and clean what is left):

  • docker rm -f selin-db
  • docker network rm selin

(for more info you can check: https://medium.com/@selinkaya.ce/docker-cheatsheet-c3cc7cf83a5c )

Endpoints

Endpoint cases provided below are tested via junit and postman

web2deep

request

response

https://www.selin.com/casio/saat-p-1925865?boutiqueId=439892&merchantId=105064

ty://?Page=Product&ContentId=1925865&CampaignId=439892&MerchantId=105064

https://www.selin.com/casio/erkek-kol-saati-p-1925865

ty://?Page=Product&ContentId=1925865

https://www.selin.com/casio/erkek-kol-saati-p-1925865?boutiqueId=439892

ty://?Page=Product&ContentId=1925865&CampaignId=439892

https://www.selin.com/casio/erkek-kol-saati-p-1925865?merchantId=105064

ty://?Page=Product&ContentId=1925865&MerchantId=105064

https://www.selin.com/tum--urunler?q=elbise

ty://?Page=Search&Query=elbise

https://www.selin.com/tum--urunler?q=%C3%BCt%C3%BC

ty://?Page=Search&Query=%C3%BCt%C3%BC

https://www.selin.com/Hesabim/Favoriler

ty://?Page=Home

https://www.selin.com/Hesabim/#/Siparislerim

ty://?Page=Home

Deep2web

request

response

ty://?Page=Product&ContentId=1925865&CampaignId=439892&MerchantId=105064

https://www.selin.com/brand/name-p-1925865?boutiqueId=439892&merchantId=105064

ty://?Page=Product&ContentId=1925865

https://www.selin.com/brand/name-p-1925865

ty://?Page=Product&ContentId=1925865&CampaignId=439892

https://www.selin.com/brand/name-p-1925865?boutiqueId=439892

ty://?Page=Product&ContentId=1925865&MerchantId=105064

https://www.selin.com/brand/namei-p-1925865?merchantId=105064

ty://?Page=Search&Query=elbise

https://www.selin.com/tum--urunler?q=elbise

ty://?Page=Search&Query=%C3%BCt%C3%BC

https://www.selin.com/tum--urunler?q=%C3%BCt%C3%BC

ty://?Page=Favorites

https://www.selin.com

ty://?Page=Orders

https://www.selin.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published