express5-api-patterns

Community

Build robust Express 5 APIs faster

Authorcarrotwaxr
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill captures production-proven Express 5 patterns from the peek-stash-browser backend so developers can implement robust TypeScript route handlers, streaming proxies, authentication middleware, and database access without reimplementing core behavior or introducing subtle bugs.

Core Features & Use Cases

  • Async-safe handlers & error middleware: Uses Express 5's automatic promise rejection handling and provides AppError/NotFoundError shapes for consistent JSON error responses.
  • HLS proxying & playlist rewriting: Patterns for fetching HLS playlists, stripping apikeys, rewriting segment URLs to route through Peek, and streaming with AbortController and backpressure-aware pipelines.
  • Concurrency-limited HTTP proxy & connection pooling: Demonstrates keep-alive agents, queue-based concurrency slots, client-disconnect cleanup, and upstream timeout handling to protect Stash instances.
  • Multi-instance routing & Prisma integration: Shows resolving stashInstanceId per entity, safely retrieving instance credentials, and performing Prisma/SQLite queries for entity lookup.
  • JWT cookie auth & refresh semantics: Covers HTTP-only token cookies, silent refresh policy, dual cookie/Bearer token support, reverse-proxy header auth, and role-based middleware.
  • Use Case: Implement a scene streaming endpoint that proxies Stash HLS, rewrites playlists to remove API keys, enforces authentication and rate/connection limits, and forwards appropriate cache headers.

Quick Start

Generate Express 5 TypeScript route and middleware code to proxy HLS streams with JWT cookie authentication and Prisma-backed multi-instance routing for the peek-stash-browser backend.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: express5-api-patterns
Download link: https://github.com/carrotwaxr/peek-stash-browser/archive/main.zip#express5-api-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.