AxonStream Core
ONE PACKAGE FOR EVERYTHING - Revolutionary real-time platform in a single package

π Revolutionary Simplicity
One command, one package, infinite possibilities.
npm install @axonstream/core
Thatβs it! One command installs everything you need for modern real-time applications:
- β
Core SDK - Complete real-time SDK with WebSocket connections
- β
React Hooks - React hooks for real-time state management
- β
Vue Composables - Vue 3 composables for reactive data
- β
Angular Services - Angular services with RxJS integration
- β
UI Components - Pre-built components for real-time features
- β
CDN & Embed - No-build integration for any website
π Why AxonStream Core?
Revolutionary Approach
- One Package: Everything in a single, comprehensive package
- Zero Configuration: Works out of the box with sensible defaults
- Framework Agnostic: React, Vue, Angular, or vanilla JavaScript
- Enterprise Ready: Multi-tenant, RBAC, audit logging, monitoring
Professional Features
- Real-time Messaging: WebSocket-based event streaming
- Multi-tenancy: Organization isolation and data security
- Authentication: JWT-based auth with RS256
- Monitoring: Health checks, metrics, and performance analytics
- Audit Logging: Comprehensive activity tracking for compliance
π¦ Installation
# Install the complete package
npm install @axonstream/core
# Or with yarn
yarn add @axonstream/core
# Or with pnpm
pnpm add @axonstream/core
π Quick Start
React Integration
import { useAxonpuls } from '@axonstream/core/react';
function ChatApp() {
const axon = useAxonpuls({
org: 'your-org',
token: 'your-jwt-token'
});
return <div>Real-time chat ready!</div>;
}
Vue Integration
<script setup>
import { useAxonpuls } from '@axonstream/core/vue';
const axon = useAxonpuls({
org: 'your-org',
token: 'your-jwt-token'
});
</script>
Angular Integration
import { AxonStreamService } from '@axonstream/core/angular';
@Injectable()
export class ChatService {
constructor(private axon: AxonStreamService) {
this.axon.connect({
org: 'your-org',
token: 'your-jwt-token'
});
}
}
CDN Integration (No Build Required)
<script src="https://cdn.axonstream.ai/axonui.min.js"></script>
<script>
const axon = new window.AxonSDK({
url: 'wss://your-org.axonstream.ai',
token: 'your-jwt-token'
});
await axon.connect();
</script>
π Documentation
ποΈ Architecture
Core Components
- AxonPuls Gateway: High-performance WebSocket gateway
- Event Router: Central real-time event bus
- Subscription Manager: Channel-based subscriptions
- Message Queue: Redis-backed message queuing
- Connection Manager: Connection state tracking
- Retry Manager: Exponential backoff strategy
- Latency Tracker: Performance monitoring
- Audit Logger: Comprehensive activity logging
Technology Stack
- Framework: NestJS with Fastify adapter
- WebSocket: uWebSockets.js for high-performance connections
- Database: PostgreSQL with Prisma ORM
- Cache/Streams: Redis with Consumer Groups
- Validation: Zod for runtime type safety
- Authentication: JWT with Passport.js
- Testing: Jest with comprehensive test coverage
π§ Development
Prerequisites
- Node.js 20+
- PostgreSQL
- Redis
Setup
# Clone the repository
git clone https://github.com/AxonStream/core.git
cd core
# Install dependencies
npm install
# Setup environment
cp .env.example .env
# Edit .env with your configuration
# Setup database
npm run db:migrate
npm run db:generate
# Start development servers
npm run dev
Available Scripts
# Development
npm run dev # Start all services in development
npm run dev:api # Start API server only
npm run dev:docs # Start documentation server
# Building
npm run build # Build all packages
npm run build:sdk # Build SDK package
npm run build:docs # Build documentation
# Testing
npm run test # Run all tests
npm run test:api # Run API tests
npm run test:e2e # Run end-to-end tests
# Publishing
npm run publish:all # Publish all packages
npm run pack:all # Pack all packages locally
π API Endpoints
Base URLs
- API:
http://localhost:3001/api/v1
- WebSocket:
ws://localhost:3001
- Documentation:
http://localhost:3001/api/docs
Key Endpoints
POST /auth/login - User authentication
POST /events/publish - Publish events
GET /events/history - Retrieve event history
POST /subscriptions/create - Create subscriptions
GET /health - Health check
GET /metrics - Performance metrics
π Security
Authentication & Authorization
- JWT RS256 tokens with automatic rotation
- Role-Based Access Control (RBAC) with granular permissions
- Multi-tenant isolation with organization-scoped data
- Session management with secure token storage
Data Protection
- Encryption at rest using AES-256
- Encryption in transit via TLS 1.3
- Data isolation between tenants
- Input validation using Zod schemas
Network Security
- CORS configuration for cross-origin requests
- Rate limiting to prevent abuse
- DDoS protection with connection limits
- WebSocket security with origin validation
π Monitoring
Built-in Monitoring
- Connection metrics and throughput
- Message latency tracking
- Error rates and performance analytics
- Resource usage monitoring
- Real-time health checks
Observability
- Comprehensive audit logging
- Security event monitoring
- Performance trend analysis
- Compliance reporting
π€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
π Star History

Made with β€οΈ by AxonStream AI
Revolutionary real-time platform in a single package. One command, infinite possibilities.