Project

httpstate

0.0
The project is in a healthy, maintained state
HTTP State, httpstate.com
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme
httpstate mascot

httpstate

httpstate is the missing reactive layer for all your applications.

Store and retrieve state by binding it to any UUID.

Create interactive experiences with a couple lines of code.

More at httpstate.com.

Quick Start (browser, node.js)

Install from CDN (Script Tag)

<script src="https://cdn.jsdelivr.net/npm/@httpstate/typescript/dist/index.global.js" type="text/javascript"></script>

or import from CDN (ES Module)

import httpstate from 'https://cdn.jsdelivr.net/npm/@httpstate/typescript@0.0.42/dist/index.esm.js';

or install from npm

npm install @httpstate/typescript

and then import

import * as httpstate from '@httpstate/typescript';

Pick any valid UUID v4. You can generate one here.

We'll use 45fb3654-0e92-44da-aa21-ca409c6bdab3 or 45fb36540e9244daaa21ca409c6bdab3 (works without dashes).

Store some data with

httpstate.set('45fb36540e9244daaa21ca409c6bdab3', 'Hi! 👋🏻');

and retrieve it with

const data = await httpstate.get('45fb36540e9244daaa21ca409c6bdab3');

That's it! 🐙

Realtime Updates

All client libraries support realtime updates via WebSocket. Create a reactive instance bound to a UUID and subscribe to change events:

const hs = httpstate('45fb36540e9244daaa21ca409c6bdab3');

hs.on('change', data => console.log(data));

Any client that calls set() on the same UUID will trigger a change event across all connected instances — across devices, languages, and platforms. The TypeScript client uses a shared WebSocket connection with automatic reconnection and exponential backoff.

httpstate in your favorite language

JS Javascript / Typescript (typescript)

Browser and server (node.js, deno, bun) compatible clients.

npm install @httpstate/typescript

API and Docs

React React (react)

npm install @httpstate/react

Use it like useState():

const [state, setState] = useHttpState('45fb36540e9244daaa21ca409c6bdab3');

// state — reactive value, auto-updates on change
// setState(data) — writes data via httpstate.set()

API and Docs

Go Go (go)

go get github.com/httpstate/httpstate/go

API and Docs

Java Java (java)

https://github.com/httpstate/httpstate/blob/master/java/src/com/httpstate/HttpState.java

API and Docs

Python Python (python)

pip install httpstate

API and Docs

Ruby Ruby (ruby)

gem install httpstate

API and Docs

Rust Rust (rust)

cargo add httpstate

API and Docs

iOS (iOS)

Native SwiftUI app. Display your state live with Home Screen and Lock Screen widgets, pick from 10 background colors to your liking. To use, open this project on Xcode and compile.

    

macOS (macOS)

Native SwiftUI app. Display your state live with customizable widgets, pick from 10 background colors to your liking. Two different modes, small and medium sized to cover all your state view needs. To use, open this project on Xcode and compile.


Learn

Community: [...]

Cookbook: [...]


About

Alex Morales, moralestapia.com

Copyright © Alex Morales, 2026

Contact

Comments, feature requests, etc. are welcome at i n b o x @ httpstate.com.

License

Unless otherwise stated in particular files or directories, this software is free software.

You can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

See LICENSE for more information.