@clarium/ezui-services
v0.0.1-beta
Published
A lightweight Angular library offering services for API calls, HTTP utilities, error handling, and secure storage.
Readme
EzUI Services
Reliable, reusable, and centralized service utilities to power your Angular applications.
EzUI Services are a set of core utilities designed to abstract common patterns like HTTP communication, error handling, and storage management — making your development experience more consistent, efficient, and testable.
Table of Contents
Overview
EzUI Angular Services centralize infrastructure logic such as API orchestration, error resolution, and browser storage into streamlined, reusable utilities. Designed for consistency and scalability, they simplify cross-project patterns and minimize boilerplate—so teams can focus on business logic.
Built for maintainability and clarity, they enable teams to standardize behavior across projects, reduce boilerplate, and focus more on business logic, instead of repetitive plumbing. Each service can be used independently or alongside EzUI's component architecture.
Installation
Install the EzUI package via NPM:
npm install @clarium/ezui-servicesUsage
These services can be injected into any Angular component, directive, or other service.
constructor(private apiService: ApiService) {}
ngOnInit() {
this.apiService.get('/users').subscribe((res) => console.log(res));
}For interceptors, ensure they are added in your AppModule:
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: ApiInterceptorService,
multi: true,
},
]Available Services
| Service Name | Description | Documentation | |--------------------|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| | Api Interceptor | Intercepts all outgoing HTTP requests to inject headers or handle authorization | View Docs | | Api | A wrapper around Angular’s HttpClient to make structured API calls | View Docs | | Http Error Handler | Centralized error handling for HTTP requests | View Docs | | Http Utility | Utility methods for simplifying HTTP operations like param serialization | View Docs | | Storage | Handles browser storage (local/session) operations with fallbacks | View Docs | | Encrypted Storage | EncryptedStorageServiceService securely stores sensitive data in localStorage or sessionStorage with encryption and optional expiration support. | View Docs |
Service Preview
Explore practical examples of how EzUI services simplify real-world development tasks.
View Service Examples
See how to use each service — from making API calls to handling global errors, local storage, and more.
Compatibility
EzUI supports Angular versions 16 through 20, ensuring seamless integration with the latest features and ecosystem improvements.
The library works with TypeScript 4.8 and above, giving you the latest language enhancements and strict type safety.
For Node.js, EzUI is tested and compatible with versions 16, 18, and 20, aligning with common Angular development environments.
License
EzUI Services are released under the MIT License.
You are free to use, modify, and distribute these services in both personal and commercial projects.
