Coming Soon

Type-safe real-time
for modern applications

sock8 provides end-to-end type-safe WebSockets with real-time presence, history, and authentication. Build collaborative experiences without the complexity.

 

Type Safety

Define once, type-safe everywhere

Build real-time features without the headaches of WebSockets. Our SDK provides end-to-end type safety from schema definition to client interactions.

  • TypeScript catches errors at compile time, not runtime
  • Full IDE autocompletion with parameter validation
  • Presence & history built-in with the same type safety
schema.ts
export const channels = sock8.channels({
  'chat.{roomId}.messages': sock8.channels.rich({
    schema: z.object({
      message: z.string(),
      sender: z.string(),
      timestamp: z.number(),
    }),
    capabilities: {
      history: true,
      presence: z.object({
        typing: z.boolean(),
        online: z.boolean(),
      }),
    },
  }),
});

TypeScript catches errors at compile time

// TypeScript catches errors
channels.chat.messages.for({ wrongParam: '123' })
// Error: Property 'wrongParam' does not exist.
// Expected property 'roomId' of type string.

channels.chat.messages.for({ roomId: '123' })
// ✓ Type check passed

Powerful features, exceptional developer experience

Everything you need to build modern real-time applications with type safety at the core.

Channel Pattern
chat.{roomId}.messages
Parameter Values
"lobby"
"team-1"
"team-2"
Generated Channel Instances
chat.lobby.messages
Isolated
chat.team-1.messages
Isolated
chat.team-2.messages
Isolated
Dynamic Channels

Parameterized channels

Create dynamic, scoped channels with path parameters. Perfect for multi-tenant apps and user-specific streams.

  • Isolate data streams by user, room, or organization
  • Dynamic channel creation without configuration
  • Type safety ensures correct parameter usage
Presence

Real-time user presence

Track who's online, typing status, cursor positions, and more with just a few lines of code. Create truly collaborative experiences.

  • Real-time user presence with online status
  • Typing indicators and cursor tracking
  • Custom presence data for your application needs
Document.tsx
AT
2 editing
Taylor
function Document() {
  const { self, others, update } = usePresence(channel);

  useEffect(() => {
    // Update presence when cursor moves
    window.addEventListener('mousemove', (e) => {
      update({ cursor: { x: e.clientX, y: e.clientY } });
    });
  }, []);
}
Taylor is editing this document
Message HistoryPersisted automatically
A
Alex
Has anyone tested the API?
10:42 AM
T
Taylor
Yes, it's working well!
10:45 AM
R
Robin
Just joined and can see all previous messages!
Just now
New users automatically receive recent message history
Message History

Built-in message history

Access recent messages on channel join with our built-in history capability. No need to implement separate storage or manage message caching.

  • Recent messages loaded automatically
  • New users see context when they join
  • Configurable retention per channel
// Access message history with a single hook
const { history } = useHistory(channel);
// Messages available immediately on join
Authentication

Secure authentication

Integrate with your existing auth system. Grant access to specific channels based on user identity and permissions with fine-grained control.

  • Works with any authentication provider
  • Fine-grained channel access control
  • Per-user or per-organization permissions
Your Auth System
Auth.js, Clerk, Better-Auth, etc.
Provider
sock8 Authorization
Channel access control
Gateway
src/app/api/channels/[...all]/route.ts
1 authorize: (conn) => {
2 conn.identifyAs(user.id);
3 conn.grant(channels.for({
4 userId: user.id
5 }));
6 }
User Channel
Granted
Admin Channel
Denied

Global Edge Network

Fast & Reliable
Created by potrace 1.7, written by Peter Selinger 2001-2005
Global Scale
10 → 10M+ connections
Response Time
<100ms latency
Cloudflare Edge + Durable Objects
No infrastructure changes needed
Performance

Built for global scale

Powered by Cloudflare Workers with Durable Objects and WebSocket Hibernation for incredible performance at any scale, anywhere in the world.

  • Global edge network with low latency
  • Automatically scales from 10 to millions of users
  • WebSocket Hibernation for efficient resource usage

Ready to redefine real-time?

Join the waitlist for early access and be the first to build with sock8.

Early Access Benefits

  • Early access to the sock8 platform
  • Generous free tier for development
  • Priority support during onboarding
  • Influence the product roadmap
  • Exclusive Discord community access
  • Early access to educational resources
  • Flex on your friends with real-time everything