- Role
- Design and development
- Year
- 2026
- Stack
- Next.js 16 route handlers · OpenAI Responses API · GPT-6.1 Sol / low (configured) · Canvas 2D · Node test runner
Overview
Visitors arrive with different questions: some want to see the work, some have an early project idea, and some are hiring. The assistant offers each a relevant path without forcing everyone through a budget form.
Project and hiring outlines have separate fields. Confirmed visitor details stay separate from suggested first-version features, deferred ideas, and open questions. Visitors can edit, copy, or download a partial outline at any point. Live messages go to the model provider for processing; no message is sent to Mohammad automatically.

Decisions
The assistant has a defined job: it can discuss Mohammad’s work and possible collaborations, including brief technical explanations of the case studies. A separate scope check precedes answer generation; unrelated requests get a short redirect. It has no browsing, code execution, message-sending, or booking tools. Model-based scope decisions still need evaluation.
Only four explicitly selected case studies can become project cards. Their facts and localized text come from the same content as the site. The assistant is identified as Mohammad’s own portfolio feature, not client work. Missing rates, availability, and contact details are never invented.
The guided preview is clear about being a structured guide. Visitors select a field before saving text into it. A conversation starter or thank-you never overwrites their idea. Live failures show an explanatory error and preserve the draft; they never silently turn into demo answers.



Build
A Next.js route validates the request body against a 16 KiB limit. Invalid requests consume only the separate ingress allowance, not model quota. Production requires shared Redis counters and expiring concurrency leases. A signed state envelope ties the outline and bounded history to a server-issued visitor cookie, so browser-supplied history is never trusted.
The provider adapter is configured for GPT-6.1 Sol with low reasoning through the official Responses API. Text streams while the reply generates; outline fields and project cards commit only after completion and validation. Null or invalid optional patches do not erase facts. There is one bounded JSON repair attempt, and usage-limit errors carry a cooldown.
The requested ChatGPT-plan connection is wired up but not authenticated. It requires approved OAuth access and remains restricted to local testing; a hosted application needs its own approved arrangement. The labelled guided preview works independently. The canvas ribbon and the Persian RTL interface retain reduced-motion support.
- 01This site onlyRequests from other origins are refused
- 0216 KiB, streamedCounted as it arrives, not trusted from headers
- 03Spend guardShared request budgets and expiring concurrency leases
- 04JSON, checkedOnly validated facts commit after the reply completes
Outcome
“Ask the assistant” opens the guide from the portfolio. Automated tests cover request validation, scope routing, state integrity, guided outlines, and interrupted streams. Live model quality and subscription access require a separate authenticated evaluation; the screenshots show guided mode.











