# Documentation

Vask is a drop-in replacement for Pusher. Get started in minutes with your existing Pusher setup or explore our integration guides.

## Quick Start

1. **Create an account** - Sign up and create your first application to get your connection credentials.
2. **Configure your application** - Use your Vask credentials with any Pusher SDK.
3. **Send messages** - Start broadcasting real-time events to your users.

## Integration Guides

- [Setup with agent](/docs/agent) - One copy-paste prompt for any AI agent to wire Vask into a Pusher-compatible stack.
- [Laravel](/docs/laravel) - Complete guide for Laravel Broadcasting with queues, channels, and events.
- **JavaScript** - Pure JavaScript integration without frameworks. _Coming soon._
- **PHP** - Server-side PHP integration guide. _Coming soon._

## Channels

Channels are the fundamental way to organize and filter data streams. Vask supports three types of channels:

- **Public channels** - Can be subscribed to by anyone who knows the channel name.
- **Private channels** - Require authentication and are prefixed with `private-`.
- **Presence channels** - Like private channels but also track who's online, prefixed with `presence-`.

## Events

Events are messages sent through channels to connected clients. Each event has:

- A **name** that identifies the type of message.
- Optional **data** payload (JSON).
- Automatic **metadata** like timestamps and socket IDs.

Events can be triggered from your server or directly from authenticated clients (client events).

## Authentication

Private and presence channels require authentication to ensure only authorized users can access sensitive data:

1. Client requests to subscribe to a private/presence channel.
2. Your server receives an authentication request at your configured endpoint.
3. You verify the user's permissions and return a signed token.
4. Client uses the token to complete the subscription.

Vask uses the same authentication mechanism as Pusher, making it fully compatible with existing auth endpoints.
