toheed-sahar.com: a portfolio built to turn visitors into enquiries
My own site, built as a ten-route conversion site with a rate-limited AI assistant, a bot-protected contact form that emails through Resend, and a project page generated through a publish-safety gate.
The problem
My work is taking apps apart and building automation and AI agents, which is hard to sell from a row of tech logos. Visitors arrive sceptical, often after a bad outsourcing experience, and compare a few freelancers in open tabs. The site has to show proof and name the risk before they leave, and make writing to me easy.
How I built it
A React 19 and Vite app with ten routes and a small hand-written router, plus one Express app that runs locally with Vite middleware and on Vercel as a single serverless function. All content is compiled into the bundle, so there is no database to run. Enquiries go out through Resend, the AI assistant runs on OpenRouter behind a fallback chain of models, and the project page is generated from a private index. In November 2026 I also started a static, hand-built redesign (Python build script, Three.js hero, scroll-driven 3D figure) to compare against it.
What got hard
- Express on Vercel returned 404 for the API, then for every client route.
The serverless entry needed an explicit .js import because the package is ESM, and declaring any rewrites replaced Vercel's default SPA fallback. I added the fallback back as the second rewrite and wrote both rules into the technical notes so they are not removed by accident.
- On phones the page looked zoomed in.
A decorative blur circle 384px wide sat in every section and pushed the document past a 390px screen, which stretched every fixed layer. Clipping sections with overflow-x: clip (not hidden, so the sticky panel keeps working) fixed it. I measured 0px of horizontal overflow on all 9 audited routes at 320px and 390px.
- Client names and NDA work had to stay off a public site while the page still shows the scale of the portfolio.
The project page is generated, not written. The generator drops anything marked never-share, emits only an anonymised label for client work, withholds architecture notes on client projects, never writes a local path, and aborts the build if a credential pattern appears in the output. 10 of 96 records were excluded when I documented it.
- A public AI chat can drain a budget, and free models are retired without notice.
Per-IP rate limits (chat 8 per minute, contact form 5 per 10 minutes), a 32 kb body cap, a honeypot field and a 3 second timing gate on the form, and a fallback chain across four free models. If every model fails, the visitor gets a 503 that points to the contact form, so nobody hits a dead end.
- Default secret scanners did not recognise the key format I use.
I added custom gitleaks rules (including one for the process.env.X || "literal" pattern), a pre-commit hook that scans staged changes, and removed every literal fallback so a missing key fails loudly instead of reviving an old one.
- On Vercel, pushes to master produced preview deployments and production needed a manual promote, so work could look shipped while an older bundle was live.
I check the live bundle instead of the deploy status, and the promote step is written into the deployment notes.
The result
Live at toheed-sahar.com. The SEO audit script, which renders every route in real Chrome, last reported 0 blockers, 0 high and 0 warnings with the thinnest page at 313 words. The project page lists 86 projects next to 20 client testimonials with screenshots and 7 live demos you can log into.
The ← and → keys turn the page too.