website

#astro#js#html#css

git clone https://git.pyrossh.dev/website

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


ad05b07pyrossh 2026-07-08T19:43:16+05:30
feat: scaffold Hono app with config, types, and S3 client
Files changed (6) hide show
  1. package.json +9 -34
  2. src/config.ts +132 -0
  3. src/s3.ts +15 -0
  4. src/types.ts +72 -0
  5. tsconfig.json +10 -8
  6. wrangler.jsonc +13 -0
package.json CHANGED
@@ -1,43 +1,18 @@
1
1
  {
2
- "name": "website",
2
+ "name": "pyrossh-dev",
3
- "version": "0.0.1",
4
- "private": true,
5
3
  "type": "module",
6
4
  "scripts": {
7
- "dev": "wrangler dev --config packages/workers/dev-router/wrangler.jsonc",
8
- "dev:home": "wrangler dev --config packages/workers/home/wrangler.jsonc --port 8782",
9
- "dev:cv": "wrangler dev --config packages/workers/cv/wrangler.jsonc --port 8783",
10
- "typecheck": "tsc --noEmit",
5
+ "dev": "wrangler dev",
11
- "deploy:all": "bash scripts/deploy-all.sh",
12
- "deploy": "bash scripts/deploy-all.sh",
6
+ "deploy": "wrangler deploy",
13
- "deploy:worker": "# Usage: wrangler deploy --config packages/workers/<name>/wrangler.jsonc"
7
+ "cf-typegen": "wrangler types"
14
8
  },
15
9
  "dependencies": {
16
- "diff": "^9.0.0",
10
+ "hono": "^4.7.5",
17
- "gray-matter": "^4.0.3",
18
- "pretty-bytes": "^7.1.0",
19
- "rehype-expressive-code": "^0.44.0",
20
- "rehype-stringify": "^10.0.1",
21
- "remark-parse": "^11.0.0",
22
- "remark-rehype": "^11.1.2",
23
- "typed-htmx": "^0.3.1",
24
- "unified": "^11.0.5"
11
+ "s3mini": "^0.9.5"
25
12
  },
26
13
  "devDependencies": {
27
- "@cloudflare/workers-types": "^5.20260706.1",
14
+ "@cloudflare/workers-types": "^4.20250214.0",
28
- "@playwright/test": "^1.52.0",
29
- "diff2html": "^3.4.52",
30
- "typescript": "^6.0.3",
31
- "vite": "catalog:",
32
- "vite-plus": "catalog:",
33
- "vscode-icons": "https://github.com/vscode-icons/vscode-icons.git",
34
- "wrangler": "^4.105.0"
15
+ "wrangler": "^4.0.0",
35
- },
36
- "devEngines": {
37
- "packageManager": {
38
- "name": "pnpm",
39
- "version": "11.9.0",
16
+ "typescript": "^5.7.0"
40
- "onFail": "download"
41
- }
42
17
  }
43
18
  }
