@leadertechie/personal-site-kit 0.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 (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -0
  3. package/dist/api/handlers/aboutme.d.ts +3 -0
  4. package/dist/api/handlers/aboutme.d.ts.map +1 -0
  5. package/dist/api/handlers/content-api.d.ts +5 -0
  6. package/dist/api/handlers/content-api.d.ts.map +1 -0
  7. package/dist/api/handlers/content.d.ts +2 -0
  8. package/dist/api/handlers/content.d.ts.map +1 -0
  9. package/dist/api/handlers/home.d.ts +3 -0
  10. package/dist/api/handlers/home.d.ts.map +1 -0
  11. package/dist/api/handlers/info.d.ts +2 -0
  12. package/dist/api/handlers/info.d.ts.map +1 -0
  13. package/dist/api/handlers/logo.d.ts +2 -0
  14. package/dist/api/handlers/logo.d.ts.map +1 -0
  15. package/dist/api/handlers/staticdetails.d.ts +2 -0
  16. package/dist/api/handlers/staticdetails.d.ts.map +1 -0
  17. package/dist/api/index.d.ts +9 -0
  18. package/dist/api/index.d.ts.map +1 -0
  19. package/dist/api/utils.d.ts +8 -0
  20. package/dist/api/utils.d.ts.map +1 -0
  21. package/dist/api.d.ts +4 -0
  22. package/dist/api.js +591 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +354 -0
  25. package/dist/prerender/index.d.ts +5 -0
  26. package/dist/prerender/index.d.ts.map +1 -0
  27. package/dist/prerender/pageContent.d.ts +16 -0
  28. package/dist/prerender/pageContent.d.ts.map +1 -0
  29. package/dist/prerender/prerender.d.ts +3 -0
  30. package/dist/prerender/prerender.d.ts.map +1 -0
  31. package/dist/prerender/template.d.ts +10 -0
  32. package/dist/prerender/template.d.ts.map +1 -0
  33. package/dist/prerender.d.ts +4 -0
  34. package/dist/prerender.js +399 -0
  35. package/dist/shared/config/api.d.ts +2 -0
  36. package/dist/shared/config/api.d.ts.map +1 -0
  37. package/dist/shared/config/index.d.ts +5 -0
  38. package/dist/shared/config/index.d.ts.map +1 -0
  39. package/dist/shared/config/types.d.ts +16 -0
  40. package/dist/shared/config/types.d.ts.map +1 -0
  41. package/dist/shared/core/site-store.d.ts +16 -0
  42. package/dist/shared/core/site-store.d.ts.map +1 -0
  43. package/dist/shared/core/theme-toggle.d.ts +13 -0
  44. package/dist/shared/core/theme-toggle.d.ts.map +1 -0
  45. package/dist/shared/index.d.ts +9 -0
  46. package/dist/shared/index.d.ts.map +1 -0
  47. package/dist/shared/interfaces/iFooterLink.d.ts +5 -0
  48. package/dist/shared/interfaces/iFooterLink.d.ts.map +1 -0
  49. package/dist/shared/interfaces/iRoute.d.ts +5 -0
  50. package/dist/shared/interfaces/iRoute.d.ts.map +1 -0
  51. package/dist/shared/pageContent.d.ts +35 -0
  52. package/dist/shared/pageContent.d.ts.map +1 -0
  53. package/dist/shared/runtime.d.ts +7 -0
  54. package/dist/shared/runtime.d.ts.map +1 -0
  55. package/dist/shared/template.d.ts +8 -0
  56. package/dist/shared/template.d.ts.map +1 -0
  57. package/dist/shared.d.ts +2 -0
  58. package/dist/shared.js +10 -0
  59. package/dist/ui/aboutme/api.d.ts +11 -0
  60. package/dist/ui/aboutme/api.d.ts.map +1 -0
  61. package/dist/ui/aboutme/index.d.ts +26 -0
  62. package/dist/ui/aboutme/index.d.ts.map +1 -0
  63. package/dist/ui/aboutme/renderer.d.ts +5 -0
  64. package/dist/ui/aboutme/renderer.d.ts.map +1 -0
  65. package/dist/ui/aboutme/styles.d.ts +2 -0
  66. package/dist/ui/aboutme/styles.d.ts.map +1 -0
  67. package/dist/ui/admin/index.d.ts +42 -0
  68. package/dist/ui/admin/index.d.ts.map +1 -0
  69. package/dist/ui/admin/styles.d.ts +2 -0
  70. package/dist/ui/admin/styles.d.ts.map +1 -0
  71. package/dist/ui/banner/index.d.ts +17 -0
  72. package/dist/ui/banner/index.d.ts.map +1 -0
  73. package/dist/ui/banner/styles.d.ts +2 -0
  74. package/dist/ui/banner/styles.d.ts.map +1 -0
  75. package/dist/ui/footer/index.d.ts +9 -0
  76. package/dist/ui/footer/index.d.ts.map +1 -0
  77. package/dist/ui/footer/styles.d.ts +2 -0
  78. package/dist/ui/footer/styles.d.ts.map +1 -0
  79. package/dist/ui.d.ts +2 -0
  80. package/dist/ui.js +820 -0
  81. package/package.json +41 -0
  82. package/src/api/__tests__/info.test.ts +44 -0
  83. package/src/api/__tests__/utils.test.ts +78 -0
  84. package/src/api/handlers/aboutme.ts +99 -0
  85. package/src/api/handlers/content-api.ts +268 -0
  86. package/src/api/handlers/content.ts +72 -0
  87. package/src/api/handlers/home.ts +79 -0
  88. package/src/api/handlers/info.ts +12 -0
  89. package/src/api/handlers/logo.ts +55 -0
  90. package/src/api/handlers/staticdetails.ts +48 -0
  91. package/src/api/index.ts +125 -0
  92. package/src/api/utils.ts +16 -0
  93. package/src/prerender/__tests__/pageContent.test.ts +54 -0
  94. package/src/prerender/__tests__/template.test.ts +54 -0
  95. package/src/prerender/index.ts +138 -0
  96. package/src/prerender/pageContent.ts +263 -0
  97. package/src/prerender/prerender.ts +25 -0
  98. package/src/prerender/template.ts +65 -0
  99. package/src/shared/config/api.ts +16 -0
  100. package/src/shared/config/index.ts +41 -0
  101. package/src/shared/config/types.ts +16 -0
  102. package/src/shared/core/__tests__/theme-toggle.test.ts +204 -0
  103. package/src/shared/core/site-store.ts +38 -0
  104. package/src/shared/core/theme-toggle.ts +118 -0
  105. package/src/shared/index.ts +15 -0
  106. package/src/shared/interfaces/iFooterLink.ts +4 -0
  107. package/src/shared/interfaces/iRoute.ts +4 -0
  108. package/src/shared/models/theme-variables.css +25 -0
  109. package/src/shared/pageContent.ts +209 -0
  110. package/src/shared/runtime.ts +11 -0
  111. package/src/shared/styles/markdown.css +129 -0
  112. package/src/shared/template.ts +35 -0
  113. package/src/styles/markdown.css +129 -0
  114. package/src/styles/theme.css +432 -0
  115. package/src/ui/aboutme/api.ts +12 -0
  116. package/src/ui/aboutme/index.ts +155 -0
  117. package/src/ui/aboutme/renderer.ts +7 -0
  118. package/src/ui/aboutme/styles.ts +10 -0
  119. package/src/ui/admin/index.ts +492 -0
  120. package/src/ui/admin/styles.ts +317 -0
  121. package/src/ui/banner/index.ts +38 -0
  122. package/src/ui/banner/styles.ts +10 -0
  123. package/src/ui/footer/index.ts +37 -0
  124. package/src/ui/footer/styles.ts +9 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 leadertechie
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # @leadertechie/personal-site-kit
2
+
3
+ A high-performance, modular engine for building personal websites and professional portfolios. Powered by Cloudflare Workers, R2 Storage, and Lit Web Components.
4
+
5
+ ## Features
6
+
7
+ - **🚀 Zero-to-Running**: Standardized architecture designed for quick deployment.
8
+ - **🛠️ 4-Section Engine**: Fully integrated logic for **API**, **UI**, **Prerender**, and **Admin**.
9
+ - **🎨 Modern Layout**: Semantic grid system with responsive `main-column` and `sidebar-column` components.
10
+ - **🌓 Theme Engine**: Built-in light/dark mode support with persistent user preferences.
11
+ - **📝 Content Driven**: Dynamic Markdown rendering with frontmatter support via `@leadertechie/md2html`.
12
+ - **⚙️ Remote Config**: Manage site settings (title, copyright, social links) directly from R2 without re-deploying.
13
+ - **🔍 SEO Optimized**: Server-side prerendering ensures search engines see your content perfectly.
14
+
15
+ ## Architecture
16
+
17
+ The kit is divided into four logical subpaths:
18
+
19
+ 1. **/shared**: Common interfaces, types, and the reactive `SiteStore`.
20
+ 2. **/ui**: Web components for the Banner, Footer, About Me, and Admin Portal.
21
+ 3. **/api**: Standard handlers for Cloudflare Workers to manage R2 content.
22
+ 4. **/prerender**: SEO engine to generate static HTML for crawlers.
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ npm install @leadertechie/personal-site-kit
28
+ ```
29
+
30
+ ## Quick Start (Usage)
31
+
32
+ ### 1. API Worker (`api.ts`)
33
+ ```typescript
34
+ import { handleAPIRoute } from '@leadertechie/personal-site-kit/api';
35
+
36
+ export default {
37
+ async fetch(request, env) {
38
+ return handleAPIRoute(request, env);
39
+ }
40
+ };
41
+ ```
42
+
43
+ ### 2. UI Entry (`main.ts`)
44
+ ```typescript
45
+ import { SiteStore } from '@leadertechie/personal-site-kit/shared';
46
+ import '@leadertechie/personal-site-kit/ui/banner';
47
+
48
+ const store = SiteStore.getInstance();
49
+ await store.init({ apiUrl: 'https://api.yourdomain.com' });
50
+ ```
51
+
52
+ ## Deployment
53
+
54
+ This kit is designed to be deployed to **Cloudflare**. Ensure your `wrangler.toml` is configured with an R2 bucket named `CONTENT_BUCKET`.
55
+
56
+ ---
57
+
58
+ ## License
59
+
60
+ MIT © [Techie Leader](https://github.com/leadertechie)
@@ -0,0 +1,3 @@
1
+ export declare function clearContentCache(): void;
2
+ export declare function handleAboutMe(env?: any): Promise<Response>;
3
+ //# sourceMappingURL=aboutme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aboutme.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/aboutme.ts"],"names":[],"mappings":"AA4CA,wBAAgB,iBAAiB,SAEhC;AAED,wBAAsB,aAAa,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkDhE"}
@@ -0,0 +1,5 @@
1
+ export declare function handleBlogs(env?: any, slug?: string, latest?: number): Promise<Response>;
2
+ export declare function handleStories(env?: any, slug?: string, latest?: number): Promise<Response>;
3
+ export declare function handleSearch(env?: any, query?: string): Promise<Response>;
4
+ export declare function clearContentCache(): void;
5
+ //# sourceMappingURL=content-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-api.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/content-api.ts"],"names":[],"mappings":"AA8EA,wBAAsB,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAgE9F;AAED,wBAAsB,aAAa,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CA8DhG;AAED,wBAAsB,YAAY,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuD/E;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
@@ -0,0 +1,2 @@
1
+ export declare function handleContent(request: Request, env: any, subpath: string): Promise<Response>;
2
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/content.ts"],"names":[],"mappings":"AAEA,wBAAsB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAqElG"}
@@ -0,0 +1,3 @@
1
+ export declare function clearContentCache(): void;
2
+ export declare function handleHome(env?: any): Promise<Response>;
3
+ //# sourceMappingURL=home.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/home.ts"],"names":[],"mappings":"AAiCA,wBAAgB,iBAAiB,SAEhC;AAED,wBAAsB,UAAU,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAyC7D"}
@@ -0,0 +1,2 @@
1
+ export declare function handleInfo(): Promise<Response>;
2
+ //# sourceMappingURL=info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/info.ts"],"names":[],"mappings":"AAEA,wBAAsB,UAAU,IAAI,OAAO,CAAC,QAAQ,CAAC,CASpD"}
@@ -0,0 +1,2 @@
1
+ export declare function handleLogo(env?: any): Promise<Response>;
2
+ //# sourceMappingURL=logo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/logo.ts"],"names":[],"mappings":"AAsBA,wBAAsB,UAAU,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAgC7D"}
@@ -0,0 +1,2 @@
1
+ export declare function handleStaticDetails(env?: any, method?: string, body?: any): Promise<Response>;
2
+ //# sourceMappingURL=staticdetails.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staticdetails.d.ts","sourceRoot":"","sources":["../../../src/api/handlers/staticdetails.ts"],"names":[],"mappings":"AAQA,wBAAsB,mBAAmB,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuCnG"}
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ fetch(request: Request, env?: Env): Promise<Response>;
3
+ };
4
+ export default _default;
5
+ interface Env {
6
+ CONTENT_BUCKET?: any;
7
+ ADMIN_API_KEY?: string;
8
+ }
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";mBACuB,OAAO,QAAQ,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;;AAD7D,wBAmBE;AAsGF,UAAU,GAAG;IACX,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,8 @@
1
+ export interface APIResponse {
2
+ data?: any;
3
+ error?: string;
4
+ status: number;
5
+ }
6
+ export declare function createJSONResponse(data: any, status?: number): Response;
7
+ export declare function createErrorResponse(message: string, status?: number): Response;
8
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/api/utils.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,MAAY,GAAG,QAAQ,CAK5E;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,MAAY,GAAG,QAAQ,CAEnF"}
package/dist/api.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import _default from './api/index'
3
+ export default _default
4
+ export {}