A React + TypeScript single-page application (SPA) for an AI solutions/portfolio website, backed by a small Express server for production static serving.
/ and /contact)dist/publictsc --noEmitdocs/
ideas.md: Design/UX notes.client/
src/ React app (pages, components, contexts, hooks)index.html Vite entry HTML (analytics script placeholder)server/
index.ts Express server that serves the built clientshared/
dist/public/
vite build)pnpm install
pnpm dev
Notes:
client/.vite --host.pnpm build
What it does:
dist/publicserver/index.ts with esbuild into dist/pnpm start
pnpm preview
From the root package.json:
pnpm dev — vite --hostpnpm build — vite build && esbuild server/index.ts ... --outdir=distpnpm build:static — vite buildpnpm start — NODE_ENV=production node dist/index.jspnpm preview — vite preview --hostpnpm check — tsc --noEmitpnpm format — prettier --write .client/index.html includes an Umami script tag using placeholders:
%VITE_ANALYTICS_ENDPOINT%%VITE_ANALYTICS_WEBSITE_ID%To enable analytics in your environment, set the corresponding Vite env vars (prefix VITE_).
Run:
pnpm check
MIT