@indirecttek/essentials-engine 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +397 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
# @indirecttek/essentials-engine
|
|
2
|
+
|
|
3
|
+
A **white-label, config-driven Astro component library** for rapidly building beautiful marketing websites for small businesses. Define your content and branding in a single configuration file, and Essentials Engine handles the rest.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@indirecttek/essentials-engine)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## ✨ Features
|
|
11
|
+
|
|
12
|
+
- **Config-Driven Architecture** – One configuration file powers your entire site
|
|
13
|
+
- **Zero Client-Side JavaScript** – 100% static output for blazing-fast performance
|
|
14
|
+
- **CSS Variable Theming** – Full control over colors with automatic propagation
|
|
15
|
+
- **Responsive by Default** – Mobile-first design that looks great on all devices
|
|
16
|
+
- **Modern Aesthetics** – Polished shadows, hover effects, and smooth transitions
|
|
17
|
+
- **Flexible Layouts** – Multiple hero styles, sticky navigation, and more
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 📦 Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @indirecttek/essentials-engine
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Peer Dependencies
|
|
28
|
+
|
|
29
|
+
Ensure your project has Astro and Tailwind CSS installed:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install astro tailwindcss
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Compatibility:**
|
|
36
|
+
- Astro 4.x or 5.x
|
|
37
|
+
- Tailwind CSS 3.x or 4.x
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🚀 Quick Start
|
|
42
|
+
|
|
43
|
+
### 1. Create Your Site Configuration
|
|
44
|
+
|
|
45
|
+
Create a configuration file (e.g., `src/config/siteConfig.ts`):
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import type { SiteConfig } from '@indirecttek/essentials-engine';
|
|
49
|
+
|
|
50
|
+
export const siteConfig: SiteConfig = {
|
|
51
|
+
businessName: "Raleigh Pro Landscaping",
|
|
52
|
+
|
|
53
|
+
theme: {
|
|
54
|
+
primary: "#2d5a27", // Forest green
|
|
55
|
+
secondary: "#e8f5e3", // Light sage
|
|
56
|
+
accent: "#f4a460", // Sandy brown
|
|
57
|
+
background: "#ffffff",
|
|
58
|
+
foreground: "#1a1a1a",
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
contactInfo: {
|
|
62
|
+
phone: "(919) 555-0123",
|
|
63
|
+
email: "hello@raleighprolandscaping.com",
|
|
64
|
+
address: "123 Oak Street, Raleigh, NC 27601",
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
heroSection: {
|
|
68
|
+
headline: "Transform Your Outdoor Space",
|
|
69
|
+
subheadline: "Professional landscaping services for homes and businesses in the Triangle area.",
|
|
70
|
+
imageUrl: "/images/hero-garden.jpg",
|
|
71
|
+
imageAlt: "Beautiful landscaped garden with flowers",
|
|
72
|
+
callToActionLabel: "Get a Free Quote",
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
services: [
|
|
76
|
+
{ name: "Lawn Care", description: "Weekly mowing, edging, and seasonal treatments to keep your lawn lush and healthy." },
|
|
77
|
+
{ name: "Garden Design", description: "Custom garden layouts with native plants, flowers, and decorative elements." },
|
|
78
|
+
{ name: "Hardscaping", description: "Patios, walkways, retaining walls, and outdoor living spaces." },
|
|
79
|
+
],
|
|
80
|
+
|
|
81
|
+
seo: {
|
|
82
|
+
title: "Raleigh Pro Landscaping | Professional Lawn & Garden Services",
|
|
83
|
+
description: "Transform your outdoor space with Raleigh's most trusted landscaping company. Lawn care, garden design, and hardscaping.",
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
analytics: {
|
|
87
|
+
enableTracking: false,
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
// Optional features
|
|
91
|
+
socialLinks: {
|
|
92
|
+
facebook: "https://facebook.com/raleighprolandscaping",
|
|
93
|
+
instagram: "https://instagram.com/raleighprolandscaping",
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
layoutOptions: {
|
|
97
|
+
heroLayout: "image-right", // "image-left" | "image-right" | "full-width"
|
|
98
|
+
stickyNav: true,
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 2. Use the Layout in Your Page
|
|
104
|
+
|
|
105
|
+
Create your homepage (`src/pages/index.astro`):
|
|
106
|
+
|
|
107
|
+
```astro
|
|
108
|
+
---
|
|
109
|
+
import { EssentialsLayout } from '@indirecttek/essentials-engine';
|
|
110
|
+
import { siteConfig } from '../config/siteConfig';
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
<EssentialsLayout config={siteConfig} />
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
That's it! You now have a complete, professional marketing website.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 🧩 Components
|
|
121
|
+
|
|
122
|
+
Essentials Engine provides both a full-page layout and individual components for flexibility.
|
|
123
|
+
|
|
124
|
+
### Full-Page Layout
|
|
125
|
+
|
|
126
|
+
```astro
|
|
127
|
+
---
|
|
128
|
+
import { EssentialsLayout } from '@indirecttek/essentials-engine';
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
<EssentialsLayout config={siteConfig} />
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Renders a complete page with: `Navbar` → `Hero` → `ServicesGrid` → `ContactForm` → `Footer`
|
|
135
|
+
|
|
136
|
+
### Individual Components
|
|
137
|
+
|
|
138
|
+
Use components individually for custom page structures:
|
|
139
|
+
|
|
140
|
+
```astro
|
|
141
|
+
---
|
|
142
|
+
import { Navbar, Hero, ServicesGrid, ContactForm, Footer } from '@indirecttek/essentials-engine';
|
|
143
|
+
import { siteConfig } from '../config/siteConfig';
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
<html lang="en">
|
|
147
|
+
<body>
|
|
148
|
+
<Navbar config={siteConfig} />
|
|
149
|
+
<Hero config={siteConfig} />
|
|
150
|
+
|
|
151
|
+
<!-- Your custom content here -->
|
|
152
|
+
<section class="py-16">
|
|
153
|
+
<h2>Why Choose Us?</h2>
|
|
154
|
+
<!-- ... -->
|
|
155
|
+
</section>
|
|
156
|
+
|
|
157
|
+
<ServicesGrid config={siteConfig} />
|
|
158
|
+
<ContactForm config={siteConfig} />
|
|
159
|
+
<Footer config={siteConfig} />
|
|
160
|
+
</body>
|
|
161
|
+
</html>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Component Reference
|
|
165
|
+
|
|
166
|
+
| Component | Description |
|
|
167
|
+
|-----------|-------------|
|
|
168
|
+
| `EssentialsLayout` | Full-page wrapper with HTML head, all sections, and theme injection |
|
|
169
|
+
| `Navbar` | Header with business name, click-to-call, and "Contact Us" CTA |
|
|
170
|
+
| `Hero` | Above-the-fold section with headline, subheadline, image, and CTA |
|
|
171
|
+
| `ServicesGrid` | Responsive grid of service cards with hover effects |
|
|
172
|
+
| `ContactForm` | Lead capture form with name, email, phone, and message fields |
|
|
173
|
+
| `Footer` | Site footer with contact info, social icons, and copyright |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 🎨 Theming
|
|
178
|
+
|
|
179
|
+
Colors are defined in the `theme` object and automatically applied throughout the site using CSS variables.
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
theme: {
|
|
183
|
+
primary: "#2d5a27", // Brand color, used for headings, nav, buttons
|
|
184
|
+
secondary: "#e8f5e3", // Section backgrounds (e.g., services grid)
|
|
185
|
+
accent: "#f4a460", // CTA buttons, highlights
|
|
186
|
+
background: "#ffffff", // Page background
|
|
187
|
+
foreground: "#1a1a1a", // Body text
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Using Theme Colors in Custom Components
|
|
192
|
+
|
|
193
|
+
The theme colors are available as CSS variables:
|
|
194
|
+
|
|
195
|
+
```css
|
|
196
|
+
.my-custom-element {
|
|
197
|
+
background-color: var(--color-primary);
|
|
198
|
+
color: var(--color-background);
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Or with Tailwind's arbitrary value syntax:
|
|
203
|
+
|
|
204
|
+
```html
|
|
205
|
+
<div class="bg-[color:var(--color-accent)] text-[color:var(--color-foreground)]">
|
|
206
|
+
Custom styled element
|
|
207
|
+
</div>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 🖼️ Hero Layouts
|
|
213
|
+
|
|
214
|
+
The Hero component supports three layout modes:
|
|
215
|
+
|
|
216
|
+
### Image Right (Default)
|
|
217
|
+
```typescript
|
|
218
|
+
layoutOptions: {
|
|
219
|
+
heroLayout: "image-right",
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
Text on the left, image on the right – great for text-focused messaging.
|
|
223
|
+
|
|
224
|
+
### Image Left
|
|
225
|
+
```typescript
|
|
226
|
+
layoutOptions: {
|
|
227
|
+
heroLayout: "image-left",
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
Image on the left, text on the right – ideal for showcasing visuals.
|
|
231
|
+
|
|
232
|
+
### Full Width
|
|
233
|
+
```typescript
|
|
234
|
+
layoutOptions: {
|
|
235
|
+
heroLayout: "full-width",
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
Full-bleed background image with centered text overlay – high-impact hero style.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 📱 Responsive Design
|
|
243
|
+
|
|
244
|
+
All components are mobile-first and responsive:
|
|
245
|
+
|
|
246
|
+
- **Navbar**: Stacks phone number, hides "Contact Us" button on mobile
|
|
247
|
+
- **Hero**: Single column on mobile, side-by-side on desktop
|
|
248
|
+
- **ServicesGrid**: 1 column → 2 columns → 3 columns as screen grows
|
|
249
|
+
- **ContactForm**: Fields stack on mobile
|
|
250
|
+
- **Footer**: 3-column layout collapses to single column on mobile
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## 📋 Configuration Reference
|
|
255
|
+
|
|
256
|
+
### SiteConfig Interface
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
interface SiteConfig {
|
|
260
|
+
businessName: string;
|
|
261
|
+
theme: Theme;
|
|
262
|
+
contactInfo: ContactInfo;
|
|
263
|
+
heroSection: HeroSection;
|
|
264
|
+
services: Service[];
|
|
265
|
+
analytics: AnalyticsConfig;
|
|
266
|
+
seo: SEOConfig;
|
|
267
|
+
imageSearchHints?: ImageSearchHints; // Optional
|
|
268
|
+
socialLinks?: SocialLinks; // Optional
|
|
269
|
+
layoutOptions?: LayoutOptions; // Optional
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Theme
|
|
274
|
+
|
|
275
|
+
| Property | Type | Description |
|
|
276
|
+
|----------|------|-------------|
|
|
277
|
+
| `primary` | `string` | Brand color for headings, nav, primary buttons |
|
|
278
|
+
| `secondary` | `string` | Section backgrounds, subtle accents |
|
|
279
|
+
| `accent` | `string` | CTA buttons, highlights |
|
|
280
|
+
| `background` | `string` | Page background color |
|
|
281
|
+
| `foreground` | `string` | Body text color |
|
|
282
|
+
|
|
283
|
+
### ContactInfo
|
|
284
|
+
|
|
285
|
+
| Property | Type | Description |
|
|
286
|
+
|----------|------|-------------|
|
|
287
|
+
| `phone` | `string` | Phone number (auto-linked as `tel:`) |
|
|
288
|
+
| `email` | `string` | Email address (auto-linked as `mailto:`) |
|
|
289
|
+
| `address` | `string` | Physical address |
|
|
290
|
+
|
|
291
|
+
### HeroSection
|
|
292
|
+
|
|
293
|
+
| Property | Type | Description |
|
|
294
|
+
|----------|------|-------------|
|
|
295
|
+
| `headline` | `string` | Main headline text |
|
|
296
|
+
| `subheadline` | `string` | Supporting text below headline |
|
|
297
|
+
| `imageUrl` | `string` | Path or URL to hero image |
|
|
298
|
+
| `imageAlt` | `string` | Alt text for hero image |
|
|
299
|
+
| `callToActionLabel` | `string` | Text for CTA button |
|
|
300
|
+
|
|
301
|
+
### Service
|
|
302
|
+
|
|
303
|
+
| Property | Type | Description |
|
|
304
|
+
|----------|------|-------------|
|
|
305
|
+
| `name` | `string` | Service name |
|
|
306
|
+
| `description` | `string` | Service description |
|
|
307
|
+
|
|
308
|
+
### SEOConfig
|
|
309
|
+
|
|
310
|
+
| Property | Type | Description |
|
|
311
|
+
|----------|------|-------------|
|
|
312
|
+
| `title` | `string` | Page title (appears in browser tab) |
|
|
313
|
+
| `description` | `string` | Meta description for search engines |
|
|
314
|
+
|
|
315
|
+
### AnalyticsConfig
|
|
316
|
+
|
|
317
|
+
| Property | Type | Description |
|
|
318
|
+
|----------|------|-------------|
|
|
319
|
+
| `enableTracking` | `boolean` | Enable/disable analytics |
|
|
320
|
+
| `mixpanelToken` | `string` | Optional Mixpanel project token |
|
|
321
|
+
|
|
322
|
+
### SocialLinks (Optional)
|
|
323
|
+
|
|
324
|
+
| Property | Type | Description |
|
|
325
|
+
|----------|------|-------------|
|
|
326
|
+
| `facebook` | `string` | Facebook page URL |
|
|
327
|
+
| `instagram` | `string` | Instagram profile URL |
|
|
328
|
+
| `twitter` | `string` | Twitter/X profile URL |
|
|
329
|
+
| `linkedin` | `string` | LinkedIn page URL |
|
|
330
|
+
| `youtube` | `string` | YouTube channel URL |
|
|
331
|
+
| `tiktok` | `string` | TikTok profile URL |
|
|
332
|
+
|
|
333
|
+
### LayoutOptions (Optional)
|
|
334
|
+
|
|
335
|
+
| Property | Type | Default | Description |
|
|
336
|
+
|----------|------|---------|-------------|
|
|
337
|
+
| `heroLayout` | `"image-left"` \| `"image-right"` \| `"full-width"` | `"image-right"` | Hero section layout style |
|
|
338
|
+
| `stickyNav` | `boolean` | `false` | Make navbar stick to top on scroll |
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## 📁 Project Structure
|
|
343
|
+
|
|
344
|
+
```
|
|
345
|
+
@indirecttek/essentials-engine/
|
|
346
|
+
├── dist/ # Built package (published to npm)
|
|
347
|
+
│ ├── components/
|
|
348
|
+
│ │ ├── ContactForm.astro
|
|
349
|
+
│ │ ├── Footer.astro
|
|
350
|
+
│ │ ├── Hero.astro
|
|
351
|
+
│ │ ├── Navbar.astro
|
|
352
|
+
│ │ └── ServicesGrid.astro
|
|
353
|
+
│ ├── layouts/
|
|
354
|
+
│ │ └── EssentialsLayout.astro
|
|
355
|
+
│ ├── index.ts # Main exports
|
|
356
|
+
│ └── types.ts # TypeScript interfaces
|
|
357
|
+
├── src/ # Source files
|
|
358
|
+
├── package.json
|
|
359
|
+
└── README.md
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## 🔧 Development
|
|
365
|
+
|
|
366
|
+
Clone and install:
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
git clone https://github.com/indirecttek/essentials-engine.git
|
|
370
|
+
cd essentials-engine
|
|
371
|
+
npm install
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Build the package:
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
npm run build
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## 📄 License
|
|
383
|
+
|
|
384
|
+
MIT © [IndirectTek](https://indirecttek.com)
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## 🤝 Contributing
|
|
389
|
+
|
|
390
|
+
Contributions are welcome! Please open an issue or submit a pull request.
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## 💬 Support
|
|
395
|
+
|
|
396
|
+
- **Issues**: [GitHub Issues](https://github.com/indirecttek/essentials-engine/issues)
|
|
397
|
+
- **Email**: support@indirecttek.com
|