This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
UtilPlex is an Angular 20.1.x developer utilities web application providing code formatting, data conversion, encoding, diff comparison, and time zone tools. The app uses modern Angular features including standalone components, signals, and SSR.
npm start- Start development servernpm run build- Production buildnpm run build:ci- CI production buildnpm test- Run testsnpm run lint- Run ESLintnpm run serve:ssr:utilplex- Serve SSR build
The application uses abstract base classes with concrete implementations:
Formatters: FormatViewService (abstract) → SqlFormatProvider, JsonFormatProvider, CssFormatProvider, JavascriptFormatProvider, TypescriptFormatProvider, ScssFormatProvider, etc.
Converters: ConverterServiceBase (abstract) → JsonToYamlConverter
Generators: GeneratorServiceBase (abstract) → GuidGeneratorService, LoremIpsumGeneratorService
Diff Tools: DiffService for file and text comparison functionality
Routes are centrally managed in src/app/_services/route.service.ts with:
- Dynamic route generation from categories
- Lazy-loaded components via dynamic imports
- Signal-based title management
- SEO optimization built-in
- Generic Views:
FormatViewComponent,ConvertViewComponent,GeneratorViewComponent, andDiffViewComponentwork with any service implementation - Standalone Components: Modern Angular standalone architecture throughout
- Signal-Based State: Input/output code and error states managed via Angular signals
src/app/_services/- Global servicessrc/app/formatters/- Code formatting toolssrc/app/converters/- Data conversion toolssrc/app/encoders/- Encoding/decoding toolssrc/app/generators/- Content generation toolssrc/app/diff/- File and text comparison toolssrc/app/time/- Time zone conversion toolssrc/app/codemirror/- CodeMirror editor configuration and themessrc/app/components/- Shared UI componentssrc/styles/- SCSS styling system with CSS variables
- Create concrete service implementing
FormatViewService - Add route definition in
route.service.ts - Component uses generic
FormatViewComponent
- Create concrete service extending
ConverterServiceBase - Add route definition in
route.service.ts - Component uses generic
ConvertViewComponent
- Create concrete service extending
GeneratorServiceBase - Add route definition in
route.service.ts - Component uses generic
GeneratorViewComponent
- Create service implementing diff functionality
- Add route definition in
route.service.ts - Component uses
DiffViewComponentwith CodeMirror diff editor
Whenever a new tool or feature is added, the following must also be updated:
- Route — Add route definition in
src/app/_services/route.service.ts - Sitemap — Add the new URL to
src/sitemap.xmlwith the current date - SEO in
src/index.html:<meta name="keywords">— Add relevant keywords<meta name="description">and JSON-LDdescription— Mention the new tool- JSON-LD
featureList— Add an entry for the new tool - OG and Twitter meta descriptions — Keep in sync with the main description
<meta name="date">— Update to the current date
- Welcome page — Add category icon/description in
src/app/pages/welcome/welcome.component.tsif a new category was created - Patch notes — Add an entry in
src/app/pages/patch-notes/patch-notes.component.ts - Version — Bump version in
package.jsonand update the sidebar version insrc/app/nav/side-bar/side-bar.component.html
- Custom Dracula theme in
src/app/codemirror/dracula-theme.ts - Language-specific extensions in
src/app/codemirror/language-extensions.ts - Support for SQL, JSON, CSS, JavaScript, TypeScript, YAML, XML
- Copy/paste functionality built-in
- Read-only output editors
- Diff editor for file comparison with side-by-side view
- Use
inject()function for dependency injection - Prefer signals over observables for component state
- Follow existing naming patterns:
f-json(formatter),c-json-yaml(converter),g-guid(generator) - Abstract base classes for extensibility
- Use Angular control flow syntax (
@if,@for,@switch) instead of structural directives (*ngIf,*ngFor,*ngSwitch) - Use
@forsyntax:@for (item of items; track item.id) { ... }instead of*ngFor="let item of items; trackBy: trackByFn" - Use signal-based inputs/outputs:
myInput = input()andmyOutput = output()instead of@Input()and@Output()decorators