Skip to content

atuncer/TrendyolRandomItem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trendyol Random Item

Trendyol Rastgele

A webapp that finds random items from Trendyol.

Check the website

📒 Index

🔰 About

A Node.js project that built with Express js. The Express js server has RESTful APIs that returns a random item according to the selected category e.g. Women Category. Frontend is built with Vue.js.

⚡ How it Works

Python web scraper scrapes all the existing sub-categories and their corresponding API urls. Express js server selects a random sub-category for the selected category, calls the public API of Trendyol, and returns a random item.

🔦 Usage

🔌 Installation

$ npm install

📦 Commands

  • To start the project.
$ npm run devStart

and open http://127.0.0.1:3000 on your browser.

  • To run the scraper and scrape the latest categories from Trendyol.
$ python(3) scraper.py 

🔧 Development

📓 Pre-Requisites

  • Node.js
  • Python 3

🔩 Development Environment

Clone, install, and run.

🚀 Deployment

I am hosting the website on Heroku. I preferred DigitalOcean before because they offer free $100 credit for students. However my free trial has ended so I deployed it to Heroku.

This project does not require CI/CD or any complicated deployment strategies. I push to the repo from my development environment and deply it manually on Heroku's website.

Cron job used to run the scraper daily on the DigitalOcean server, So the REST API can cover 100% of the items even if a new category is created. However I cannot run it on Heroku.

🔥 Contribution

Your contributions are always welcome and appreciated. Following are the things you can do to contribute to this project.

  1. Report a bug
    If you think you have encountered a bug, and I should know about it, feel free to report it here and I will take care of it.

  2. Request a feature
    You can also request for a feature here, and if it is viable, it will be picked for development.

  3. Create a pull request
    It can't get better then this, your pull request will be appreciated. You can get started by picking up any open issues from here and make a pull request.

If you are new to open-source, make sure to check read more about it here and learn more about creating a pull request here.