# cuteuptime Cute uptime monitoring using your PDS to store events. Demo: [https://uptime.wisp.place](https://uptime.wisp.place) ![Screenshot](README.png) ## Project Structure - **`worker/`** - Background Bun worker that monitors services and publishes uptime checks - **`web/`** - Static web svelte dashboard that displays uptime statistics - **`lexicon/`** - AT Protocol lexicon definitions for the uptime check record type ## Quick Start ### 1. Configure the Worker ```bash cd worker cp config.example.json config.json ``` Edit `config.json`: ```json { "pds": "https://bsky.social", "identifier": "your.handle.bsky.social", "password": "your-app-password", "checkInterval": 300, "services": [ { "groupName": "Production", "name": "API Server", "url": "https://api.example.com/health", "method": "GET", "timeout": 10000, "expectedStatus": 200 } ] } ``` **Important:** Use an app password, not your main account password. Generate one at: https://bsky.app/settings/app-passwords ### 2. Run the Worker ```bash cd worker bun install bun run dev ``` The worker will: - Check each service at the configured interval - Publish results to your AT Protocol PDS - Continue running until you stop it ### 3. Configure the Web Dashboard ```bash cd web cp config.example.json config.json ``` Edit `config.json`: ```json { "pds": "https://bsky.social", "did": "did:plc:your-did-here" } ``` To find your DID, visit: https://bsky.app/profile/[your-handle] and look in the URL or use the AT Protocol explorer. ### 4. Build and Deploy the Web Dashboard ```bash cd web npm install npm run build ``` The built static site will be in `web/dist/`. Deploy it to any static hosting: - **Wisp Place**: Drag and drop the `dist` folder - **GitHub Pages**: Push to `gh-pages` branch - **Netlify**: Drag and drop the `dist` folder - **Vercel**: Connect your repo and set build directory to `web/dist` - **Cloudflare Pages**: Connect your repo ## Configuration ### Worker Configuration | Field | Description | |-------|-------------| | `pds` | Your PDS URL (usually `https://bsky.social`) | | `identifier` | Your AT Protocol handle | | `password` | Your app password | | `checkInterval` | Seconds between checks (e.g., 300 = 5 minutes) | | `services` | Array of services to monitor | ### Service Configuration | Field | Description | |-------|-------------| | `groupName` | Optional group name (e.g., "Production", "Staging") | | `name` | Service display name | | `url` | URL to check | | `method` | HTTP method (GET, POST, etc.) | | `timeout` | Request timeout in milliseconds | | `expectedStatus` | Expected HTTP status code (optional) | ### Web Configuration | Field | Description | |-------|-------------| | `pds` | PDS URL to fetch records from | | `did` | DID of the account publishing uptime checks | **Note:** The web config is injected at build time, so you need to rebuild after changing it. ## Features - ✅ Looks cute - ✅ No database required just use your pds - ✅ Service grouping support - ✅ Response time tracking - ✅ Auto-refresh every x configurable minutes ## Development ### Worker Development ```bash cd worker bun run dev ``` ### Web Development ```bash cd web npm run dev ``` Visit http://localhost:5173 to see the dashboard. MIT