v2.0.0 — Real-Time Web Framework

Build apps that
stay connected.

ProjectJS is a modular JavaScript framework for real-time web applications. State management, live networking, visitor tracking and reactive routing — all in one lightweight library.

See Live Visitors Explore API →
project.js — quickstart
// Reactive state
const state = ProjectJS.State.create({
  count: 0,
  users: []
})
 
// Subscribe to changes
state.subscribe(s => {
  render(s)
})
 
// Live visitor tracking
await ProjectJS.Visitor.init()
ProjectJS.Visitor.onUpdate(list => {
  setCount(list.length)
})

Live on this page

Real-time visitor detection powered by ProjectJS.Visitor — tracking active sessions across tabs with geolocation.

0
active
visitors
Initializing visitor service...
Detecting active sessions
Open this page in multiple tabs to see real-time cross-tab tracking in action. For cross-device tracking, connect ProjectJS.Visitor to a WebSocket server.

Everything you need,
nothing you don't.

Eight focused modules, zero dependencies. Drop in what you need.

Reactive State
Lightweight state management with subscriptions, patch updates and full reset. Powered by structuredClone for immutability.
ProjectJS.State
👁
Visitor Tracking
Detect active visitors in real time using BroadcastChannel, localStorage heartbeats and IP geolocation — no backend required.
ProjectJS.Visitor
🔌
Network Layer
Fetch wrapper with timeout, auto-retry, and a WebSocket manager with exponential backoff reconnection and message queuing.
ProjectJS.Net
📡
Event Bus
Type-safe cross-module event system. Emit events from anywhere, subscribe and unsubscribe with auto-cleanup functions.
ProjectJS.Events
🗺
Client Router
Hash-based SPA router with lazy route registration, navigation history, and integration with the event system.
ProjectJS.Router
🎬
DOM Utilities
Create, query, animate and observe DOM elements with a lean API. Includes IntersectionObserver for scroll-triggered effects.
ProjectJS.Dom

Clean, minimal API.

01
Reactive State
Create stores, patch values and subscribe to changes in real time.
02
Visitor Service
Initialize, track, and react to live visitor presence changes.
03
Net & WebSocket
HTTP requests and persistent socket connections with auto-reconnect.
04
Router
Register hash routes and react to navigation events.
state.js
0
dependencies
0
core modules
0kb
bundle size
0%
vanilla JS