Private resume experience
The private resume experience is a bilingual, invitation-only document surface. It presents English and Chinese resume views behind a server-checked passphrase while keeping the document out of search indexes, caches, and public site discovery. After access is granted, the reader can review the resume, contact the owner, switch language, and print or save the document as a PDF.
Route families
The resume has two locale routes that share one protected document experience. The Chinese route is /resume; the English route is /en/resume. Each route keeps its language in the page, form messages, navigation, content labels, and print control.
The route family follows this high-level path:
flowchart LR
Home[Localized site home] --> EN[English resume<br/>/en/resume]
Home --> ZH[Chinese resume<br/>/resume]
EN <--> ZH[Language switch]
EN --> Gate[Shared access boundary]
ZH --> Gate
Gate --> Document[Localized resume document]
Locale navigation
Each document links back to the matching localized site home and to the other resume language. The language link carries the target language in its link metadata so that a reader and a browser can identify the alternate document.
References: app/…/resume-document.tsx• L16-35 app/…/page.tsx• L1-9 app/…/page.tsx• L1-7
Access boundary
The access boundary decides whether the server may render resume content. A request without a valid resume session receives only the localized entry form, so private copy is not rendered into the page or its server component response before authorization.
The unlock flow is designed for both normal browser use and direct form submission:
sequenceDiagram
participant Reader
participant Resume as Resume route
participant API as Unlock endpoint
participant Session as Private session
Reader->>Resume: Open a resume route
Resume->>Session: Check the resume session
Session-->>Resume: No valid session
Resume-->>Reader: Localized passphrase form
Reader->>API: Submit passphrase
API->>API: Check request and attempt limits
API->>Session: Verify the passphrase
alt Passphrase is valid
API-->>Reader: Set private session and redirect
Reader->>Resume: Reopen the selected locale
Resume-->>Reader: Render the localized resume
else Passphrase is invalid or unavailable
API-->>Reader: Redirect with a localized status
end
Session access
Successful verification creates a short-lived, signed session in an HttpOnly cookie. The browser cannot read the cookie as page script, and a missing, expired, malformed, or credential-mismatched session returns the reader to the gate. Unlock attempts are limited before passphrase work begins, while invalid requests and cross-site mutation requests are rejected.
The resume responses also use private, no-store cache rules and restrictive crawler and referrer policies. The public discovery surfaces omit the resume routes. See resume access control and localized rendering for the detailed access and rendering contract.
References: app/…/resume-page.tsx• L11-37 lib/…/access.ts• L5-17 lib/…/access.ts• L66-92 lib/…/http.ts• L57-102 lib/…/server.ts• L14-35 app/…/resume-document.tsx• L8-14
Access form
The entry form uses the same document grid as the resume. It supports password-style input, an optional show or hide control, localized status messages, and a native POST flow that works when JavaScript is disabled. A successful submission returns the reader to the same locale.
References: components/resume-controls.tsx• L7-63 app/…/resume-content-zh.tsx• L196-207 app/…/resume-page.tsx• L25-37 lib/…/http.ts• L24-55
Document presentation
The unlocked surface presents a single resume model in two localized editions. Both editions use the same document shape: identity and introduction first, followed by experience, selected work, capabilities, and education, with contact links in the introduction and a print action at the end.
Bilingual content
The English and Chinese editions share the main resume themes but allow language-specific copy and structure. The Chinese edition can include several periods for one role, a role description without bullets, representative clients, project engagements, and education notes. The English edition supports experience periods, selected clients, engagements, open-source work, capabilities, and education.
Private localized copy comes from server-only configuration and is checked against a bounded content shape before display. When that copy is not available, the surface falls back to a smaller set of published facts rather than exposing configuration errors or private parser details.
References: app/…/resume-content.tsx• L23-95 app/…/resume-content-en.tsx• L30-121 app/…/resume-content-zh.tsx• L36-126 app/…/resume-content-zh.tsx• L165-194 lib/…/content.ts• L14-60 lib/…/content-zh.ts• L10-61
Responsive document
The document uses an independent light and dark visual system rather than the public site's page styling. On wide screens, section labels and content use a two-part grid. On narrow screens, the grid becomes one column without horizontal overflow. Print mode removes navigation and interactive controls and changes the layout for an A4 document.
References: app/…/resume.css• L1-35 app/…/resume.css• L57-66 app/…/resume.css• L172-217 app/…/resume.css• L219-275
Contact mechanisms
The document gives the reader direct ways to start a conversation or inspect related work. Email and external profile links are always available. A phone link appears only when the localized resume data provides a valid phone value.
| Mechanism | Reader action | Availability |
|---|---|---|
Opens a message to hi@cali.so | All resume views | |
| Phone | Opens a phone link with the configured number | Only when a phone value is present |
| GitHub | Opens the owner's GitHub profile | All resume views |
| Zolplay | Opens the Zolplay site | All resume views |
| Resume links | Opens selected project or company links | When the content provides a URL |
References: app/…/resume-contact.tsx• L5-31 app/…/resume-content.tsx• L37-52 app/…/resume-content-zh.tsx• L169-181 app/…/resume-content-en.tsx• L74-86
Browser verification
Browser verification checks the protected boundary and the reader experience as a complete flow. It covers direct requests, rendered pages, browser history, locale switching, print media, no-script use, and a narrow dark viewport.
Protection checks
The browser suite confirms that locked HTML and server component responses do not contain protected sample copy. It also checks that resume routes are not exposed through public discovery files and that responses carry no-store, noindex, and same-origin referrer controls. After unlock, the suite confirms that the session survives a reload but is not visible to page JavaScript.
References: tests/…/resume.spec.ts• L6-26 tests/…/resume.spec.ts• L27-60 tests/…/resume.spec.ts• L75-87
Presentation checks
The browser suite confirms the English and Chinese views, aligned wide-screen layout, print-only changes, language switching, and the return to the access gate after the session is cleared. It also confirms that a native no-JavaScript submission works on a 375-pixel dark viewport without horizontal overflow.
References: tests/…/resume.spec.ts• L27-74 tests/…/resume.spec.ts• L90-110 components/resume-controls.tsx• L66-88
Change checklist
When these files or sections are changed, remember to consider these:
- Keep
/resumeand/en/resumealigned when changing the shared access gate, redirect target, language switch, or session recheck behavior. - Keep localized form labels and error keys aligned with the status values returned by the unlock endpoint.
- Preserve the no-content-before-access rule for both normal HTML and server component responses when changing content loading or route rendering.
- Keep response privacy headers and public discovery exclusions aligned when changing resume metadata or API behavior.
- Check screen, print, narrow viewport, and dark color-scheme behavior together when changing the resume grid or controls.
- Keep the English and Chinese content schemas aligned with the fields that their view components read, while allowing their documented language-specific fields.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Missing or invalid resume credentials | The form is unavailable and the private document stays locked. | Credential checks require a valid passphrase and a separate session secret. |
| Incorrect passphrase | The reader returns to the same locale with a localized error and no resume content. | Passphrase comparison uses derived keys and timing-safe equality. |
| Too many unlock attempts | Unlock is blocked for 15 minutes. | The resume unlock request has a bounded rate limit before verification. |
| Expired, malformed, or rotated session | A previously open reader sees the access gate after the next server check. | Sessions have a fixed lifetime and are verified against current credentials. |
| Invalid private content configuration | The private content is not rendered as partially parsed data. | Each localized payload has a size, encoding, and schema check. |
| Browser history restores a stale resume page | A page can show a state that no longer matches the server session. | The print control reloads a restored page when the browser reports a persisted history entry. |
Key files
| File | Why to read it |
|---|---|
| app/…/page.tsx | English route entry and direct-entry rendering boundary. |
| app/…/page.tsx | Chinese route entry. |
| app/…/resume-document.tsx | Shared document shell, locale navigation, metadata, and privacy signals. |
| app/…/resume-page.tsx | Server-side decision between the access gate and the unlocked document. |
| app/…/resume-content.tsx | Shared resume composition and English fallback behavior. |
| app/…/resume-content-en.tsx | English experience, open-source, capability, and education sections. |
| app/…/resume-content-zh.tsx | Chinese document sections and localized access gate. |
| app/…/resume-contact.tsx | Email, phone, GitHub, and Zolplay contact links. |
| components/resume-controls.tsx | Passphrase form, print action, and browser history recheck. |
| lib/…/access.ts | Credential validation, session shape, session lifetime, and privacy headers. |
| lib/…/http.ts | Unlock and lock request behavior, redirects, cookies, and request limits. |
| lib/…/server.ts | Server access check and shared request guard setup. |
| lib/…/content.ts | English private content shape and loading boundary. |
| lib/…/content-zh.ts | Chinese private content shape and loading boundary. |
| app/…/resume.css | Responsive, dark-mode, and print presentation rules. |
| tests/…/resume.spec.ts | Browser-level contract for privacy, access, localization, and presentation. |