Skip to content

Commit 4c449ee

Browse files
committed
feat: Implement GUID and Lorem Ipsum generators with responsive design
- Added GGuidComponent and GLoremComponent for generating GUIDs and Lorem Ipsum text respectively. - Introduced signal-based state management for input fields in both components. - Created responsive styles for both components to enhance usability on various screen sizes. - Developed a shared GeneratorViewComponent to display generated output with error handling. - Styled components with modern UI elements including gradients, hover effects, and custom checkboxes. - Integrated Monaco Editor for displaying generated content with syntax highlighting.
1 parent 2ec2120 commit 4c449ee

30 files changed

Lines changed: 4745 additions & 466 deletions

CLAUDE.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
UtilPlex is an Angular 19.2.x developer utilities web application providing code formatting, data conversion, encoding, and time zone tools. The app uses modern Angular features including standalone components, signals, and SSR.
7+
8+
## Development Commands
9+
- `npm start` - Start development server
10+
- `npm run build` - Production build
11+
- `npm run build:ci` - CI production build
12+
- `npm test` - Run tests
13+
- `npm run lint` - Run ESLint
14+
- `npm run serve:ssr:utilplex` - Serve SSR build
15+
16+
## Architecture Overview
17+
18+
### Service Provider Pattern
19+
The application uses abstract base classes with concrete implementations:
20+
21+
**Formatters**: `FormatViewService` (abstract) → `SqlFormatProvider`, `JsonFormatProvider`, etc.
22+
**Converters**: `ConverterServiceBase` (abstract) → `JsonToYamlConverter`
23+
24+
### Routing System
25+
Routes are centrally managed in `src/app/_services/route.service.ts` with:
26+
- Dynamic route generation from categories
27+
- Lazy-loaded components via dynamic imports
28+
- Signal-based title management
29+
- SEO optimization built-in
30+
31+
### Component Architecture
32+
- **Generic Views**: `FormatViewComponent` and `ConvertViewComponent` work with any service implementation
33+
- **Standalone Components**: Modern Angular standalone architecture throughout
34+
- **Signal-Based State**: Input/output code and error states managed via Angular signals
35+
36+
### Key Directories
37+
- `src/app/_services/` - Global services
38+
- `src/app/formatters/` - Code formatting tools
39+
- `src/app/converters/` - Data conversion tools
40+
- `src/app/encoders/` - Encoding/decoding tools
41+
- `src/app/monaco/` - Monaco editor configuration
42+
- `src/styles/` - SCSS styling system with CSS variables
43+
44+
## Adding New Utilities
45+
46+
### For Formatters:
47+
1. Create concrete service implementing `FormatViewService`
48+
2. Add route definition in `route.service.ts`
49+
3. Component uses generic `FormatViewComponent`
50+
51+
### For Converters:
52+
1. Create concrete service extending `ConverterServiceBase`
53+
2. Add route definition in `route.service.ts`
54+
3. Component uses generic `ConvertViewComponent`
55+
56+
## Monaco Editor Integration
57+
- Custom Dracula theme in `monaco-global-config.ts`
58+
- Language-specific configurations
59+
- Copy/paste functionality built-in
60+
- Read-only output editors
61+
62+
## Code Style
63+
- Use `inject()` function for dependency injection
64+
- Prefer signals over observables for component state
65+
- Follow existing naming patterns: `f-json` (formatter), `c-json-yaml` (converter)
66+
- Abstract base classes for extensibility

src/app/_services/route.service.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,25 @@ export class RouteService {
111111
},
112112
],
113113
},
114+
{
115+
name: 'Generators',
116+
routes: [
117+
{
118+
name: 'GUID',
119+
title: 'GUID Generator',
120+
url: '/generate/guid',
121+
description: 'Generate unique identifiers (GUIDs/UUIDs) with customizable quantity for your applications.',
122+
loadComponent: () => import('../generators/g-guid/g-guid.component').then((mod) => mod.GGuidComponent),
123+
},
124+
{
125+
name: 'Lorem',
126+
title: 'Lorem Ipsum Generator',
127+
url: '/generate/lorem',
128+
description: 'Generate Lorem Ipsum placeholder text with options for words, sentences, or paragraphs.',
129+
loadComponent: () => import('../generators/g-lorem/g-lorem.component').then((mod) => mod.GLoremComponent),
130+
},
131+
],
132+
},
114133
];
115134
}
116135
export interface RouteCategory {

src/app/app.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<app-side-bar></app-side-bar>
44
<div class="back">
55
<div class="route-container">
6-
<div class="top-bar">
7-
@if (RouterService.Title()) {
8-
<h1>{{ RouterService.Title() }}</h1>
9-
}
10-
<a href="https://github.com/timothydodd/utilplex"><img alt="GitHub" src="assets/github-mark.svg" /> </a>
11-
</div>
6+
@if (RouterService.Title()) {
7+
<h1 class="seo-title">{{ RouterService.Title() }}</h1>
8+
}
9+
<a href="https://github.com/timothydodd/utilplex" class="github-float">
10+
<img alt="GitHub" src="assets/github-mark.svg" />
11+
</a>
1212
<router-outlet></router-outlet>
1313
</div>
1414
</div>

0 commit comments

Comments
 (0)