https://github.com/Gaspar1992/angular-helpers
A suite of Angular libraries that helps you build secure, browser-integrated applications with a clean developer experience.
https://github.com/Gaspar1992/angular-helpers
Last synced: 5 days ago
JSON representation
A suite of Angular libraries that helps you build secure, browser-integrated applications with a clean developer experience.
- Host: GitHub
- URL: https://github.com/Gaspar1992/angular-helpers
- Owner: Gaspar1992
- Created: 2026-03-17T21:48:36.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-04-06T20:49:46.000Z (11 days ago)
- Last Synced: 2026-04-06T21:03:44.662Z (11 days ago)
- Language: TypeScript
- Homepage:
- Size: 1.32 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Agents: AGENTS.md
Awesome Lists containing this project
- fucking-awesome-angular - angular-helpers - A suite of Angular libraries that help you build secure, browser-integrated applications with a clean developer experience. (Third Party Components / Mixed Utilities)
- awesome-angular - angular-helpers - A suite of Angular libraries that help you build secure, browser-integrated applications with a clean developer experience. (Third Party Components / Mixed Utilities)
README
# π Angular Helpers
A suite of Angular libraries that helps you build secure, browser-integrated applications with a clean developer experience.
---
## π¦ Available Packages
### π `@angular-helpers/security`
_Advanced regular expression security and ReDoS prevention_
π **Documentation**: https://gaspar1992.github.io/angular-helpers/docs/security
**π― What it solves:**
- **ReDoS (Regular Expression Denial of Service)** attacks caused by malicious or expensive patterns.
- Safe validation of complex regular expressions without blocking your app.
- Controlled regex execution with timeout and security analysis.
**β¨ Key features:**
- π‘οΈ **ReDoS prevention** with automatic risky pattern checks.
- β‘ **Web Worker execution** to avoid blocking the main thread.
- π **Configurable timeout** to limit expensive regex operations.
- π **Risk analysis** with complexity metrics and recommendations.
- ποΈ **Builder pattern** for fluent secure-regex configuration.
**π‘ Example usage:**
```typescript
// Safe regex validation for user input
const result = await securityService.testRegex(userInput, text, {
timeout: 5000,
safeMode: true,
});
// Builder pattern for complex patterns
const { pattern, security } = RegexSecurityService.builder()
.pattern('\\d+')
.timeout(3000)
.safeMode()
.build();
```
**π₯ Installation:**
```bash
npm install @angular-helpers/security
```
---
### π `@angular-helpers/browser-web-apis`
_Unified and safe browser API access with permissions and robust error handling_
π **Documentation**: https://gaspar1992.github.io/angular-helpers/docs/browser-web-apis
**π― What it solves:**
- **API fragmentation** across browsers.
- **Permission complexity** for sensitive browser features.
- **Compatibility checks** that usually require repetitive boilerplate.
- **Inconsistent error handling** across web APIs.
**β¨ Key features:**
- πΈ **Camera** access and stream control.
- πΊοΈ **Geolocation** with watch support and typed errors.
- π **Notifications** with permission-aware behavior.
- π **Clipboard** utilities.
- π₯ **Media Devices** enumeration and media access.
- π **Centralized permission utilities**.
- β
**Device/browser API wrappers** with fallback checks.
- β‘ **Signal Fn primitives** β 9 zero-boilerplate reactive inject functions (`injectPageVisibility`, `injectResizeObserver`, `injectIntersectionObserver`, `injectNetworkInformation`, `injectScreenOrientation`, `injectMutationObserver`, `injectPerformanceObserver`, `injectIdleDetector`, `injectGamepad`) with automatic cleanup and `viewChild` signal support.
**π₯ Installation:**
```bash
npm install @angular-helpers/browser-web-apis
```
---
### π `@angular-helpers/worker-http` _(Preview)_
_Angular HTTP over Web Workers β off-main-thread HTTP pipelines_
**π― What it solves:**
- **Main-thread blocking** from heavy HTTP payloads and serialization.
- **Request signing complexity** with WebCrypto HMAC.
- **Serialization overhead** with pluggable format support.
**β¨ Key features:**
- π **Off-main-thread HTTP** pipelines via Web Workers.
- π **Typed RPC bridge** for structured worker communication.
- π **WebCrypto HMAC** request signing.
- π¦ **Pluggable serializers** (TOON, seroval, auto-detect).
> β οΈ This package is in **preview**. APIs may change before v1.0.
**π₯ Installation:**
```bash
npm install @angular-helpers/worker-http
```
---
## π― Why Angular Helpers?
### β‘ Immediate Productivity
- Unified APIs for common browser capabilities.
- Strict TypeScript support and better autocomplete.
- Practical examples and ready-to-use patterns.
- End-to-end browser test coverage in CI.
### π‘οΈ Security by Default
- ReDoS prevention tools for regex-heavy flows.
- Permission-aware wrappers for sensitive APIs.
- Worker-based isolation for expensive operations.
- Predictable error handling paths.
### π Modern Stack Alignment
- Built for modern Angular versions and patterns.
- Browser-focused utilities tested with Playwright.
- Actively maintained workflows and test harnesses.
---
## π Quick Start
### Workspace Setup
```bash
# Clone the repository
git clone https://github.com/Gaspar1992/angular-helpers
cd angular-helpers
# Install dependencies
npm install
# Generate local SSL certificates
npm run ssl:generate
# Start demo app over HTTPS
npm run start:https
```
### Use in Your Project
```bash
# Install the packages you need
npm install @angular-helpers/security
npm install @angular-helpers/browser-web-apis
npm install @angular-helpers/worker-http # preview
```
For modern Angular standalone integration, check each package's own README.
---
## π Comparison
| Feature | Angular Helpers | Manual Implementation | Other Libraries |
| -------------------- | ---------------- | --------------------- | --------------- |
| **ReDoS Protection** | β
Built-in | β Manual | β οΈ Partial |
| **Browser APIs** | β
Unified | β Fragmented | β οΈ Limited |
| **TypeScript** | β
Full support | β οΈ Partial | β Minimal |
| **Testing** | β
Included | β Manual | β οΈ Basic |
| **Documentation** | β
Comprehensive | β Missing | β οΈ Basic |
| **Support** | β
Active | β Team-owned only | β οΈ Varies |
---
## π οΈ Development
### Available Scripts
```bash
# Generate SSL certificates (local/CI)
npm run ssl:generate
# Local HTTPS development (required for secure browser APIs)
npm run start:https
# Build all packages
npm run build:packages
# Browser tests on Chromium
npm run test:browser
# Browser tests for CI (Chromium, 1 worker)
npm run test:browser:ci
# Cross-browser smoke tests (Firefox + WebKit)
npm run test:browser:cross
# Workspace linting
npm run lint
```
### Project Structure
```
angular-helpers/
βββ packages/
β βββ security/ # π¦ @angular-helpers/security
β βββ browser-web-apis/ # π¦ @angular-helpers/browser-web-apis
β βββ worker-http/ # π¦ @angular-helpers/worker-http (preview)
βββ src/ # π Demo application
βββ docs/ # π Documentation
βββ scripts/ # π§ Automation scripts
```
---
## π Roadmap
### Planned π§
- **@angular-helpers/pwa** - Service Worker and PWA capabilities.
- **@angular-helpers/storage** - Unified storage helpers.
### In Progress π
- **@angular-helpers/worker-http** β transport, serializer, backend, interceptors, and crypto sub-entry points.
- Runtime and bundle-size improvements.
- More real-world examples and demos.
---
## π€ Contributing
Contributions are welcome.
### Getting Started
```bash
# Fork and clone
git clone https://github.com/your-user/angular-helpers
# or fork from https://github.com/Gaspar1992/angular-helpers
cd angular-helpers
# Create a feature branch
git checkout -b feature/your-feature
# Commit and push
git commit -m "feat: add your feature"
git push origin feature/your-feature
```
### Contribution Guides
- π [SSR/SSG Implementation](./docs/ssr-ssg-implementation.md)
---
## π License
MIT License β see [LICENSE](./LICENSE) for details.
---
## οΏ½ Blog
Articles about library design decisions, Angular patterns, and the evolution of Angular Helpers.
They live as Markdown files in [`public/content/blog/`](./public/content/blog/) and are rendered on the [web](https://gaspar1992.github.io/angular-helpers/blog).
| Date | Article |
| ---------- | ------------------------------------------------------------------------------------------------------------------- |
| 2026-04-12 | [Redesigning the web & our vision as a library ecosystem](./public/content/blog/web-redesign-and-library-vision.md) |
---
## οΏ½π Useful Links
- **π Issues & Feature Requests**: [GitHub Issues](https://github.com/Gaspar1992/angular-helpers/issues)
- **π¬ Discussions**: [GitHub Discussions](https://github.com/Gaspar1992/angular-helpers/discussions)
- **π¦ NPM Organization**: [npmjs.com/org/angular-helpers](https://www.npmjs.com/org/angular-helpers)
---
**β If Angular Helpers helps your team, consider starring the repository.**
Made with β€οΈ by the Angular Helpers Team