A lightweight, high-performance analytics platform designed for modern applications. Bebop provides a complete solution for collecting, storing, and querying user events with minimal overhead and maximum flexibility.
Bebop consists of two main components that work seamlessly together:
- π Bebop Server - A fast, secure analytics backend built with Fastify and SQLite
- π± Bebop Client - A universal JavaScript client for browsers and Node.js
Whether you're building a web app, mobile app, or server-side application, Bebop provides the tools you need to understand user behavior without the complexity of traditional analytics platforms.
- Zero Dependencies: Client has no external dependencies, uses native fetch
- Lightweight: Minimal bundle size and memory footprint
- High Throughput: Fastify-based server optimized for concurrent requests
- Non-blocking: Fire-and-forget analytics that never slow down your UI
- Dual Authentication: JWT and Bearer token support
- HTTPS Only: Secure communication by default
- Configurable Schema: YAML-based event type definitions
- TypeScript: Full type safety across the entire platform
- Cross-Platform Client: Works in browsers, Node.js, and edge environments
- Docker Ready: Production-ready containerization
- Self-Hosted: Complete control over your data
- GraphQL + REST: Multiple API interfaces for different use cases
A production-ready analytics backend that receives, validates, and stores events.
Features:
- FastAPI-based REST endpoints
- GraphQL API with dynamic schema generation
- SQLite database with Drizzle ORM
- Configurable event types and parameters
- Built-in event tracing support
- Docker deployment ready
Quick Start:
cd apps/server
bun install
bun run devA universal JavaScript client for sending analytics events from any environment.
Features:
- Browser and Node.js support
- Non-blocking event sending
- Built-in queue management
- TypeScript definitions included
- Zero external dependencies
- Configurable concurrency
Quick Start:
npm install @gokceno/bebop-clientimport { Bebop } from '@gokceno/bebop-client';
const client = Bebop({
baseUrl: 'https://your-bebop-server.com',
bearerToken: 'your-api-key'
});
// Non-blocking event sending
client.sendAsync('user_clicked', {
buttonId: 'signup',
page: '/landing'
});# Clone the repository
git clone https://github.com/gokceno/bebop.git
cd bebop
# Start the server
cd apps/server
bun install
bun run devThe server will be running at http://localhost:3000
Edit apps/server/bebop.yml to define your analytics events:
auth:
bearer_tokens:
- your-api-key
jwt:
secret: your-jwt-secret
max_age: 1d
event_types:
- type: page_view
params:
- page_url: string
- user_id: string
trace: false
- type: button_click
params:
- button_id: string
- page: string
trace: truenpm install @gokceno/bebop-clientimport { Bebop } from '@gokceno/bebop-client';
const analytics = Bebop({
baseUrl: 'http://localhost:3000',
bearerToken: 'your-api-key',
concurrency: 5
});
// Track events
analytics.sendAsync('page_view', {
page_url: '/dashboard',
user_id: 'user123'
});
analytics.sendAsync('button_click', {
button_id: 'save',
page: '/settings'
}, [
{ timestamp: Date.now(), action: 'hover' },
{ timestamp: Date.now() + 100, action: 'click' }
]);Use the GraphQL playground at http://localhost:3000/graphql:
query {
events(limit: 10, order: "desc") {
id
eventName
createdAt
params {
paramName
paramValue
}
traces {
traceData
}
}
}Deploy with Docker Compose for production:
# In project root
docker-compose up -dThe included docker-compose.yml sets up the server with persistent data storage.
βββββββββββββββββββ HTTPS/REST βββββββββββββββββββ
β Bebop Client β βββββββββββββββββΊ β Bebop Server β
β β β β
β β’ Browser β β β’ Fastify β
β β’ Node.js β β β’ GraphQL β
β β’ Edge Runtime β β β’ SQLite β
βββββββββββββββββββ βββββββββββββββββββ
Data Flow:
- Client captures events in your application
- Events are queued and sent to server via REST API
- Server validates, processes, and stores events in SQLite
- Data is queryable via GraphQL or REST endpoints
- Built-in dashboard for real-time analytics (coming soon)
This is a monorepo managed with Turbo. Key commands:
# Install dependencies
bun install
# Build all packages
bun run build
# Start development (server)
cd apps/server && bun run dev
# Run tests
bun test
# Release new versions
bun run release- Web Analytics: Track page views, user interactions, conversion funnels
- Feature Usage: Monitor which features are used most frequently
- Performance Monitoring: Capture timing data and user experience metrics
- A/B Testing: Collect data for experimental feature analysis
- Business Intelligence: Custom event tracking for business insights
- Error Tracking: Log application errors with context
- User Journey Analysis: Trace user paths through your application
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is released into the public domain under The Unlicense. See LICENSE for details.
Built with β€οΈ for developers who value simplicity, performance, and privacy.