Skip to content
 
 

Repository files navigation

hypothesis.sh

hypothesis.sh

Tests

A collection of developer tools, experiments, and searchable references at hypothesis.sh. Most tools run in the browser and support shareable permalinks. Server-backed features include image processing, placeholder photos, webhooks, and HTTP request testing.

Development

Use Node.js 24 and pnpm 10.33.0 (the exact version is pinned in package.json).

corepack enable
pnpm install --frozen-lockfile
pnpm dev

Open localhost:3000. Browser-only tools work without service credentials; server-backed integrations may require their own environment variables in .env.local. Never commit that file.

Command Purpose
pnpm dev Start the development server
pnpm build Build for production and check TypeScript
pnpm start Serve the production build
pnpm test Run the Vitest suite once
pnpm test:watch Rerun tests while developing
pnpm lint Run ESLint
pnpm format:check Check formatting with Prettier
pnpm format Format the project

Tests and CI

Tests live in src/__tests__ and run in Vitest's Node environment. Run the full suite with pnpm test, or a single file with pnpm test src/__tests__/lib/regex.test.ts.

The Tests workflow runs on pushes, pull requests, and manual dispatch. It installs the pinned pnpm version, uses Node.js 24, caches the pnpm store, installs from the frozen lockfile, and runs pnpm test. The test job needs no service credentials. Older runs for the same ref are cancelled when new commits arrive.

CI currently gates tests only. Build, lint, and formatting checks are available locally; ESLint has existing violations that need cleanup before it becomes a required CI check.

Project structure and design

  • src/pages: Next.js Pages Router screens and API routes.
  • src/lib: tool logic, shared hooks, branding, and the tool catalog.
  • src/components/ui: shared buttons, panels, page headers, search, and permalink controls.
  • src/styles: global tokens, shared CSS Module primitives, and page styles.
  • src/content/docs: tool documentation served at /docs/[slug].
  • src/data: reference datasets.
  • migrations: database migrations for server-backed features.

See DESIGN_SYSTEM.md for component and token conventions, responsive behavior, and the CSS composition constraint. Preserve the mobile 16px !important input rule that prevents focus zoom. Shared UI uses the active domain's accent colors through src/lib/branding.ts.

When adding a tool, add its page, documentation, and catalog entry in src/lib/tools.ts, reuse shared UI where it fits, and update the listings below.

Tools

Tool Description Docs
app store screenshot Compose device screenshots at exact Apple App Store dimensions (1242×2688, 1284×2778, and landscape variants) and download ready-to-submit PNGs docs
ascii art Convert images to ASCII art in your browser - upload a file or paste a URL, with configurable width and character density docs
base64 Encode and decode base64 strings with live sync and shareable permalinks docs
basic auth Generate HTTP Basic Authentication headers from a username and password - encoded in your browser docs
bitwise Visualize AND, OR, XOR, NAND, NOR, and shift operations with binary and decimal output side by side docs
byte size Convert between byte units - B, KB, KiB, MB, MiB, GB, GiB, TB, TiB - with binary (1024) and decimal (1000) modes docs
chmod Convert between numeric and symbolic Unix file permission modes with a visual breakdown table docs
cidr Calculate subnet details from CIDR notation: network address, broadcast, mask, host range, and more docs
color Convert color values between HEX, RGB, RGBA, HSL, and OKLCH with live preview docs
color shades Generate a perceptually uniform 11-step color scale in OKLCH - ready for Tailwind CSS or any design system docs
compress Compress PNG, JPEG, and WebP images server-side; convert to WebP or AVIF for maximum file size reduction docs
cron Parse cron expressions into plain English and preview the next 10 scheduled run times docs
css unit Convert between CSS units: px, rem, em, %, vh, vw, pt, cm, mm, in with adjustable context docs
csp analyzer Inspect Content-Security-Policy directives, warnings, and missing protections docs
datetime Convert timestamps and dates between many formats at once with live sync and shareable permalinks docs
hash Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes from any text input docs
html entity Encode and decode HTML entities for safe display in web pages with multiple encoding modes docs
json diff Compare two JSON structures and highlight added, removed, and changed keys recursively docs
json ↔ yaml Convert between JSON and YAML formats with live bidirectional sync and shareable permalinks docs
json → typescript Convert a JSON sample into TypeScript interface definitions instantly docs
jwt Decode JWT tokens and inspect header, payload claims, and expiry status docs
keycode Press any key to inspect its JavaScript event properties: key, code, keyCode, location, and modifier state docs
lorem ipsum Generate lorem ipsum placeholder text by words, sentences, or paragraphs with one click docs
markdown Convert Markdown to HTML with a live preview; toggle between rendered output and raw HTML source docs
my ip Look up your current public IP address with geolocation, ASN, and network details docs
number base Convert integers between binary, octal, decimal, and hex with live sync and shareable permalinks docs
og tags Generate Open Graph and Twitter Card meta tags with a live social preview docs
password Generate cryptographically secure passwords with configurable length, character sets, and count docs
placeholder photos Create hotlinkable placeholder photos and seeded SVG patterns at custom sizes docs
pretty print Format and validate JSON with live pretty-printing and shareable permalinks docs
qr code Generate QR codes from any text or URL and download as SVG or PNG docs
qr decoder Decode QR codes using your device camera (mobile only) docs
regex Test regular expressions against strings with live match results and shareable permalinks docs
scratch A scratchpad - type anything and bookmark it as a shareable permalink docs
sql Format and prettify SQL queries with uppercase keywords and proper indentation; supports PostgreSQL, MySQL, SQLite, and BigQuery docs
string case Convert text between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE, Title Case, and more docs
svg → jsx Convert SVG markup to React JSX - removes xmlns, converts hyphenated attributes to camelCase, and wraps inline styles as objects docs
text diff Compare two blocks of text and highlight additions and deletions line by line docs
text stats Analyze text statistics: character count, word count, reading time, and word frequency analysis docs
unicode Inspect each character's code point, UTF-8/UTF-16 encoding, category, script, and HTML entity docs
url encode Encode and decode URL strings with live sync and shareable permalinks docs
uuid Generate UUIDs of any version with one click and shareable permalinks docs

