msanvarov/personal-portfolio
ๅ ณไบ
๐ react next.js app for personal portfolio
็ฝ็ซไธๅบ็จๅผๅๅฎๆตๆๆ ๅข้ฟ
- 24ๅฐๆถ
- 0
- 7ๅคฉ
- 0
- 15ๅคฉ
- 0
- 1ไธชๆ
- ๆญฃๅจๆถ้ๅๅฒ
ๅๅจๆๅ ็ๆๆ ๅๅๅ๏ผๅจๆ็ธไบ้ๅ ๏ผๅนถ้ๆฏๆฅๆฐๅขใ็ผบๅคฑ็ๆต้ไฟๆ็ฉบ็ฝใๆๆ ไปฃ่กจๅ ณๆณจๅบฆ๏ผไธไปฃ่กจ่ฝฏไปถ่ดจ้ใ
README.md
ๅๆSal's Personal Portfolio Website
A modern Vite + React 18 portfolio site by Sal Anvarov. Optionally wired up to HotJar, GTM, and Formspree via environment variables.
Table of contents:
- Description
- Prerequisites
- Deployment
- Environment configuration
- SEO and AI-SEO
- Repository layout
- Testing
Description
Preview: https://www.sal-anvarov.com/
This portfolio site was rebuilt on Vite + React 18 + TypeScript with TanStack Router for client-side routing. Case studies and blog posts live as MDX files under content/ and are bundled at build time via @mdx-js/rollup + import.meta.glob. State management is Redux Toolkit with redux-persist; styling is SCSS + Bootstrap 5 + Iconoir; animations use Framer Motion + AOS.
All third-party identifiers (Hotjar, GTM, Microsoft Clarity, DebugBear, Formspree, Disqus, Calendly) are read from VITE_* environment variables โ nothing is hardcoded. Integrations gracefully no-op when their env var is not set.
Prerequisites
Optional integrations:
- HotJar
- Google Tag Manager
- Microsoft Clarity
- DebugBear RUM
- Vercel Analytics
- Formspree (contact form)
- Disqus (blog comments)
- Calendly ("Chat with Sal" CTA)
Deployment
One-click deploy
The repo ships with both a netlify.toml and a vercel.json configured for a Vite SPA: build with npm run build, publish dist/, and add a /* -> /index.html rewrite so the router handles deep links. See Netlify deploy docs and Vercel deploy docs.
Local development
git clone https://github.com/msanvarov/personal-portfolio
cd personal-portfolio
cp .env.example .env.local # fill in the integrations you actually use
npm install
npm run dev # http://localhost:4200
Build
npm run build # type-check + production bundle to ./dist
npm run preview # serve the production bundle locally
Environment configuration
Vite only exposes variables prefixed with VITE_ to the client. All integrations are optional โ if the env var is missing or VITE_ENABLE_TRACKING is not true, the associated script simply will not load.
| Variable | Purpose |
|---|---|
VITE_ENABLE_TRACKING |
Master switch for analytics. true / false. |
VITE_HOTJAR_WEBSITE_UID |
Hotjar site ID |
VITE_HOTJAR_VERSION |
Hotjar script version (typically 6) |
VITE_GOOGLE_TAG_MANAGER_UID |
GTM / GA4 measurement ID |
VITE_MICROSOFT_CLARITY_UID |
Clarity project ID |
VITE_DEBUGBEAR_RUM_UID |
DebugBear RUM script ID |
VITE_FORMSPREE_FORM_ID |
Formspree form ID for /contact |
VITE_DISQUS_SHORTNAME |
Disqus shortname for blog comments (optional) |
VITE_CALENDLY_URL |
Calendly URL for the "Chat with Sal" popup |
VITE_SITE_URL |
Canonical site URL used in OG metadata |
No secrets ever ship to the client by design โ these are all public IDs intended to be read at runtime by their respective scripts. Still, keep your real
.env.localout of version control (it is git-ignored).
SEO and AI-SEO
The site ships ready for both classic search-engine indexing and AI-crawler discovery:
/robots.txtโ explicitAllow: /for Googlebot, Bingbot, DuckDuckBot, Applebot, Yandex, Baidu, plus AI crawlers (GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-Web, anthropic-ai, PerplexityBot, Google-Extended, Meta-ExternalAgent, Amazonbot, Bytespider, YouBot, Mistral-AI-User). Edit any user-agent block toDisallow: /to opt out./sitemap.xmlโ generated at build time from the static routes plus every MDX file undercontent/case-studies/andcontent/posts/, withlastmodtaken from frontmatter or file mtime./llms.txtโ curated index (per the llmstxt.org convention) that lists each portfolio entry and blog post with a one-line summary, so AI agents that respect the file can fetch a clean table of contents.- Per-route metadata โ unique
<title>,<meta name="description">,<link rel="canonical">, Open Graph, Twitter Card, and JSON-LD on every route. Case studies emitCreativeWork, blog posts emitBlogPosting, list pages emitItemList/Blog, and detail pages addBreadcrumbList. - Static-HTML JSON-LD โ
index.htmlembeds a Person + WebSite@graphso non-JS-rendering crawlers see Sal's identity on the first byte without waiting for hydration.
When the canonical URL changes, update VITE_SITE_URL and the hardcoded https://www.sal-anvarov.com references in public/robots.txt, public/llms.txt, and index.html.
Repository layout
.
โโโ content/
โ โโโ case-studies/ # portfolio MDX entries
โ โโโ posts/ # blog MDX entries
โโโ public/ # static assets served from /
โโโ src/
โ โโโ components/ # Layout, Header, Footer, BlogNavbar, ...
โ โโโ i18n/ # English copy (JSON)
โ โโโ pages/ # page components (rendered by routes/)
โ โโโ providers/ # ThemeProvider
โ โโโ routes/ # TanStack Router file-based routes
โ โโโ store/ # Redux Toolkit slices + hooks
โ โโโ styles/ # global SCSS (dark + light)
โ โโโ utils/ # tracking, content loader, themed assets, SEO
โ โโโ App.tsx
โ โโโ main.tsx
โ โโโ router.ts
โ โโโ vite-env.d.ts
โโโ index.html
โโโ netlify.toml
โโโ package.json
โโโ tsconfig.json
โโโ vercel.json
โโโ vite.config.ts
Testing
npm run lint # eslint
npm run typecheck # tsc --noEmit
Help
PRs are appreciated.
License
This personal portfolio website is MIT licensed.
ๆข็ดข็ธๅ ณ้กน็ฎ
ๅ ่ฝฝไธญโฆ