src/config.ts ADDED
@@ -0,0 +1,132 @@
1
+ export const SITE_TITLE = "pyrossh";
2
+ export const SITE_DESCRIPTION = "Welcome to my website!";
3
+ export const REPOS = [
4
+ {
5
+ title: "rust-embed",
6
+ description:
7
+ "rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.",
8
+ tags: ["rust", "proc-macro", "http"],
9
+ },
10
+ {
11
+ title: "website",
12
+ description: "木 Personal website of pyrossh. Built with astrojs, shiki, vite.",
13
+ tags: ["astro", "js", "html", "css"],
14
+ },
15
+ {
16
+ title: "plum",
17
+ description: "A statically typed, imperative programming language inspired by rust, python",
18
+ tags: ["treesitter", "compiler", "wasm"],
19
+ },
20
+ {
21
+ title: "edge-city",
22
+ description:
23
+ "edge-city is a next level meta-framework for react that runs only on edge runtimes",
24
+ tags: ["react", "js", "ssr"],
25
+ },
26
+ {
27
+ title: "gromer",
28
+ description:
29
+ "gromer is a framework and cli to build multipage web apps in golang using htmx and alpinejs.",
30
+ tags: ["golang", "htmx", "ssr"],
31
+ },
32
+ {
33
+ title: "atoms-element",
34
+ description:
35
+ "A simple web component library for defining your custom elements. It works on both client and server.",
36
+ tags: ["js"],
37
+ },
38
+ {
39
+ title: "atoms-state",
40
+ description: "Simple State management for react",
41
+ tags: ["js", "react", "flux"],
42
+ },
43
+ {
44
+ title: "remote-monitor",
45
+ description: "Remote Monitoring and Control using GSM-SMS",
46
+ tags: ["c++", "teensy", "arduino"],
47
+ },
48
+ {
49
+ title: "only-bible-app",
50
+ description:
51
+ "The only bible app you will ever need. No ads. No in-app purchases. No distractions.",
52
+ tags: ["kotlin", "android", "ios"],
53
+ },
54
+ {
55
+ title: "gdx-studio",
56
+ description:
57
+ "An IDE for creating Games using libgdx and Java supported on all platforms Android, iOS, Desktop",
58
+ tags: ["libgdx", "java", "desktop"],
59
+ },
60
+ {
61
+ title: "rp2350",
62
+ description: "code to drive rp2350",
63
+ tags: ["zig", "raspberry-pi"],
64
+ },
65
+ {
66
+ title: "config",
67
+ description: "Common configuration",
68
+ tags: ["brew", "nushell"],
69
+ },
70
+ {
71
+ title: "sabel-ide",
72
+ description: "sabel-ide",
73
+ tags: ["python", "qt"],
74
+ },
75
+ {
76
+ title: "tide-jsx",
77
+ description: "Tide + JSX",
78
+ tags: ["rust", "proc-macro", "jsx"],
79
+ },
80
+ ];
81
+ export const TOOLS = [
82
+ {
83
+ name: "Stats",
84
+ link: "https://github.com/exelban/stats",
85
+ image: "/assets/logos/stats.png",
86
+ },
87
+ {
88
+ name: "Void",
89
+ link: "https://github.com/voideditor/void",
90
+ image: "/assets/logos/void.png",
91
+ },
92
+ {
93
+ name: "Helix",
94
+ link: "https://github.com/helix-editor/helix",
95
+ image: "/assets/logos/helix.png",
96
+ },
97
+ {
98
+ name: "Nushell",
99
+ link: "https://github.com/nushell/nushell",
100
+ image: "/assets/logos/nu.png",
101
+ },
102
+ {
103
+ name: "Ghostty",
104
+ link: "https://github.com/ghostty-org/ghostty",
105
+ image: "/assets/logos/ghostty.png",
106
+ },
107
+ {
108
+ name: "Zellij",
109
+ link: "https://zellij.dev/",
110
+ image: "/assets/logos/zellij.png",
111
+ },
112
+ {
113
+ name: "Zen",
114
+ link: "https://github.com/zen-browser/desktop",
115
+ image: "/assets/logos/zen.svg",
116
+ },
117
+ {
118
+ name: "Bruno",
119
+ link: "https://github.com/usebruno/bruno",
120
+ image: "/assets/logos/bruno.png",
121
+ },
122
+ {
123
+ name: "Secretive",
124
+ link: "https://github.com/maxgoedjen/secretive",
125
+ image: null,
126
+ },
127
+ ];
128
+ export const NAV_ITEMS = [
129
+ { href: "/cv", label: "cv" },
130
+ { href: "/posts", label: "posts" },
131
+ ] as const;
132
+ export const SITE_URL = "https://pyrossh.dev";
src/s3.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { S3mini } from 's3mini'
2
+
3
+ let _s3: S3mini | null = null
4
+
5
+ export const getS3 = (): S3mini => {
6
+ if (!_s3) {
7
+ _s3 = new S3mini({
8
+ accessKeyId: process.env.S3_ACCESS_KEY_ID!,
9
+ secretAccessKey: process.env.S3_SECRET_ACCESS_KEY!,
10
+ endpoint: process.env.S3_ENDPOINT!,
11
+ region: process.env.S3_REGION ?? 'auto',
12
+ })
13
+ }
14
+ return _s3
15
+ }
src/types.ts ADDED
@@ -0,0 +1,72 @@
1
+ export interface Commit {
2
+ hash: string;
3
+ author_name: string;
4
+ date: string;
5
+ message: string;
6
+ body?: string;
7
+ }
8
+
9
+ export interface FileEntry {
10
+ name: string;
11
+ size: number;
12
+ ext: string;
13
+ absolutePath: string;
14
+ }
15
+
16
+ export interface FileNode {
17
+ name: string;
18
+ path: string;
19
+ size: number;
20
+ ext: string;
21
+ absolutePath: string;
22
+ isDirectory: boolean;
23
+ children?: FileNode[];
24
+ }
25
+
26
+ export interface RuntimeRepo {
27
+ id: string;
28
+ data: {
29
+ title: string;
30
+ description: string;
31
+ tags: string[];
32
+ };
33
+ }
34
+
35
+ export interface RuntimePost {
36
+ id: string;
37
+ data: {
38
+ title: string;
39
+ description: string;
40
+ pubDate: Date;
41
+ updatedDate?: Date;
42
+ heroImage?: string;
43
+ };
44
+ body: string;
45
+ html: string;
46
+ }
47
+
48
+ export type GitBugIssueState = 'open' | 'closed';
49
+
50
+ export interface GitBugIssue {
51
+ id: string;
52
+ title: string;
53
+ state: GitBugIssueState;
54
+ author?: string;
55
+ createdAt: string;
56
+ updatedAt: string;
57
+ labels: string[];
58
+ body?: string;
59
+ comments: GitBugComment[];
60
+ }
61
+
62
+ export interface GitBugComment {
63
+ id: string;
64
+ author?: string;
65
+ createdAt: string;
66
+ body: string;
67
+ }
68
+
69
+ export interface GitBugIssuesResult {
70
+ issues: GitBugIssue[];
71
+ isAvailable: boolean;
72
+ }
tsconfig.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
- "extends": "./tsconfig.base.json",
3
- "include": ["packages"],
4
2
  "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
5
- "paths": {
6
+ "strict": true,
7
+ "skipLibCheck": true,
8
+ "noEmit": true,
6
- "@pyrossh/core": ["./packages/shared/core/src"],
9
+ "isolatedModules": true,
7
- "@pyrossh/types": ["./packages/shared/types/src"],
10
+ "types": ["@cloudflare/workers-types"]
8
- "@pyrossh/ui": ["./packages/shared/ui/src"]
9
- }
11
+ },
10
- }
12
+ "include": ["src"]
11
13
  }
wrangler.jsonc ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "node_modules/wrangler/config-schema.json",
3
+ "name": "pyrossh-website",
4
+ "main": "src/index.ts",
5
+ "compatibility_date": "2026-07-07",
6
+ "compatibility_flags": ["nodejs_compat"],
7
+ "assets": { "directory": "assets" },
8
+ "vars": {
9
+ "S3_ENDPOINT": "https://dfdb8ca4e419990852eb214c5b50bd5e.r2.cloudflarestorage.com/pyrossh-repos-prd",
10
+ "S3_REGION": "auto"
11
+ },
12
+ "routes": [{ "pattern": "pyrossh.dev", "custom_domain": true }]
13
+ }