Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

oppahansi/sdtbackend

Repository files navigation

SDT Backend

A Spring Boot backend service for the Since Days To mobile app that aggregates free photos from multiple providers (Unsplash, Pexels, and Pixabay) through a unified REST API.

Features

  • Image Aggregation: Fetches and combines search results from Unsplash, Pexels, and Pixabay
  • Curated Collections: Provides editor-picked photos from all three sources
  • Caching: Built-in Caffeine cache with 24-hour expiration to reduce API calls
  • Rate Limiting: Per-IP rate limiting (100 requests/60s) to prevent abuse
  • API Key Protection: Secure endpoints with API key authentication

REST Endpoints

  • GET /search?query={query}&page={page}&perSource={perSource}&api_key={key} - Search images across all providers
  • GET /curated?page={page}&api_key={key} - Get curated photos from all sources

Environment Variables

The following API keys must be set for the backend to function:

  • UNSPLASH_API_KEY - Your Unsplash API key
  • PEXELS_API_KEY - Your Pexels API key
  • PIXABAY_API_KEY - Your Pixabay API key
  • API_KEY - Custom API key for securing endpoints

Running

# Set environment variables
export UNSPLASH_API_KEY=your_key
export PEXELS_API_KEY=your_key
export PIXABAY_API_KEY=your_key
export API_KEY=your_custom_key

# Run with Gradle
./gradlew bootRun

# Or build and run with Docker
docker build -t sdtbackend .
docker run -p 8880:8880 \
  -e UNSPLASH_API_KEY=$UNSPLASH_API_KEY \
  -e PEXELS_API_KEY=$PEXELS_API_KEY \
  -e PIXABAY_API_KEY=$PIXABAY_API_KEY \
  -e API_KEY=$API_KEY \
  sdtbackend

The service runs on port 8880 by default.

Mobile App

https://github.com/oppahansi/sdt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors