A collection of high-quality, framework-independent utilities and tools for modern web development.
Website β’ Documentation β’ npm β’ GitHub
Thalesrc 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
Framework-independent drag-and-drop library built with Lit Elements as custom web components. Provides extended drag-drop events, smart drop zones, drag handles, and multiple dragging strategies.
Highlights: Web Components, Custom events, Drop zone validation, Drag strategies, Cross-framework compatibility
Collection of custom web components built with Lit. Currently features a complete client-side routing solution with declarative components for SPAs. Includes router, route definitions, outlets, navigation links, and global configuration with support for multiple history strategies and reactive updates.
Highlights: Router components, Client-side routing, Template-based routes, URLPattern matching, Active link detection, Signal-based reactivity
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
Reactive wrappers for browser storage APIs (localStorage, sessionStorage) with Observable patterns for real-time updates.
Highlights: Reactive storage, Observable patterns, Local/Session storage
Utility functions and operators for RxJS Observables. Features async iterable conversion, share operators, and Observable extensions.
Highlights: RxJS operators, AsyncIterable support, Observable utilities, 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:
- storage-signals: Signal-based localStorage/sessionStorage with reactive updates and nested property access
- template-signal-forms: Signal-based forms for template-driven forms (under construction)
- utils: Common Angular utilities and helpers (under construction)
Highlights: Angular signals, Reactive storage, Nested property access, Template forms, 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, and broadcast channels. Built with RxJS for reactive message handling with decorators for clean, declarative APIs.
Highlights: Iframe messaging, Chrome extension support, Web Workers, Broadcast API, 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 @thalesrc/extra-ts-types
# Drag & drop
npm install @thalesrc/drag-drop
# RxJS utilities
npm install @thalesrc/rx-utils
# Nx utilities (dev dependency)
npm install -D @thalesrc/nx-utils
# 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:
<script type="module" src="node_modules/@thalesrc/drag-drop/bundle.mjs"></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 '@thalesrc/rx-utils';
const observable = interval(1000);
for await (const value of toAsyncIteratable(observable)) {
console.log(value);
}Hermes Messaging:
import { IframeMessageClient, Request } from '@thalesrc/hermes/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
β βββ drag-drop/ # Drag & drop library
β βββ paintlet/ # CSS Paint API worklets
β βββ react-utils/ # React utilities
β βββ rx-utils/ # RxJS utilities
β βββ reactive-storage/ # Reactive storage
β βββ hermes/ # 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 drag-drop
# 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 Thalesrc