Skip to content

BlossomTheme/BlossomTheme-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒธ BlossomTheme API

A lightweight Go-based API powered by the Gin Gonic framework. This service acts as a high-performance bridge between the BlossomTheme data stored on GitHub and the frontend gallery.

๐Ÿš€ How it Works

  1. Data Source: The "Source of Truth" is the themes.json file hosted on GitHub.
  2. Memory Cache: On startup (and via manual refresh), the API fetches the latest JSON from GitHub and stores it in RAM for near-instant response times.
  3. Automatic Sync: A GitHub Action "pokes" the API whenever the theme list is updated, ensuring the cache is always fresh without needing a server restart.

๐Ÿ›  Endpoints

Public Endpoints

These are open to the public and used by the frontend website to display themes. No authentication is required for these routes.

Method Endpoint Description
GET /api/v1/themes Returns the full list of all available themes.
GET /api/v1/themes/:software Returns details for a specific software (e.g., /themes/obsidian).

Admin Endpoints

These routes are used for data management and cache synchronization.

Important

Access Restricted: API keys for admin endpoints are only issued to official maintainers of the BlossomTheme organization.

Method Endpoint Description
POST /api/v1/admin/refresh Forces the API to re-download themes.json from GitHub.
POST /api/v1/admin/themes Temporarily adds a new theme to the local memory/disk.
PATCH /api/v1/admin/themes/:software Updates specific fields of an existing theme.

๐Ÿ’ป Tech Stack

  • Language: Go (Golang)
  • Framework: Gin Gonic
  • Hosting: Alwaysdata

About

API to manage projects at BlossomTheme.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages