A collection of high-quality, framework-independent utilities and tools for modern web development.
Website β’ Documentation β’ npm β’ GitHub
Telperion is a comprehensive monorepo containing battle-tested libraries, utilities, and tools designed to simplify modern web development. From JavaScript utilities to Docker-based infrastructure tools, each package is crafted with performance, type safety, and developer experience in mind.
- π High Performance: Optimized for speed and efficiency
- π TypeScript First: Full TypeScript support with comprehensive type definitions
- π² Tree-shakeable: Import only what you need
- π§ Zero Dependencies: Most packages have no external dependencies
- π§ͺ Well Tested: High test coverage across all packages
- π Extensively Documented: Comprehensive documentation and examples
- π¨ Framework Agnostic: Works with any framework or vanilla JavaScript
The swiss army knife of JavaScript utilities. A comprehensive collection of 50+ utility functions for arrays, objects, promises, strings, and more. Features include array manipulation, deep cloning, promise chains, debouncing, and smart type guards.
Highlights: Array utilities, Promise helpers, Object manipulation, String operations, Function utilities
Advanced TypeScript utility types for sophisticated type manipulations. Includes types like PartialSome, DeepestValue, Join, Tail, and more for working with complex type scenarios.
Highlights: Deep object navigation, Tuple manipulation, Constructor types, Partial utilities
TypeScript-specific utility types and helper functions built on top of the TypeScript compiler API.
Highlights: TypeScript utilities, Compiler helpers
Utility functions for DOM manipulation and browser APIs. Simplifies common DOM operations with a modern, type-safe API.
Highlights: DOM manipulation, Browser API helpers, Event handling
Collection of custom web components built with Lit. Features a Material Symbols icon element, a complete client-side routing solution with declarative components for SPAs, a framework-independent drag-and-drop system with extended events, smart drop zones, drag handles, and multiple dragging strategies, a <details> grouping element with FIFO open caps, declarative summary markers, and marker-only toggling, a popover element built on the native Popover API and CSS Anchor Positioning with declarative position shorthands and automatic edge-flipping (no JS positioning loop), a form-associated <tp-select> selectbox with single/multi-select via max (1, integer, or infinite), FIFO eviction, slotted trigger/panel customization, and a live <tp-selected-content> mirror that works across shadow DOM boundaries, and a form-associated <tp-button> button (solid/outline/text variants, type="submit" | "reset", tab-selectable, palette-driven color via the shared shade-mixer system).
Sub-modules:
- icon:
<tp-icon>icon element supporting three families β Material Symbols (all four variable-font axes:filled,grade,weight,optical-size; three variants: outlined/round/sharp), Simple Icons brand icons (family="simple-icons" slug="facebook") loaded on demand fromcdn.simpleicons.org, and theSVG (family="thesvg" slug="google" variant="wordmark") multi-color brand icons fromthesvg.org. Each remote family lives in its own shared<svg>sprite. Light-DOM rendering and auto-rotating Google Fonts CSS API URLs (self-host friendly) - router: Client-side routing with router, route definitions, outlets, navigation links, and global configuration with support for multiple history strategies and reactive updates
- drag-drop: Drag-and-drop web components with extended drag-drop events, smart drop zones, drag handles, and multiple dragging strategies
- details-set:
<tp-details-set>groups native<details>elements with amax-open-itemsFIFO cap, declarative<template summary-marker index="β¦">markers cloned into every summary, and atoggle-on="summary" | "marker"attribute (per-element overridable) for marker-only disclosure - popover:
<tp-popover>framework-agnostic popover built on the native Popover API and CSS Anchor Positioning. Auto-applies thepopoverattribute, resolves its anchor from atargetquerySelector (orparentElement), and is positioned entirely in CSS viaanchor(). Declarativepositionsyntax with shorthands (center / top,start,top to bottom, β¦) and automatic edge-flipping viaposition-try-fallbacksβ no JS positioning loop. Optionalclick/hovertriggers - select:
<tp-select>form-associated selectbox built on<tp-popover>with<tp-option>items and a live<tp-selected-content>mirror. Single-select by default; multi-select viamax(positive integer with FIFO eviction, orinfinitefor unbounded). Full<form>integration viaElementInternals(name,disabled,required, validity, reset/restore). Slots forbutton(custom trigger) andpopover(replace the option list while keeping<tp-option>s registered in context). Selection state is signal-backed and propagates across nested shadow DOM boundaries via@lit/context - button:
<tp-button>form-associated button withsolid/outline/textvariants andtype="button" | "submit" | "reset". Tab-selectable, activates onSpace/Enter, callsform.requestSubmit()/form.reset()like a native button, announcesrole="button"viaElementInternals, and togglesaria-disabledand tab-order ondisabled. Palette-driven color via the shared shade-mixer (color+shade0β1000)
Highlights: Material Symbols icons, Variable-font axes, Router components, Client-side routing, URLPattern matching, Signal-based reactivity, Drag & drop, Web Components, Drop zone validation, Details accordion, Summary markers, Popover API, CSS Anchor Positioning, Form-associated selectbox, Multi-select, Form-associated button, Cross-framework compatibility
Pre-built CSS Paint API (Houdini) worklets for modern web development. Create stunning visual effects like ripples, rain animations, and organic gradients using the CSS Paint API.
Highlights: CSS Houdini, Paint worklets, Visual effects, Animated gradients
RxJS-based reactive wrapper for browser storage APIs (localStorage and sessionStorage). Provides an Observable-based API for real-time storage updates with support for nested property access, automatic synchronization, and FIFO-queued write operations. Serves as the foundation for Angular Signal-based and React hooks-based storage utilities.
Highlights: Reactive storage, Observable patterns, Nested property access, Type-safe, FIFO operations, Framework foundation
Utility functions and operators for RxJS Observables. Features async iterable conversion, share operators, and Observable extensions.
Highlights: RxJS operators, AsyncIterable support, Observable utilities, Debounce buffering, Stream helpers
Collection of Angular utilities and libraries organized as secondary entry points. Includes signal-based storage management, template-driven form utilities, and common Angular helpers.
Sub-modules:
- common: Pipes for extracting keys, values, and entries from Maps, Sets, and plain objects, a
timespipe for repeating template blocks, anObserveSizeDirectivefor reactive element size observation, and an*tngUnlessstructural directive (inverse of*ngIf) - storage-signals: Signal-based localStorage/sessionStorage/cookies with reactive updates, nested property access, and configurable cookie options
- sse-client: HttpClient-inspired SSE client with Observable-based streaming, interceptor chain, and reactive real-time updates
- template-signal-forms: Signal-based forms for template-driven forms (under construction)
- utils: Angular utilities including event modifiers, directive-as-service provider, and Promise-based HTTP client with tuple error handling
Highlights: Angular signals, Reactive storage, Cookie storage, SSE client, Interceptors, Real-time streaming, Nested property access, Template forms, Event modifiers, HTTP utilities, Type-safe
React-specific utility hooks and components for modern React development. Simplifies common React patterns and state management.
Highlights: Custom hooks, React utilities, State management helpers
Cross-context messaging library for seamless communication across iframes, Chrome extensions, web workers, broadcast channels, and WebRTC data channels. Built with RxJS for reactive message handling with decorators for clean, declarative APIs.
Sub-modules:
- iframe: Parent-child window messaging with
IframeMessageClient,IframeMessageHost, andIframeMessageService - chrome: Chrome extension communication across background scripts, content scripts, and popups
- worker: Main thread β Web Worker communication
- broadcast: Tab-to-tab messaging via the Broadcast Channel API
- rtc: Peer-to-peer messaging over negotiated RTCDataChannels with automatic channel ID derivation
Highlights: Iframe messaging, Chrome extension support, Web Workers, Broadcast API, WebRTC DataChannel, RxJS-based, Decorator API
Powerful Nx executors for monorepo projects. Includes executors for file copying with content replacement and image resizing, package.json generation with auto-exports, parallel command execution, TypeScript building, file watching, platform-specific scripts, and batch operations.
Highlights: Copy with transforms, Package.json filling, Parallel execution, TypeScript builder, File watcher, Platform runner
Node.js-specific utility functions for server-side development, file system operations, and CLI tools.
Highlights: File system utilities, CLI helpers, Node.js utilities
Docker-aware nginx reverse proxy with automatic SSL and service discovery. Perfect for development environments with support for HTTP/HTTPS, gRPC, databases (PostgreSQL, MySQL, Redis, MongoDB), automatic SSL certificates, and Docker container discovery.
Highlights: Automatic SSL, gRPC support, Database proxying, Docker integration, Development-optimized
Comprehensive Docker container for Fast Reverse Proxy (FRP) with both server and client modes. Features web-based admin UI, multiple proxy types (TCP, UDP, HTTP, HTTPS), and easy configuration.
Highlights: FRP server/client, Web admin UI, Multi-protocol, Easy setup, Multi-platform support
Install individual packages as needed:
# JavaScript utilities
npm install @thalesrc/js-utils
# TypeScript types
npm install @telperion/extra-ts-types
# RxJS utilities
npm install @telperion/rx-utils
# Nx utilities (dev dependency)
npm install -D @thalesrc/nx-utils
# Messenger (cross-context messaging)
npm install @telperion/messenger
# Paint API worklets
npm install @thalesrc/paintletJavaScript Utilities:
import { compact, uniquify, debounce } from '@thalesrc/js-utils';
const arr = [1, 2, 2, 3, null, undefined, 4];
compact(arr); // [1, 2, 2, 3, 4]
uniquify(arr); // [1, 2, 3, null, undefined, 4]
debounce(() => console.log('Debounced!'), 300);Drag & Drop (via @telperion/elements):
<script type="module">
import '@telperion/elements/drag-drop';
</script>
<tha-drag name="item" draggingStrategy="move">
<div>Drag me!</div>
</tha-drag>
<tha-dropzone accept="item">
<div>Drop here!</div>
</tha-dropzone>RxJS Utilities:
import { interval } from 'rxjs';
import { toAsyncIteratable } from '@telperion/rx-utils';
const observable = interval(1000);
for await (const value of toAsyncIteratable(observable)) {
console.log(value);
}Messenger:
import { IframeMessageClient, Request } from '@telperion/messenger/iframe';
import { Observable } from 'rxjs';
class MyClient extends IframeMessageClient {
@Request('getData')
fetchData(query: string): Observable<any> {
return null!; // Implementation handled by decorator
}
}
const client = new MyClient();
client.fetchData('user').subscribe(data => console.log(data));This project is built with Nx, a powerful build system for monorepos.
thalesrc/
βββ libs/
β βββ js-utils/ # JavaScript utilities
β βββ ts-utils/ # TypeScript utilities
β βββ extra-ts-types/ # TypeScript types
β βββ dom-utils/ # DOM utilities
β βββ paintlet/ # CSS Paint API worklets
β βββ react-utils/ # React utilities
β βββ rx-utils/ # RxJS utilities
β βββ reactive-storage/ # Reactive storage
β βββ messenger/ # Messaging library
β βββ node-utils/ # Node.js utilities
β βββ nx-utils/ # Nx executors
β βββ auto-proxy/ # Auto proxy Docker image
β βββ docker-frp/ # FRP Docker image
βββ nx.json
βββ package.json
βββ tsconfig.base.json
# Run tests for a specific library
nx test js-utils
# Build a library
nx build elements
# Run all tests
nx run-many -t test
# Visualize the project graph
nx graphWe welcome contributions! Please see our Contributing Guide for details.
- 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
All packages in this repository are licensed under the MIT License - see the LICENSE file for details.
Ali Εahin ΓzΓ§elik
- Website: alisah.in
- Email: alisahinozcelik@gmail.com
- GitHub: @thalesrc
- Twitter: @thalesrc
If you find these libraries helpful, please consider:
- β Starring the repository
- π Reporting bugs or suggesting features via issues
- π° Supporting on Patreon
- π’ Sharing with your network
Made with β€οΈ by Telperion