Skip to content

Commit 637f7de

Browse files
Converted to static SPA
X-Lovable-Edit-ID: edt-794075f3-4306-479b-b9d0-332e738c1532 Co-authored-by: ghostcodedynamics <295822717+ghostcodedynamics@users.noreply.github.com>
2 parents 7cb8f22 + ca86ebb commit 637f7de

13 files changed

Lines changed: 208 additions & 738 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,21 @@ jobs:
3333

3434
- name: Build
3535
run: npm run build
36+
env:
37+
# If deploying to https://<user>.github.io/<repo>/ uncomment and set the repo name.
38+
# VITE_BASE: /<repo>/
39+
VITE_BASE: /
3640

37-
- name: Debug build output
38-
run: |
39-
echo "Root files:"
40-
ls -la
41-
echo "Dist files:"
42-
ls -la dist || true
43-
echo "Dist client files:"
44-
ls -la dist/client || true
41+
- name: SPA fallback (404.html)
42+
run: cp dist/index.html dist/404.html
4543

46-
- name: Copy SPA fallback
47-
run: |
48-
if [ -f dist/client/index.html ]; then
49-
cp dist/client/index.html dist/client/404.html
50-
elif [ -f dist/index.html ]; then
51-
cp dist/index.html dist/404.html
52-
else
53-
echo "No index.html found"
54-
find dist -maxdepth 3 -type f
55-
exit 1
56-
fi
44+
- name: Add .nojekyll
45+
run: touch dist/.nojekyll
5746

5847
- name: Upload GitHub Pages artifact
5948
uses: actions/upload-pages-artifact@v3
6049
with:
61-
path: dist/client
50+
path: dist
6251

6352
deploy:
6453
runs-on: ubuntu-latest
@@ -71,4 +60,4 @@ jobs:
7160
steps:
7261
- name: Deploy to GitHub Pages
7362
id: deployment
74-
uses: actions/deploy-pages@v4
63+
uses: actions/deploy-pages@v4

bun.lock