Experiments

ID Experiment Description Docs
EXP-001 iframe proxy Proxy iframes securely with full event handling and introspection for debugging docs
EXP-002 message stream Capture and inspect frame messages in real time docs
EXP-003 message factory Design and trigger postMessage actions with an interactive viewer and designer docs
EXP-004 webhook Capture and inspect incoming HTTP webhook requests in real time docs
EXP-005 rsa encryption Generate RSA-OAEP key pairs, encrypt messages, and decrypt them in-browser using the Web Crypto API docs
EXP-006 gist Serve a public GitHub Gist's raw content via a proxy URL, with live iframe preview docs
EXP-007 screen capture Capture the current browser tab as a PNG and open it in a new tab docs
EXP-008 video streaming Test and inspect HTML video element behavior - buffering, events, and playback state - with full telemetry docs
EXP-009 push test Send a test push notification to a registered mobile device docs
EXP-010 audio streaming Test and inspect HTML audio element behavior - buffering, events, and playback state - with full telemetry docs
EXP-011 delay loading Defer the page load event to test iframe load handling docs
EXP-012 httptest Inspect requests and test status codes, authentication, redirects, cookies, and delays docs

References

Reference Description
ASCII table All 128 ASCII characters with decimal, hexadecimal, octal, and named descriptions
CSS selectors All CSS selector types with descriptions, examples, and specificity values: basic, attribute, pseudo-class, pseudo-element, and combinators
DNS record types A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, CAA, and DNSSEC records - what each does, when to use it, and example syntax
Exit codes Standard Unix/Linux process exit codes: 0 success, 1 general error, 126/127 shell errors, and 128+N signal offsets
HTTP headers Request and response header fields: caching, authentication, CORS, security, content negotiation, and more
HTTP status codes Complete reference for HTTP response status codes: 1xx through 5xx, with descriptions, use cases, and caching behavior
Ionicons All icons available via @expo/vector-icons Ionicons - 422 base icons each with filled, outline, and sharp variants, plus 94 logo icons
iOS permissions Info.plist usage description keys for location, camera, microphone, contacts, health, Bluetooth, identity, and more
iOS URL schemes System URL schemes for Phone, FaceTime, Messages, Mail, Maps, App Store, and Settings - with examples and notes
macOS shortcuts Lesser-known and essential macOS keyboard shortcuts - Finder, screenshots, Spotlight, windows, text editing, accessibility, and startup keys
Media files Example MP4 video files for testing HTML video behavior: a standard file and a fast-start variant with the moov atom at the front
MIME types Content-Type values for text, application, image, audio, video, font, and multipart formats with file extensions
Port numbers Well-known TCP and UDP port numbers grouped by category: web, remote access, database, mail, file transfer, network, and more
Postgres JSONB & array operators Postgres operators for JSONB and array values: access, containment, existence, modification, and path queries
psql meta-commands Complete reference for psql backslash commands - informational \d* listings, formatting, I/O, conditionals, connection, and more
Regex syntax Regular expression quick reference: anchors, character classes, quantifiers, groups, lookaheads, flags, and escape sequences
Timezones IANA timezone names with live current time, UTC offsets, abbreviations, and major cities
tmux Default tmux prefix key bindings (C-b) for sessions, windows, panes, layouts, and copy mode, plus CLI subcommands with full syntax
Unicode blocks Named code point ranges from Basic Latin to Supplementary planes, with assigned character counts and sample glyphs
Unix signals Signal numbers, names, and default actions for POSIX signals - from SIGTERM and SIGKILL to SIGWINCH and SIGCHLD

Stack

Next.js · TypeScript · React · CSS Modules · Vitest · pnpm · Postgres · Vercel

About

Tools made for web developers to aid in testing and experimentation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages