@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.
- package/LICENSE +21 -0
- package/README.md +60 -0
- package/dist/api/handlers/aboutme.d.ts +3 -0
- package/dist/api/handlers/aboutme.d.ts.map +1 -0
- package/dist/api/handlers/content-api.d.ts +5 -0
- package/dist/api/handlers/content-api.d.ts.map +1 -0
- package/dist/api/handlers/content.d.ts +2 -0
- package/dist/api/handlers/content.d.ts.map +1 -0
- package/dist/api/handlers/home.d.ts +3 -0
- package/dist/api/handlers/home.d.ts.map +1 -0
- package/dist/api/handlers/info.d.ts +2 -0
- package/dist/api/handlers/info.d.ts.map +1 -0
- package/dist/api/handlers/logo.d.ts +2 -0
- package/dist/api/handlers/logo.d.ts.map +1 -0
- package/dist/api/handlers/staticdetails.d.ts +2 -0
- package/dist/api/handlers/staticdetails.d.ts.map +1 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/utils.d.ts +8 -0
- package/dist/api/utils.d.ts.map +1 -0
- package/dist/api.d.ts +4 -0
- package/dist/api.js +591 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +354 -0
- package/dist/prerender/index.d.ts +5 -0
- package/dist/prerender/index.d.ts.map +1 -0
- package/dist/prerender/pageContent.d.ts +16 -0
- package/dist/prerender/pageContent.d.ts.map +1 -0
- package/dist/prerender/prerender.d.ts +3 -0
- package/dist/prerender/prerender.d.ts.map +1 -0
- package/dist/prerender/template.d.ts +10 -0
- package/dist/prerender/template.d.ts.map +1 -0
- package/dist/prerender.d.ts +4 -0
- package/dist/prerender.js +399 -0
- package/dist/shared/config/api.d.ts +2 -0
- package/dist/shared/config/api.d.ts.map +1 -0
- package/dist/shared/config/index.d.ts +5 -0
- package/dist/shared/config/index.d.ts.map +1 -0
- package/dist/shared/config/types.d.ts +16 -0
- package/dist/shared/config/types.d.ts.map +1 -0
- package/dist/shared/core/site-store.d.ts +16 -0
- package/dist/shared/core/site-store.d.ts.map +1 -0
- package/dist/shared/core/theme-toggle.d.ts +13 -0
- package/dist/shared/core/theme-toggle.d.ts.map +1 -0
- package/dist/shared/index.d.ts +9 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/interfaces/iFooterLink.d.ts +5 -0
- package/dist/shared/interfaces/iFooterLink.d.ts.map +1 -0
- package/dist/shared/interfaces/iRoute.d.ts +5 -0
- package/dist/shared/interfaces/iRoute.d.ts.map +1 -0
- package/dist/shared/pageContent.d.ts +35 -0
- package/dist/shared/pageContent.d.ts.map +1 -0
- package/dist/shared/runtime.d.ts +7 -0
- package/dist/shared/runtime.d.ts.map +1 -0
- package/dist/shared/template.d.ts +8 -0
- package/dist/shared/template.d.ts.map +1 -0
- package/dist/shared.d.ts +2 -0
- package/dist/shared.js +10 -0
- package/dist/ui/aboutme/api.d.ts +11 -0
- package/dist/ui/aboutme/api.d.ts.map +1 -0
- package/dist/ui/aboutme/index.d.ts +26 -0
- package/dist/ui/aboutme/index.d.ts.map +1 -0
- package/dist/ui/aboutme/renderer.d.ts +5 -0
- package/dist/ui/aboutme/renderer.d.ts.map +1 -0
- package/dist/ui/aboutme/styles.d.ts +2 -0
- package/dist/ui/aboutme/styles.d.ts.map +1 -0
- package/dist/ui/admin/index.d.ts +42 -0
- package/dist/ui/admin/index.d.ts.map +1 -0
- package/dist/ui/admin/styles.d.ts +2 -0
- package/dist/ui/admin/styles.d.ts.map +1 -0
- package/dist/ui/banner/index.d.ts +17 -0
- package/dist/ui/banner/index.d.ts.map +1 -0
- package/dist/ui/banner/styles.d.ts +2 -0
- package/dist/ui/banner/styles.d.ts.map +1 -0
- package/dist/ui/footer/index.d.ts +9 -0
- package/dist/ui/footer/index.d.ts.map +1 -0
- package/dist/ui/footer/styles.d.ts +2 -0
- package/dist/ui/footer/styles.d.ts.map +1 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.js +820 -0
- package/package.json +41 -0
- package/src/api/__tests__/info.test.ts +44 -0
- package/src/api/__tests__/utils.test.ts +78 -0
- package/src/api/handlers/aboutme.ts +99 -0
- package/src/api/handlers/content-api.ts +268 -0
- package/src/api/handlers/content.ts +72 -0
- package/src/api/handlers/home.ts +79 -0
- package/src/api/handlers/info.ts +12 -0
- package/src/api/handlers/logo.ts +55 -0
- package/src/api/handlers/staticdetails.ts +48 -0
- package/src/api/index.ts +125 -0
- package/src/api/utils.ts +16 -0
- package/src/prerender/__tests__/pageContent.test.ts +54 -0
- package/src/prerender/__tests__/template.test.ts +54 -0
- package/src/prerender/index.ts +138 -0
- package/src/prerender/pageContent.ts +263 -0
- package/src/prerender/prerender.ts +25 -0
- package/src/prerender/template.ts +65 -0
- package/src/shared/config/api.ts +16 -0
- package/src/shared/config/index.ts +41 -0
- package/src/shared/config/types.ts +16 -0
- package/src/shared/core/__tests__/theme-toggle.test.ts +204 -0
- package/src/shared/core/site-store.ts +38 -0
- package/src/shared/core/theme-toggle.ts +118 -0
- package/src/shared/index.ts +15 -0
- package/src/shared/interfaces/iFooterLink.ts +4 -0
- package/src/shared/interfaces/iRoute.ts +4 -0
- package/src/shared/models/theme-variables.css +25 -0
- package/src/shared/pageContent.ts +209 -0
- package/src/shared/runtime.ts +11 -0
- package/src/shared/styles/markdown.css +129 -0
- package/src/shared/template.ts +35 -0
- package/src/styles/markdown.css +129 -0
- package/src/styles/theme.css +432 -0
- package/src/ui/aboutme/api.ts +12 -0
- package/src/ui/aboutme/index.ts +155 -0
- package/src/ui/aboutme/renderer.ts +7 -0
- package/src/ui/aboutme/styles.ts +10 -0
- package/src/ui/admin/index.ts +492 -0
- package/src/ui/admin/styles.ts +317 -0
- package/src/ui/banner/index.ts +38 -0
- package/src/ui/banner/styles.ts +10 -0
- package/src/ui/footer/index.ts +37 -0
- 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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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