Lines changed: 71 additions & 412 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<!doctype html>
2+
<html lang="en" class="dark">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>GhostCode Dynamics — Building Digital Solutions</title>
7+
<meta
8+
name="description"
9+
content="GhostCode Dynamics is a founder-led technology brand building digital solutions for businesses and empowering the next generation of tech professionals."
10+
/>
11+
<meta name="author" content="GhostCode Dynamics" />
12+
<meta name="theme-color" content="#0a0a12" />
13+
14+
<meta property="og:site_name" content="GhostCode Dynamics" />
15+
<meta property="og:type" content="website" />
16+
<meta property="og:title" content="GhostCode Dynamics — Building Digital Solutions" />
17+
<meta
18+
property="og:description"
19+
content="Building digital solutions for businesses while empowering the next generation of tech professionals."
20+
/>
21+
<meta
22+
property="og:image"
23+
content="https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/610c102a-5c96-4c32-a1f9-0ca1b3a40bc9/id-preview-b8dc329d--cbf17d2f-00eb-490b-8690-50cc48660676.lovable.app-1782138778412.png"
24+
/>
25+
26+
<meta name="twitter:card" content="summary_large_image" />
27+
<meta name="twitter:title" content="GhostCode Dynamics — Building Digital Solutions" />
28+
<meta
29+
name="twitter:description"
30+
content="Building digital solutions for businesses while empowering the next generation of tech professionals."
31+
/>
32+
<meta
33+
name="twitter:image"
34+
content="https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/610c102a-5c96-4c32-a1f9-0ca1b3a40bc9/id-preview-b8dc329d--cbf17d2f-00eb-490b-8690-50cc48660676.lovable.app-1782138778412.png"
35+
/>
36+
37+
<link rel="icon" href="/favicon.png" type="image/png" sizes="any" />
38+
<link rel="icon" href="/favicon-32x32.png" type="image/png" sizes="32x32" />
39+
<link rel="icon" href="/favicon-16x16.png" type="image/png" sizes="16x16" />
40+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" />
41+
42+
<script>
43+
// Apply stored theme before paint to avoid flash
44+
(function () {
45+
try {
46+
var t = localStorage.getItem("ghostcode-theme");
47+
var isDark = t ? t === "dark" : true;
48+
document.documentElement.classList.toggle("dark", isDark);
49+
document.documentElement.style.colorScheme = isDark ? "dark" : "light";
50+
} catch (e) {}
51+
})();
52+
53+
// GitHub Pages SPA fallback: if redirected from 404.html with ?/path, restore it.
54+
(function () {
55+
var l = window.location;
56+
if (l.search && l.search.indexOf("?/") === 0) {
57+
var decoded = l.search.slice(2).split("&").map(function (s) {
58+
return s.replace(/~and~/g, "&");
59+
}).join("?");
60+
window.history.replaceState(null, "", l.pathname.slice(0, -1) + decoded + l.hash);
61+
}
62+
})();
63+
</script>
64+
</head>
65+
<body class="min-h-dvh bg-background text-foreground antialiased">
66+
<div id="root"></div>
67+
<script type="module" src="/src/main.tsx"></script>
68+
</body>
69+
</html>

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@
4242
"@radix-ui/react-toggle": "^1.1.10",
4343
"@radix-ui/react-toggle-group": "^1.1.11",
4444
"@radix-ui/react-tooltip": "^1.2.8",
45-
"@tailwindcss/vite": "^4.2.1",
45+
"@tailwindcss/vite": "^4.3.1",
4646
"@tanstack/react-query": "^5.83.0",
4747
"@tanstack/react-router": "^1.168.25",
48-
"@tanstack/react-start": "^1.167.50",
49-
"@tanstack/router-plugin": "^1.167.28",
48+
"@tanstack/router-plugin": "^1.168.18",
5049
"class-variance-authority": "^0.7.1",
5150
"clsx": "^2.1.1",
5251
"cmdk": "^1.1.1",
@@ -66,23 +65,21 @@
6665
"tailwindcss": "^4.2.1",
6766
"tw-animate-css": "^1.3.4",
6867
"vaul": "^1.1.2",
69-
"vite-tsconfig-paths": "^6.0.2",
68+
"vite-tsconfig-paths": "^6.1.1",
7069
"zod": "^3.24.2"
7170
},
7271
"devDependencies": {
7372
"@eslint/js": "^9.32.0",
74-
"@lovable.dev/vite-tanstack-config": "^2.5.2",
7573
"@types/node": "^22.16.5",
7674
"@types/react": "^19.2.0",
7775
"@types/react-dom": "^19.2.0",
78-
"@vitejs/plugin-react": "^5.2.0",
76+
"@vitejs/plugin-react": "^6.0.2",
7977
"eslint": "^9.32.0",
8078
"eslint-config-prettier": "^10.1.1",
8179
"eslint-plugin-prettier": "^5.2.6",
8280
"eslint-plugin-react-hooks": "^5.2.0",
8381
"eslint-plugin-react-refresh": "^0.4.20",
8482
"globals": "^15.15.0",
85-
"nitro": "3.0.260603-beta",
8683
"prettier": "^3.7.3",
8784
"typescript": "^5.8.3",
8885
"typescript-eslint": "^8.56.1",

src/lib/error-capture.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/lib/error-page.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/main.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { StrictMode } from "react";
2+
import { createRoot } from "react-dom/client";
3+
import { RouterProvider } from "@tanstack/react-router";
4+
5+
import "./styles.css";
6+
import "@fontsource-variable/inter";
7+
import "@fontsource-variable/space-grotesk";
8+
import "@fontsource-variable/jetbrains-mono";
9+
10+
import { getRouter } from "./router";
11+
12+
const router = getRouter();
13+
14+
declare module "@tanstack/react-router" {
15+
interface Register {
16+
router: ReturnType<typeof getRouter>;
17+
}
18+
}
19+
20+
const rootEl = document.getElementById("root")!;
21+
createRoot(rootEl).render(
22+
<StrictMode>
23+
<RouterProvider router={router} />
24+
</StrictMode>,
25+
);

src/routeTree.gen.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import { Route as rootRouteImport } from './routes/__root'
1212
import { Route as VerifyRouteImport } from './routes/verify'
13-
import { Route as SitemapDotxmlRouteImport } from './routes/sitemap[.]xml'
1413
import { Route as ServicesRouteImport } from './routes/services'
1514
import { Route as PortfolioRouteImport } from './routes/portfolio'
1615
import { Route as LabsRouteImport } from './routes/labs'
@@ -31,11 +30,6 @@ const VerifyRoute = VerifyRouteImport.update({
3130
path: '/verify',
3231
getParentRoute: () => rootRouteImport,
3332
} as any)
34-
const SitemapDotxmlRoute = SitemapDotxmlRouteImport.update({
35-
id: '/sitemap.xml',
36-
path: '/sitemap.xml',
37-
getParentRoute: () => rootRouteImport,
38-
} as any)
3933
const ServicesRoute = ServicesRouteImport.update({
4034
id: '/services',
4135
path: '/services',
@@ -122,7 +116,6 @@ export interface FileRoutesByFullPath {
122116
'/labs': typeof LabsRoute
123117
'/portfolio': typeof PortfolioRoute
124118
'/services': typeof ServicesRoute
125-
'/sitemap.xml': typeof SitemapDotxmlRoute
126119
'/verify': typeof VerifyRoute
127120
}
128121
export interface FileRoutesByTo {
@@ -140,7 +133,6 @@ export interface FileRoutesByTo {
140133
'/labs': typeof LabsRoute
141134
'/portfolio': typeof PortfolioRoute
142135
'/services': typeof ServicesRoute
143-
'/sitemap.xml': typeof SitemapDotxmlRoute
144136
'/verify': typeof VerifyRoute
145137
}
146138
export interface FileRoutesById {
@@ -159,7 +151,6 @@ export interface FileRoutesById {
159151
'/labs': typeof LabsRoute
160152
'/portfolio': typeof PortfolioRoute
161153
'/services': typeof ServicesRoute
162-
'/sitemap.xml': typeof SitemapDotxmlRoute
163154
'/verify': typeof VerifyRoute
164155
}
165156
export interface FileRouteTypes {
@@ -179,7 +170,6 @@ export interface FileRouteTypes {
179170
| '/labs'
180171
| '/portfolio'
181172
| '/services'
182-
| '/sitemap.xml'
183173
| '/verify'
184174
fileRoutesByTo: FileRoutesByTo
185175
to:
@@ -197,7 +187,6 @@ export interface FileRouteTypes {
197187
| '/labs'
198188
| '/portfolio'
199189
| '/services'
200-
| '/sitemap.xml'
201190
| '/verify'
202191
id:
203192
| '__root__'
@@ -215,7 +204,6 @@ export interface FileRouteTypes {
215204
| '/labs'
216205
| '/portfolio'
217206
| '/services'
218-
| '/sitemap.xml'
219207
| '/verify'
220208
fileRoutesById: FileRoutesById
221209
}
@@ -234,7 +222,6 @@ export interface RootRouteChildren {
234222
LabsRoute: typeof LabsRoute
235223
PortfolioRoute: typeof PortfolioRoute
236224
ServicesRoute: typeof ServicesRoute
237-
SitemapDotxmlRoute: typeof SitemapDotxmlRoute
238225
VerifyRoute: typeof VerifyRoute
239226
}
240227

@@ -247,13 +234,6 @@ declare module '@tanstack/react-router' {
247234
preLoaderRoute: typeof VerifyRouteImport
248235
parentRoute: typeof rootRouteImport
249236
}
250-
'/sitemap.xml': {
251-
id: '/sitemap.xml'
252-
path: '/sitemap.xml'
253-
fullPath: '/sitemap.xml'
254-
preLoaderRoute: typeof SitemapDotxmlRouteImport
255-
parentRoute: typeof rootRouteImport
256-
}
257237
'/services': {
258238
id: '/services'
259239
path: '/services'
@@ -370,19 +350,8 @@ const rootRouteChildren: RootRouteChildren = {
370350
LabsRoute: LabsRoute,
371351
PortfolioRoute: PortfolioRoute,
372352
ServicesRoute: ServicesRoute,
373-
SitemapDotxmlRoute: SitemapDotxmlRoute,
374353
VerifyRoute: VerifyRoute,
375354
}
376355
export const routeTree = rootRouteImport
377356
._addFileChildren(rootRouteChildren)
378357
._addFileTypes<FileRouteTypes>()
379-
380-
import type { getRouter } from './router.tsx'
381-
import type { startInstance } from './start.ts'
382-
declare module '@tanstack/react-start' {
383-
interface Register {
384-
ssr: true
385-
router: Awaited<ReturnType<typeof getRouter>>
386-
config: Awaited<ReturnType<typeof startInstance.getOptions>>
387-
}
388-
}

0 commit comments

Comments
 (0)