@zoyth/simple-site-framework 1.0.0

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.
Files changed (166) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +572 -0
  3. package/bin/create-simple-site.js +390 -0
  4. package/bin/simple-site.js +664 -0
  5. package/dist/client.js +135 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/client.mjs +107 -0
  8. package/dist/client.mjs.map +1 -0
  9. package/dist/components/index.d.mts +3936 -0
  10. package/dist/components/index.d.ts +3936 -0
  11. package/dist/components/index.js +38265 -0
  12. package/dist/components/index.js.map +1 -0
  13. package/dist/components/index.mjs +38173 -0
  14. package/dist/components/index.mjs.map +1 -0
  15. package/dist/config/index.d.mts +298 -0
  16. package/dist/config/index.d.ts +298 -0
  17. package/dist/config/index.js +19 -0
  18. package/dist/config/index.js.map +1 -0
  19. package/dist/config/index.mjs +1 -0
  20. package/dist/config/index.mjs.map +1 -0
  21. package/dist/index.d.mts +2184 -0
  22. package/dist/index.d.ts +2184 -0
  23. package/dist/index.js +1713 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/index.mjs +1605 -0
  26. package/dist/index.mjs.map +1 -0
  27. package/dist/lib/i18n/index.js +665 -0
  28. package/dist/lib/i18n/index.js.map +1 -0
  29. package/dist/lib/i18n/index.mjs +621 -0
  30. package/dist/lib/i18n/index.mjs.map +1 -0
  31. package/docs/DOCUMENTATION-STRUCTURE.md +1156 -0
  32. package/docs/EXPORTS.md +125 -0
  33. package/docs/PERFORMANCE.md +757 -0
  34. package/docs/POLICY-PAGES.md +867 -0
  35. package/docs/ROADMAP.md +334 -0
  36. package/docs/SEO.md +455 -0
  37. package/docs/SITEMAP.md +708 -0
  38. package/docs/STRUCTURED-DATA.md +671 -0
  39. package/docs/accessibility/common-patterns.md +529 -0
  40. package/docs/accessibility/keyboard-navigation.md +263 -0
  41. package/docs/accessibility/overview.md +122 -0
  42. package/docs/accessibility/screen-readers.md +311 -0
  43. package/docs/accessibility/wcag-compliance.md +159 -0
  44. package/docs/api/README.md +164 -0
  45. package/docs/api/components/Accessibility.md +356 -0
  46. package/docs/api/components/Button.md +240 -0
  47. package/docs/api/components/HeroSection.md +306 -0
  48. package/docs/architecture/decisions.md +449 -0
  49. package/docs/components/AnalyticsTracker.md +58 -0
  50. package/docs/components/AnimatedCounter.md +48 -0
  51. package/docs/components/AnimatedSection.md +56 -0
  52. package/docs/components/BlogCard.md +42 -0
  53. package/docs/components/Checkbox.md +56 -0
  54. package/docs/components/CodeBlock.md +52 -0
  55. package/docs/components/ComparisonTable.md +40 -0
  56. package/docs/components/ComponentDemo.md +38 -0
  57. package/docs/components/CountdownTimer.md +51 -0
  58. package/docs/components/ExitIntentModal.md +56 -0
  59. package/docs/components/FAQAccordion.md +66 -0
  60. package/docs/components/FeaturesGrid.md +55 -0
  61. package/docs/components/FileUpload.md +54 -0
  62. package/docs/components/I18nMetaTags.md +55 -0
  63. package/docs/components/Icon.md +53 -0
  64. package/docs/components/LazySection.md +46 -0
  65. package/docs/components/LiveProof.md +53 -0
  66. package/docs/components/LoadingSpinner.md +46 -0
  67. package/docs/components/MultiStepForm.md +48 -0
  68. package/docs/components/PolicyLayout.md +55 -0
  69. package/docs/components/PricingTable.md +49 -0
  70. package/docs/components/Radio.md +59 -0
  71. package/docs/components/SEOMetaTags.md +58 -0
  72. package/docs/components/ScriptInjector.md +50 -0
  73. package/docs/components/Select.md +72 -0
  74. package/docs/components/Skeleton.md +47 -0
  75. package/docs/components/StatsSection.md +48 -0
  76. package/docs/components/StickyBar.md +62 -0
  77. package/docs/components/StructuredData.md +99 -0
  78. package/docs/components/StyleGuide.md +46 -0
  79. package/docs/components/TableOfContents.md +47 -0
  80. package/docs/components/TestimonialCarousel.md +42 -0
  81. package/docs/components/Timeline.md +51 -0
  82. package/docs/components/Toast.md +59 -0
  83. package/docs/components/TrackedLink.md +62 -0
  84. package/docs/components/TrustBadges.md +44 -0
  85. package/docs/components/conversion/MobileCTA.md +363 -0
  86. package/docs/components/forms/ContactForm.md +75 -0
  87. package/docs/components/forms/FormField.md +74 -0
  88. package/docs/components/layout/Footer.md +601 -0
  89. package/docs/components/layout/Header.md +549 -0
  90. package/docs/components/layout/LanguageSelector.md +54 -0
  91. package/docs/components/layout/LanguageSwitcher.md +24 -0
  92. package/docs/components/overview.md +447 -0
  93. package/docs/components/sections/AboutSection.md +48 -0
  94. package/docs/components/sections/CTASection.md +596 -0
  95. package/docs/components/sections/CaseStudySection.md +47 -0
  96. package/docs/components/sections/ContactSection.md +599 -0
  97. package/docs/components/sections/FeatureSection.md +44 -0
  98. package/docs/components/sections/HeroSection.md +404 -0
  99. package/docs/components/sections/LogosSection.md +47 -0
  100. package/docs/components/sections/PersonalTaxesSection.md +23 -0
  101. package/docs/components/sections/RecruitingSection.md +23 -0
  102. package/docs/components/sections/SecurePortalSection.md +23 -0
  103. package/docs/components/sections/ServicePageLayout.md +52 -0
  104. package/docs/components/sections/ServicesSection.md +49 -0
  105. package/docs/components/sections/TestimonialSection.md +44 -0
  106. package/docs/components/sections/WhyChooseUsSection.md +54 -0
  107. package/docs/components/ui/Breadcrumb.md +70 -0
  108. package/docs/components/ui/Button.md +514 -0
  109. package/docs/components/ui/Card.md +501 -0
  110. package/docs/components/ui/Input.md +54 -0
  111. package/docs/components/ui/MobileLinks.md +43 -0
  112. package/docs/components/ui/Modal.md +60 -0
  113. package/docs/components/ui/Tabs.md +62 -0
  114. package/docs/components/ui/Textarea.md +52 -0
  115. package/docs/core-concepts/configuration-driven.md +552 -0
  116. package/docs/core-concepts/overview.md +351 -0
  117. package/docs/features/accessibility/README.md +73 -0
  118. package/docs/features/accessibility/aria-support.md +177 -0
  119. package/docs/features/accessibility/color-contrast.md +155 -0
  120. package/docs/features/accessibility/focus-management.md +187 -0
  121. package/docs/features/accessibility/testing.md +196 -0
  122. package/docs/features/analytics/README.md +51 -0
  123. package/docs/features/analytics/ab-testing.md +171 -0
  124. package/docs/features/analytics/conversion-tracking.md +207 -0
  125. package/docs/features/analytics/custom-events.md +219 -0
  126. package/docs/features/analytics/privacy.md +198 -0
  127. package/docs/features/analytics/setup.md +114 -0
  128. package/docs/features/analytics/tracking-events.md +224 -0
  129. package/docs/features/i18n/README.md +51 -0
  130. package/docs/features/i18n/best-practices.md +273 -0
  131. package/docs/features/i18n/configuration.md +84 -0
  132. package/docs/features/i18n/formatting.md +133 -0
  133. package/docs/features/i18n/locale-detection.md +122 -0
  134. package/docs/features/i18n/routing.md +99 -0
  135. package/docs/features/i18n/rtl-support.md +191 -0
  136. package/docs/features/i18n/translations.md +129 -0
  137. package/docs/features/internationalization.md +595 -0
  138. package/docs/features/performance/README.md +77 -0
  139. package/docs/features/performance/bundle-size.md +134 -0
  140. package/docs/features/performance/caching.md +131 -0
  141. package/docs/features/performance/code-splitting.md +121 -0
  142. package/docs/features/performance/image-optimization.md +110 -0
  143. package/docs/features/performance/lazy-loading.md +92 -0
  144. package/docs/features/performance/monitoring.md +148 -0
  145. package/docs/features/seo/README.md +51 -0
  146. package/docs/features/seo/best-practices.md +184 -0
  147. package/docs/features/seo/canonical-urls.md +182 -0
  148. package/docs/features/seo/meta-tags.md +126 -0
  149. package/docs/features/seo/open-graph.md +166 -0
  150. package/docs/features/seo/robots-txt.md +146 -0
  151. package/docs/features/seo/sitemaps.md +162 -0
  152. package/docs/features/seo/structured-data.md +166 -0
  153. package/docs/getting-started/installation.md +292 -0
  154. package/docs/getting-started/introduction.md +195 -0
  155. package/docs/getting-started/quick-start.md +460 -0
  156. package/docs/guides/analytics-setup.md +616 -0
  157. package/docs/i18n/CONFIGURATION.md +353 -0
  158. package/docs/i18n/EXAMPLES.md +402 -0
  159. package/docs/i18n/MIGRATION.md +260 -0
  160. package/docs/i18n/SEO.md +392 -0
  161. package/docs/i18n/STATIC-GENERATION-FIX.md +71 -0
  162. package/docs/migration/changelog.md +136 -0
  163. package/docs/migration/overview.md +233 -0
  164. package/docs/recipes/adding-animations.md +475 -0
  165. package/docs/recipes/forms-with-validation.md +393 -0
  166. package/package.json +152 -0
