Skip to content

A stock image API which scrapes various stock image websites and returns a valid image URL.

License

Notifications You must be signed in to change notification settings

HarjjotSinghh/fetchpix

Repository files navigation

<<<<<<< HEAD Header Image

twitter header

1eb2e7f (add: unit, integration and e2e tests)

CC BY-NC 4.0

Open Source? Yes! GitHub stars Maintainer GitHub branches GitHub commits GitHub last commit GitHub issues GitHub pull requests GitHub watchers

Fetchpix

Introduction

Fetchpix is a simple and lightweight API to fetch random image URLs based on search queries. It leverages modern web technologies and microservices architecture to provide a scalable and efficient solution for image retrieval.

Table of Contents

Installation

Local Setup

  1. Clone the repository:

    git clone https://github.com/HarjjotSinghh/Fetchpix.git
    cd Fetchpix
  2. Install dependencies:

    bun install
  3. Start the development server:

    bun run index.ts --watch --hot | pino-pretty

VPS Setup via Docker Compose

  1. Clone the repository:

    git clone https://github.com/HarjjotSinghh/Fetchpix.git
    cd Fetchpix
  2. Ensure Docker and Docker Compose are installed on your VPS.

  3. Start the services:

    docker-compose up --build

Tech Stack

  • Bun: A fast JavaScript runtime.
  • Hono: A small, simple, and fast web framework for the edge.
  • Axios: Promise-based HTTP client for the browser and Node.js.
  • Cheerio: Fast, flexible, and lean implementation of core jQuery designed specifically for the server.
  • Prometheus: An open-source monitoring system with a time series database.
  • Swagger: Simplifies API development by providing tools for API documentation.
  • Elasticsearch: A distributed, RESTful search and analytics engine.
  • Kibana: Visualization tool for Elasticsearch.
  • Filebeat: Lightweight shipper for forwarding and centralizing log data.
  • Node-Cache: Simple and fast Node.js internal caching.
  • Winston: A logger for just about everything.

Use Case

Here is the use case for the Fetchpix API:

Web Design / Prototyping

  • Fetch images for use in web design mockups or prototypes.
  • Use random stock images as placeholders in web design mockups.

Contribute

We welcome contributions! Please see our CONTRIBUTING.md for more details on how to contribute to this project.