What a Client Site Taught Me About Scope: Building Ngài Năng Suất in Next.js
A Vietnamese course site for an AI-productivity coach: seven static routes, typed content modules, and the consent gate that had to default to denied.
Proof boundary. This is a website build, not a product result. It has no revenue number, no traffic figure, and no conversion rate to show, because I was not given access to any of them. What follows is what the repository and a local production build actually contain. The site is live at ngainangsuat.vn; the code is private to the client, so there is no repository link.
The job I actually got
A productivity coach in Vietnam needed his course site rebuilt. He had a design preview, a Drive folder of course material, and no working site. The ask sounded like design work. It turned out to be mostly decisions about what the site should refuse to do.
The brief was seven pages: a landing page, a course list, a process explainer, an about page, a sources page, a contact page, and a legacy route kept reachable. Nothing needed a database. Nothing needed an account system. Nothing needed a CMS, because the course catalogue changes a few times a year and the client is happy to have me change it.
That constraint is the whole article. Almost every scope problem on this build came from something I was tempted to add.
What I chose not to build
| Temptation | What shipped instead | Why |
|---|---|---|
| A CMS for the course catalogue | Typed records in src/content/courses.ts | The catalogue is one file of 64 lines. A CMS would add an admin surface, an auth story and a database for four edits a year. |
| A contact form with email delivery | A wrapper over the client's existing Facebook page | He already answers Messenger daily. A new inbox he would not check is a support burden disguised as a feature. |
| A 3D hero on WebGL | A static inline SVG diamond | The original preview used a GPU scene. Shipping it means a canvas, a render loop, and a device that has to keep up. The SVG holds the same layout with no GPU dependency. |
| Server-rendered course pages | Static prerendering, one client island | Every page is public and identical for every visitor. Server rendering would buy nothing and cost a cold start. |
The WebGL decision is the one I would defend hardest. The preview looked good, and a 3D hero is the kind of thing a client notices. But it is also the first thing to break on an old Android phone, which is most of this audience. A static SVG renders identically everywhere and costs nothing to maintain. I kept the composition and dropped the engine.
The one place I could not simplify
Privacy. The site has Google Analytics and Vercel Analytics available, and under Vietnamese and EU expectations a visitor has to consent before analytics storage is granted.
The default is not a detail here. A consent dialog that starts permissive and asks later is not consent. So the layout ships a beforeInteractive script that sets all four consent flags to denied before anything loads:
window.gtag('consent', 'default', {
analytics_storage: 'denied',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied'
});
The dialog then writes accepted or rejected to localStorage and fires a custom event so an open tab reacts without a reload. On acceptance the site grants analytics_storage only. Ad storage, ad user data and ad personalization stay denied, so no remarketing signal and no ad cookie is ever set. Vercel Analytics is cookieless and needs no grant.
That is a small piece of code and a disproportionate amount of the build’s thinking. It is also the part a client will never thank you for.
How I checked it
The repository has two test layers, and they cover different things.
- Component tests (Vitest, jsdom): 8 tests, all passing.
- HTTP tests against a running production build: 31 tests, which check that every public page renders real content, that unavailable routes and unknown slugs return true 404s, that metadata follows the configured origin, that crawler endpoints list exactly the public pages, and that security headers reject framing and MIME sniffing.
The HTTP suite needs a server. Run npm run build && npm run start -- --port 3001 first, or the suite fails with connection errors and it looks like 12 broken tests when nothing is broken. I hit that exact false alarm on this build and wasted ten minutes before checking the README.
With the server up: 31 tests, 31 passing, in about 360 ms.
What this build taught me
Static is a feature, not a shortcut. Five dependencies total — next, react, react-dom, lucide-react, @vercel/analytics. Every one of them earns its place. A site with five dependencies is a site someone can still build in two years.
A client’s existing habit beats your new feature. He uses Messenger. Giving him a form meant giving him a second inbox, and second inboxes are where leads die.
The privacy default is the design. It is easy to write a banner. It is harder to make the site do nothing until the banner is answered, and to keep the ad flags denied even after a yes.
Limits
I do not have the site’s traffic, its conversion rate, or any business outcome. The client owns those numbers and has not shared them, so I do not claim them. The build is also private, which means none of this is independently checkable — the honest version of that sentence is: read this as a build log, not as a case study with receipts.
What I can stand behind is narrow and real: seven static routes, typed content modules instead of hardcoded markup, a static SVG in place of a GPU scene, a consent gate that defaults closed, and 31 HTTP tests that pass against a production build.