A modern, type-safe analytics SDK for capturing and sending events to Altertable. Built with TypeScript, featuring React integration and comprehensive developer tooling.
| Package | Description | NPM |
|---|---|---|
@altertable/altertable-js |
Core JavaScript SDK for capturing and sending analytics events | |
@altertable/altertable-react |
React SDK with hooks and type-safe funnel tracking | |
@altertable/altertable-snippet |
ES5-compatible snippet for legacy browser support | – |
| Example | Description | Port | Framework |
|---|---|---|---|
example-react |
React application showcasing funnel tracking | 3000 |
React + Vite + TypeScript |
For detailed installation and usage instructions, see the package-specific documentation:
- Core JavaScript SDK – Installation, API reference, and examples
- React SDK – React hooks, providers, and type-safe funnel tracking
- Install Bun
# Install dependencies
bun install
# Build all packages
bun run build
# Run tests
bun run test| Step | Command | Description |
|---|---|---|
| Start | bun run dev |
Start all packages and examples in watch mode |
| Edit | – | Modify files and changes auto-reflect in examples |
| Test | bun run test:watch |
Run tests in watch mode |
| Lint | bun run lint:fix |
Fix code style issues |
| Type check | bun run typecheck |
Verify TypeScript types |
| Script | Description |
|---|---|
dev |
Start development environment with all packages and examples |
dev:packages |
Start development mode for all packages only |
dev:examples |
Start development mode for all examples only |
build |
Build all packages |
clean |
Clean all build artifacts |
typecheck |
Run TypeScript type checking across all packages |
lint |
Run ESLint across all packages |
lint:fix |
Fix ESLint issues across all packages |
test |
Run tests across all packages |
test:watch |
Run tests in watch mode across all packages |
The monorepo uses Vitest for testing:
# Run all tests
bun run test
# Run tests in watch mode
bun run test:watch
# Run tests for a specific package
cd packages/altertable-js && bun run testReleases are automated with release-please:
- Merge conventional commits into
main(fix:for patch,feat:for minor,feat!:for major) - release-please opens/updates a release PR with version and changelog updates
- Merge the release PR
- The
release-please.ymlworkflow publishes released packages to npm automatically
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request