Skip to content

Commit e9d94c2

Browse files
committed
feature: export format , font ,color palatte
1 parent 462260a commit e9d94c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+8483
-23
lines changed

README-THEME-ENGINE.md

Lines changed: 347 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,347 @@
1+
# Theme & Customization Engine
2+
3+
A comprehensive theming system for the resume builder with AI-powered color generation, font management, brand kit integration, and automatic dark/light mode switching.
4+
5+
## Features
6+
7+
### 🎨 Color Palette Generator
8+
- **AI-suggested color schemes** based on industry and personality
9+
- **Industry-specific palettes** for technology, finance, healthcare, creative, consulting, education, retail, and manufacturing
10+
- **Personality-based customization** with professional, creative, modern, classic, and bold styles
11+
- **Accessibility compliance** with WCAG contrast ratio validation
12+
- **Color harmony algorithms** for complementary and analogous color schemes
13+
14+
### 🔤 Font Management System
15+
- **Curated font pairings** across classic, modern, creative, and technical categories
16+
- **Google Fonts integration** with automatic loading and fallback support
17+
- **Typography scales** with responsive sizing and line heights
18+
- **Font validation** and performance optimization
19+
- **Custom font upload** support for brand-specific typography
20+
21+
### 🏢 Brand Kit Integration
22+
- **Logo integration** with flexible positioning and sizing options
23+
- **Brand color extraction** from uploaded logos using advanced algorithms
24+
- **Company-specific themes** with predefined brand colors for major companies
25+
- **Brand consistency validation** ensuring color harmony and accessibility
26+
- **Multi-format logo support** (SVG, PNG, JPG) with optimization
27+
28+
### 🌓 Dark/Light Mode
29+
- **Automatic theme switching** based on system preferences
30+
- **Time-based switching** with customizable light/dark schedules
31+
- **Intelligent color adaptation** maintaining contrast and readability
32+
- **Smooth transitions** with CSS animations and state persistence
33+
- **Manual override** options for user preference
34+
35+
## Architecture
36+
37+
### Core Modules
38+
39+
```
40+
src/
41+
├── data/
42+
│ └── theme-types.ts # TypeScript interfaces and types
43+
├── modules/
44+
│ ├── color-generator.ts # AI color palette generation
45+
│ ├── font-manager.ts # Font pairing and management
46+
│ ├── brand-kit.ts # Brand integration utilities
47+
│ ├── theme-mode.ts # Dark/light mode management
48+
│ └── theme-engine.ts # Main theme orchestration
49+
└── cli/
50+
└── theme-cli.ts # Command-line interface
51+
```
52+
53+
### Key Components
54+
55+
#### ColorPaletteGenerator
56+
- Industry-specific color profiles
57+
- Personality-based palette generation
58+
- Accessibility validation (WCAG AA/AAA)
59+
- Color harmony algorithms
60+
- Contrast ratio calculations
61+
62+
#### FontManager
63+
- Curated font pairing database
64+
- Google Fonts API integration
65+
- Typography scale generation
66+
- Font loading optimization
67+
- Fallback font management
68+
69+
#### BrandKitManager
70+
- Logo color extraction
71+
- Brand-consistent theme generation
72+
- Company brand database
73+
- Color palette validation
74+
- Brand personality mapping
75+
76+
#### ThemeModeManager
77+
- System preference detection
78+
- Time-based switching
79+
- Color adaptation algorithms
80+
- State persistence
81+
- Smooth transitions
82+
83+
#### ThemeEngine
84+
- Theme template management
85+
- Custom theme creation
86+
- CSS generation
87+
- Theme validation
88+
- HTML application
89+
90+
## Usage
91+
92+
### Command Line Interface
93+
94+
```bash
95+
# List available theme templates
96+
npx resume-cli theme list
97+
98+
# Create theme from template
99+
npx resume-cli theme create-from-template --template modern-tech
100+
101+
# Create custom theme
102+
npx resume-cli theme create-custom --industry technology --personality modern --color "#3b82f6"
103+
104+
# Create brand theme
105+
npx resume-cli theme create-brand --colors "#1a73e8,#34a853,#fbbc04" --personality professional
106+
107+
# Generate color schemes
108+
npx resume-cli theme generate-colors --industry creative --personality bold --count 5
109+
110+
# List font pairings
111+
npx resume-cli theme list-fonts --category modern
112+
113+
# Preview theme
114+
npx resume-cli theme preview --theme ./themes/my-theme.json --mode dark
115+
116+
# Validate theme
117+
npx resume-cli theme validate ./themes/my-theme.json
118+
119+
# Interactive theme builder
120+
npx resume-cli theme interactive
121+
```
122+
123+
### Programmatic API
124+
125+
```typescript
126+
import { ThemeEngine, ColorPaletteGenerator, FontManager } from './src/modules';
127+
128+
// Generate AI color scheme
129+
const colorScheme = ColorPaletteGenerator.generateColorScheme({
130+
industry: 'technology',
131+
personality: 'modern',
132+
preferences: {
133+
favoriteColors: ['#3b82f6'],
134+
accessibility: true
135+
}
136+
});
137+
138+
// Create custom theme
139+
const theme = ThemeEngine.createCustomTheme({
140+
industry: 'technology',
141+
personality: 'modern'
142+
}, 'Inter & Source Code Pro');
143+
144+
// Apply theme to HTML
145+
const styledHTML = ThemeEngine.applyThemeToHTML(htmlContent, theme, 'light');
146+
147+
// Generate CSS
148+
const css = ThemeEngine.generateCSS(theme, 'dark');
149+
```
150+
151+
## Theme Structure
152+
153+
### Theme Configuration
154+
155+
```typescript
156+
interface ResumeTheme {
157+
id: string;
158+
name: string;
159+
description: string;
160+
industry?: string;
161+
colors: {
162+
light: ColorPalette;
163+
dark: ColorPalette;
164+
};
165+
fonts: FontConfiguration;
166+
spacing: SpacingScale;
167+
borderRadius: BorderRadiusScale;
168+
shadows: ShadowScale;
169+
layout: LayoutConfiguration;
170+
}
171+
```
172+
173+
### Color Palette
174+
175+
```typescript
176+
interface ColorPalette {
177+
primary: string; // Main brand color
178+
secondary: string; // Supporting color
179+
accent: string; // Highlight color
180+
background: string; // Page background
181+
surface: string; // Card/section background
182+
text: {
183+
primary: string; // Main text color
184+
secondary: string; // Secondary text color
185+
muted: string; // Muted text color
186+
};
187+
border: string; // Border color
188+
success: string; // Success state color
189+
warning: string; // Warning state color
190+
error: string; // Error state color
191+
}
192+
```
193+
194+
### Font Configuration
195+
196+
```typescript
197+
interface FontConfiguration {
198+
heading: {
199+
family: string;
200+
weight: number;
201+
size: {
202+
h1: string;
203+
h2: string;
204+
h3: string;
205+
};
206+
};
207+
body: {
208+
family: string;
209+
weight: number;
210+
size: string;
211+
lineHeight: string;
212+
};
213+
code: {
214+
family: string;
215+
size: string;
216+
};
217+
}
218+
```
219+
220+
## Predefined Themes
221+
222+
### Technology Themes
223+
- **Modern Tech**: Clean, minimal design with blue accents
224+
- **Startup**: Bold, energetic colors with modern typography
225+
- **Enterprise**: Professional, trustworthy design with corporate colors
226+
227+
### Creative Themes
228+
- **Creative Portfolio**: Vibrant, artistic color schemes
229+
- **Design Agency**: Sophisticated, design-focused aesthetics
230+
- **Freelancer**: Personal, approachable styling
231+
232+
### Professional Themes
233+
- **Corporate**: Traditional, conservative design
234+
- **Consulting**: Clean, professional appearance
235+
- **Finance**: Trustworthy, stable color schemes
236+
237+
### Industry-Specific Themes
238+
- **Healthcare**: Calming, trustworthy colors
239+
- **Education**: Friendly, accessible design
240+
- **Legal**: Professional, authoritative styling
241+
242+
## Customization Options
243+
244+
### Color Customization
245+
- Industry-based color suggestions
246+
- Personality-driven palette generation
247+
- Custom color input with harmony validation
248+
- Accessibility compliance checking
249+
- Brand color integration
250+
251+
### Typography Customization
252+
- Curated font pairing selection
253+
- Google Fonts integration
254+
- Custom font upload support
255+
- Typography scale adjustment
256+
- Readability optimization
257+
258+
### Layout Customization
259+
- Spacing scale configuration
260+
- Border radius settings
261+
- Shadow depth options
262+
- Layout width and padding
263+
- Section spacing control
264+
265+
## Accessibility Features
266+
267+
### WCAG Compliance
268+
- **AA Level**: Minimum 4.5:1 contrast ratio for normal text
269+
- **AAA Level**: Minimum 7:1 contrast ratio for enhanced accessibility
270+
- **Large Text**: Minimum 3:1 contrast ratio for 18pt+ text
271+
- **Color Independence**: Information not conveyed by color alone
272+
273+
### Validation Tools
274+
- Automatic contrast ratio calculation
275+
- Color blindness simulation
276+
- Accessibility score reporting
277+
- Compliance recommendations
278+
- Alternative color suggestions
279+
280+
## Performance Optimization
281+
282+
### Font Loading
283+
- Google Fonts API optimization
284+
- Font display swap for faster rendering
285+
- Preload critical fonts
286+
- Fallback font stacks
287+
- Font subsetting for reduced file size
288+
289+
### CSS Generation
290+
- Minimal CSS output
291+
- CSS custom properties for theming
292+
- Efficient selector usage
293+
- Critical CSS inlining
294+
- Unused style elimination
295+
296+
### Theme Switching
297+
- Smooth transitions between modes
298+
- State persistence in localStorage
299+
- Efficient DOM updates
300+
- Reduced layout thrashing
301+
- Optimized color calculations
302+
303+
## Browser Support
304+
305+
- **Modern Browsers**: Chrome 80+, Firefox 75+, Safari 13+, Edge 80+
306+
- **CSS Features**: Custom properties, CSS Grid, Flexbox
307+
- **JavaScript Features**: ES2020, Async/await, Modules
308+
- **Fallbacks**: Graceful degradation for older browsers
309+
310+
## Contributing
311+
312+
### Adding New Themes
313+
1. Create theme configuration in `theme-engine.ts`
314+
2. Add industry-specific colors to `color-generator.ts`
315+
3. Include font pairings in `font-manager.ts`
316+
4. Test accessibility compliance
317+
5. Update documentation
318+
319+
### Adding Font Pairings
320+
1. Research font compatibility and licensing
321+
2. Test readability across different sizes
322+
3. Verify Google Fonts availability
323+
4. Add to font pairing database
324+
5. Include fallback fonts
325+
326+
### Extending Color Generation
327+
1. Research industry color psychology
328+
2. Implement color harmony algorithms
329+
3. Add accessibility validation
330+
4. Test across different personalities
331+
5. Document color reasoning
332+
333+
## License
334+
335+
MIT License - see LICENSE file for details.
336+
337+
## Support
338+
339+
For issues, feature requests, or questions:
340+
- Create an issue on GitHub
341+
- Check existing documentation
342+
- Review accessibility guidelines
343+
- Test theme configurations
344+
345+
---
346+
347+
**Built with ❤️ for creating beautiful, accessible resumes**

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,26 @@ npx bharathkumar-palanisamy --section personal experience
2828
npx bharathkumar-palanisamy --format plain --output my-resume.txt
2929
npx bharathkumar-palanisamy --format html --output resume.html
3030
npx bharathkumar-palanisamy --format pdf --output resume.pdf
31+
32+
## Enhanced Export Formats
33+
34+
New specialized export formats for different use cases:
35+
36+
```bash
37+
# JSON-LD Schema for SEO optimization
38+
npx bharathkumar-palanisamy --format jsonld --output resume.jsonld
39+
40+
# ATS-friendly format for job applications
41+
npx bharathkumar-palanisamy --format ats --output resume-ats.txt
42+
43+
# Portfolio website generator
44+
npx bharathkumar-palanisamy --format portfolio --output portfolio.html
45+
46+
# REST API specification
47+
npx bharathkumar-palanisamy --format api --output api-spec.json
48+
```
49+
50+
For detailed documentation, see [Enhanced Export Formats](./docs/ENHANCED_EXPORT_FORMATS.md).
3151
```
3252
## Local testing
3353

dist/cli/theme-cli.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Command } from 'commander';
2+
export declare class ThemeCLI {
3+
private program;
4+
constructor();
5+
private setupCommands;
6+
listThemes(): Promise<void>;
7+
createFromTemplate(options: any): Promise<void>;
8+
createCustomTheme(options: any): Promise<void>;
9+
createBrandTheme(options: any): Promise<void>;
10+
generateColors(options: any): Promise<void>;
11+
listFonts(options: any): Promise<void>;
12+
previewTheme(options: any): Promise<void>;
13+
validateTheme(themePath: string): Promise<void>;
14+
interactiveBuilder(): Promise<void>;
15+
private saveTheme;
16+
run(args: string[]): void;
17+
}
18+
export declare function registerThemeCommands(program: Command): void;
19+
//# sourceMappingURL=theme-cli.d.ts.map

dist/cli/theme-cli.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)