Universal Theme Service API

A plug-and-play theme plug-in that allows any web application to dynamically change UI themes using a hosted API and a lightweight JS widget.


๐Ÿ”น What This API Do?


๐Ÿ”น How To Integrate Into Your Web App

Step 1 โ€“ Add the Theme Widget Script

In your base.html or any html page that you'd want, Add this script before closing </body>:
<script src="https://anuragktech.me/themes-widget/themes-widget.js"></script>
Thatโ€™s it! The theme switcher will automatically appear.

Step 2 โ€“ (Optional) Configure Widget Position

If you want to change the widget position: ADD below snippet before the widget JS. you may configure it as you wish.
<script>
window.UTS_CONFIG = {
    bottom: "30px",
    left: "25px"
};
</script>

<script src="https://anuragktech.me/themes-widget/themes-widget.js"></script>
Available positioning options:

๐Ÿ”น Available Themes

Currently supported themes: More themes will be added over time.

๐Ÿ”น API Endpoint

Base URL

https://z1s4ahgav3.execute-api.us-east-1.amazonaws.com/prod/themes/{theme_name}

Example Request

GET /themes/lava

Example Response

{
  "background": "#ff4b2b",
  "text": "#ffffff",
  "card": "#ff9068"
}

๐Ÿ”น How It Works (Architecture)

1. User clicks theme button
2. Widget calls Theme API
3. API returns color configuration
4. Widget dynamically updates CSS variables
5. Web app instantly changes theme

๐Ÿ”น What Developers Need To Ensure

To allow full theme control:

๐Ÿ”น Deployment Stack


Contact

For integration help or any issues, contact the developer Anurag Khanapurkar. khanapurkaranurag@gmail.com, x24214787@student.ncirl.ie,