Welcome to Startup API

Overview

This application uses Cloudflare Developer Platform, including Workers and DurableObjects to implement functionality that every web application needs on day zero.

The worker acts as a transparent proxy for your application. When configured, it fetches content from your site, injects a <power-strip>, and serves it to the user.

Required Configuration

These variables must be set in your wrangler.jsonc or Cloudflare Dashboard for the worker to function. Until these are configured, the worker serves this documentation page.

ORIGIN_URL

The base URL of the application you want to proxy, e.g. your app URL.

ORIGIN_URL = "https://your-app-origin.com"
SESSION_SECRET

A long, random string used to encrypt session cookies. Keep this secret!

SESSION_SECRET = "your-long-random-secret-string"
Optional Configuration
USERS_PATH

The URL path where the worker intercepts requests to serve Startup API UI (like power-strip.js).

Default: /users/

USERS_PATH = "/people/"
How Injection Works
  1. Worker receives a request.
  2. If the path starts with USERS_PATH, it serves files from the public/users/ directory.
  3. Otherwise, it proxies the request to ORIGIN_URL.
  4. If the response is text/html, it injects:
    • A <script> tag loading power-strip.js.
    • A <power-strip> element styled to appear in the top-right corner.