@@ -0,0 +1,460 @@
1
+ # Quick Start Guide
2
+
3
+ Build your first page with Simple Site Framework in 5 minutes.
4
+
5
+ ## Prerequisites
6
+
7
+ You should have completed **[Installation](./installation.md)** and have:
8
+ - ✅ Next.js 14+ project with App Router
9
+ - ✅ Simple Site Framework installed
10
+ - ✅ Tailwind CSS configured with framework in `content` array
11
+ - ✅ Theme tokens defined in `tailwind.config.ts`
12
+
13
+ ## Step 1: Create Your First Page
14
+
15
+ Create a homepage with a hero section:
16
+
17
+ ```typescript
18
+ // src/app/page.tsx
19
+ import { HeroSection } from '@zoyth/simple-site-framework';
20
+
21
+ export default function HomePage() {
22
+ return (
23
+ <main>
24
+ <HeroSection
25
+ heading="Transform Your Business"
26
+ description="Professional consulting services that deliver real results"
27
+ cta={{
28
+ text: 'Get Started',
29
+ href: '/contact'
30
+ }}
31
+ variant="centered"
32
+ />
33
+ </main>
34
+ );
35
+ }
36
+ ```
37
+
38
+ **Run it:**
39
+ ```bash
40
+ npm run dev
41
+ ```
42
+
43
+ Visit `http://localhost:3000` - you should see a styled hero section.
44
+
45
+ ## Step 2: Add More Sections
46
+
47
+ Build a complete landing page by stacking sections:
48
+
49
+ ```typescript
50
+ // src/app/page.tsx
51
+ import {
52
+ HeroSection,
53
+ FeaturesGrid,
54
+ TestimonialSection,
55
+ CTASection,
56
+ } from '@zoyth/simple-site-framework';
57
+
58
+ export default function HomePage() {
59
+ return (
60
+ <main>
61
+ <HeroSection
62
+ heading="Transform Your Business"
63
+ description="Professional consulting services that deliver real results"
64
+ cta={{
65
+ text: 'Get Started',
66
+ href: '/contact'
67
+ }}
68
+ variant="centered"
69
+ />
70
+
71
+ <FeaturesGrid
72
+ heading="Why Choose Us"
73
+ description="We deliver exceptional results through proven expertise"
74
+ features={[
75
+ {
76
+ title: 'Expert Team',
77
+ description: '15+ years of combined experience',
78
+ icon: 'users',
79
+ },
80
+ {
81
+ title: 'Proven Results',
82
+ description: 'Over 200 successful projects delivered',
83
+ icon: 'chart',
84
+ },
85
+ {
86
+ title: 'Fast Delivery',
87
+ description: 'Average project completion in 6 weeks',
88
+ icon: 'clock',
89
+ },
90
+ ]}
91
+ columns={3}
92
+ />
93
+
94
+ <TestimonialSection
95
+ heading="What Our Clients Say"
96
+ testimonials={[
97
+ {
98
+ quote: 'Working with this team transformed our business. Revenue increased 300% in 6 months.',
99
+ author: 'Jane Smith',
100
+ role: 'CEO',
101
+ company: 'Tech Startup Inc',
102
+ },
103
+ ]}
104
+ />
105
+
106
+ <CTASection
107
+ heading="Ready to Get Started?"
108
+ description="Join hundreds of satisfied clients"
109
+ primaryCTA={{
110
+ text: 'Start Free Trial',
111
+ href: '/signup',
112
+ }}
113
+ secondaryCTA={{
114
+ text: 'View Pricing',
115
+ href: '/pricing',
116
+ }}
117
+ />
118
+ </main>
119
+ );
120
+ }
121
+ ```
122
+
123
+ ## Step 3: Add Layout Components
124
+
125
+ Wrap your pages with Header and Footer:
126
+
127
+ ```typescript
128
+ // src/app/layout.tsx
129
+ import { Header, Footer } from '@zoyth/simple-site-framework';
130
+ import './globals.css';
131
+
132
+ export default function RootLayout({
133
+ children,
134
+ }: {
135
+ children: React.ReactNode;
136
+ }) {
137
+ return (
138
+ <html lang="en">
139
+ <body>
140
+ <Header
141
+ logo={{
142
+ src: '/logo.svg',
143
+ alt: 'Company Logo',
144
+ width: 150,
145
+ height: 40,
146
+ }}
147
+ navigation={[
148
+ { label: 'Home', href: '/' },
149
+ { label: 'About', href: '/about' },
150
+ { label: 'Services', href: '/services' },
151
+ { label: 'Contact', href: '/contact' },
152
+ ]}
153
+ cta={{
154
+ text: 'Get Started',
155
+ href: '/contact',
156
+ }}
157
+ />
158
+
159
+ {children}
160
+
161
+ <Footer
162
+ companyName="Your Company"
163
+ tagline="Professional services that deliver"
164
+ sections={[
165
+ {
166
+ title: 'Company',
167
+ links: [
168
+ { label: 'About', href: '/about' },
169
+ { label: 'Careers', href: '/careers' },
170
+ { label: 'Contact', href: '/contact' },
171
+ ],
172
+ },
173
+ {
174
+ title: 'Legal',
175
+ links: [
176
+ { label: 'Privacy Policy', href: '/privacy' },
177
+ { label: 'Terms of Service', href: '/terms' },
178
+ ],
179
+ },
180
+ ]}
181
+ socialLinks={[
182
+ { platform: 'twitter', url: 'https://twitter.com/yourcompany' },
183
+ { platform: 'linkedin', url: 'https://linkedin.com/company/yourcompany' },
184
+ ]}
185
+ />
186
+ </body>
187
+ </html>
188
+ );
189
+ }
190
+ ```
191
+
192
+ ## Step 4: Add a Contact Page
193
+
194
+ Create a contact page with a form:
195
+
196
+ ```typescript
197
+ // src/app/contact/page.tsx
198
+ import { ContactSection } from '@zoyth/simple-site-framework';
199
+
200
+ export default function ContactPage() {
201
+ return (
202
+ <main>
203
+ <ContactSection
204
+ heading="Get in Touch"
205
+ description="We'd love to hear from you"
206
+ email="contact@yourcompany.com"
207
+ phone="+1 (555) 123-4567"
208
+ locations={[
209
+ {
210
+ city: 'New York',
211
+ address: '123 Main St, Suite 100',
212
+ mapUrl: 'https://maps.google.com/?q=123+Main+St+New+York',
213
+ },
214
+ ]}
215
+ formConfig={{
216
+ fields: [
217
+ { name: 'name', type: 'text', label: 'Full Name', required: true },
218
+ { name: 'email', type: 'email', label: 'Email', required: true },
219
+ { name: 'company', type: 'text', label: 'Company' },
220
+ { name: 'message', type: 'textarea', label: 'Message', required: true },
221
+ ],
222
+ submitText: 'Send Message',
223
+ successMessage: 'Thanks! We\'ll get back to you within 24 hours.',
224
+ }}
225
+ />
226
+ </main>
227
+ );
228
+ }
229
+ ```
230
+
231
+ ## Step 5: Customize Your Theme
232
+
233
+ Update your theme tokens to match your brand:
234
+
235
+ ```typescript
236
+ // tailwind.config.ts
237
+ const config: Config = {
238
+ theme: {
239
+ extend: {
240
+ colors: {
241
+ // Your brand colors
242
+ primary: '#0066CC',
243
+ 'primary-hover': '#0052A3',
244
+ secondary: '#1A1A1A',
245
+ 'secondary-hover': '#000000',
246
+ },
247
+ fontFamily: {
248
+ // Your brand fonts
249
+ heading: ['Montserrat', 'sans-serif'],
250
+ body: ['Open Sans', 'sans-serif'],
251
+ },
252
+ },
253
+ },
254
+ };
255
+ ```
256
+
257
+ Load your fonts:
258
+
259
+ ```typescript
260
+ // src/app/layout.tsx
261
+ import { Montserrat, Open_Sans } from 'next/font/google';
262
+
263
+ const montserrat = Montserrat({
264
+ subsets: ['latin'],
265
+ variable: '--font-heading',
266
+ });
267
+
268
+ const openSans = Open_Sans({
269
+ subsets: ['latin'],
270
+ variable: '--font-body',
271
+ });
272
+
273
+ // Apply to <html> tag
274
+ <html className={`${montserrat.variable} ${openSans.variable}`}>
275
+ ```
276
+
277
+ ## What You've Built
278
+
279
+ In 5 minutes, you've created:
280
+
281
+ - ✅ A complete homepage with hero, features, testimonials, and CTA
282
+ - ✅ Consistent header and footer across all pages
283
+ - ✅ A working contact form with validation
284
+ - ✅ Custom branding with your colors and fonts
285
+ - ✅ Fully responsive, accessible components
286
+ - ✅ SEO-optimized, server-rendered pages
287
+
288
+ ## Next Steps
289
+
290
+ ### Add Multi-Language Support
291
+
292
+ ```typescript
293
+ // src/config/i18n.ts
294
+ export const i18nConfig = {
295
+ locales: ['en', 'fr'],
296
+ defaultLocale: 'en',
297
+ };
298
+ ```
299
+
300
+ Then use `LocalizedString` for all content:
301
+
302
+ ```typescript
303
+ <HeroSection
304
+ heading={{
305
+ en: 'Transform Your Business',
306
+ fr: 'Transformez votre entreprise'
307
+ }}
308
+ cta={{
309
+ text: { en: 'Get Started', fr: 'Commencer' },
310
+ href: '/contact'
311
+ }}
312
+ locale={locale}
313
+ />
314
+ ```
315
+
316
+ See **[Internationalization](../features/internationalization.md)** for complete setup.
317
+
318
+ ### Add Analytics
319
+
320
+ Track page views and conversions:
321
+
322
+ ```typescript
323
+ // src/app/layout.tsx
324
+ import { AnalyticsTracker } from '@zoyth/simple-site-framework/client';
325
+
326
+ export default function RootLayout({ children }) {
327
+ return (
328
+ <html>
329
+ <body>
330
+ <AnalyticsTracker />
331
+ {children}
332
+ </body>
333
+ </html>
334
+ );
335
+ }
336
+ ```
337
+
338
+ See **[Analytics Setup](../guides/analytics-setup.md)** for configuration.
339
+
340
+ ### Optimize SEO
341
+
342
+ Add meta tags and structured data:
343
+
344
+ ```typescript
345
+ // src/app/page.tsx
346
+ export const metadata = {
347
+ title: 'Transform Your Business | Your Company',
348
+ description: 'Professional consulting services that deliver real results',
349
+ openGraph: {
350
+ title: 'Transform Your Business',
351
+ description: 'Professional consulting services',
352
+ images: ['/og-image.jpg'],
353
+ },
354
+ };
355
+ ```
356
+
357
+ See **[SEO Optimization](../guides/seo-optimization.md)** for best practices.
358
+
359
+ ### Add More Pages
360
+
361
+ Create service pages, pricing, about, blog, etc.:
362
+
363
+ ```typescript
364
+ // src/app/about/page.tsx
365
+ import { AboutSection } from '@zoyth/simple-site-framework';
366
+
367
+ export default function AboutPage() {
368
+ return (
369
+ <AboutSection
370
+ heading="About Our Company"
371
+ story="Founded in 2010, we've helped over 500 businesses transform..."
372
+ team={[
373
+ {
374
+ name: 'John Doe',
375
+ role: 'Founder & CEO',
376
+ bio: 'Former consultant at McKinsey...',
377
+ image: '/team/john.jpg',
378
+ },
379
+ ]}
380
+ stats={[
381
+ { value: '500+', label: 'Clients Served' },
382
+ { value: '15', label: 'Years Experience' },
383
+ { value: '98%', label: 'Satisfaction Rate' },
384
+ ]}
385
+ />
386
+ );
387
+ }
388
+ ```
389
+
390
+ ## Common Patterns
391
+
392
+ ### Full-Width vs Contained
393
+
394
+ Sections are full-width by default. Use `maxWidth` to contain content:
395
+
396
+ ```typescript
397
+ <HeroSection
398
+ heading="Welcome"
399
+ maxWidth="xl" // Constrains content width
400
+ />
401
+ ```
402
+
403
+ ### Custom Styling
404
+
405
+ Add custom classes when needed:
406
+
407
+ ```typescript
408
+ <HeroSection
409
+ heading="Welcome"
410
+ className="bg-gradient-to-r from-blue-600 to-purple-600"
411
+ />
412
+ ```
413
+
414
+ ### Conditional Rendering
415
+
416
+ Show different content based on conditions:
417
+
418
+ ```typescript
419
+ {isPromoActive && (
420
+ <CTASection
421
+ heading="Limited Time Offer"
422
+ primaryCTA={{ text: 'Claim Discount', href: '/promo' }}
423
+ />
424
+ )}
425
+ ```
426
+
427
+ ## Troubleshooting
428
+
429
+ ### Components Look Unstyled
430
+
431
+ **Check:**
432
+ 1. Tailwind config includes framework in `content` array
433
+ 2. Theme tokens are defined (colors, fonts)
434
+ 3. Dev server was restarted after config changes
435
+
436
+ ### TypeScript Errors
437
+
438
+ **Check:**
439
+ 1. Types are imported: `import type { LocalizedString } from '@zoyth/simple-site-framework'`
440
+ 2. Props match component signature
441
+ 3. TypeScript server was restarted in your editor
442
+
443
+ ### Build Errors
444
+
445
+ **Check:**
446
+ 1. Client components imported from `/client`: `import { AnalyticsTracker } from '.../client'`
447
+ 2. Server components imported from main export: `import { HeroSection } from '...'`
448
+
449
+ See **[Troubleshooting](../../TROUBLESHOOTING.md)** for detailed debugging.
450
+
451
+ ## Resources
452
+
453
+ - **[Components Overview](../components/overview.md)** - Explore all available components
454
+ - **[First Project Tutorial](./first-project.md)** - Step-by-step complete site
455
+ - **[Configuration Guide](../core-concepts/configuration-driven.md)** - Deep dive into config approach
456
+ - **[Examples](../examples/landing-page-simple.md)** - Real-world usage patterns
457
+
458
+ ---
459
+
460
+ **Congratulations!** You've built your first site with Simple Site Framework. Explore the documentation to learn about advanced features like A/B testing, animations, and performance optimization.