All articles

Published on ·2 min read·By Manassé N'Dri

A bilingual, resilient and search-friendly Next.js portfolio

Two languages without duplicate content, projects synced with GitHub, a site that survives a database outage, structured data and a sitemap incident: behind the scenes of manasse.dev.

  • Portfolio — manasse.dev
  • Next.js
  • SEO
  • i18n
  • TypeScript

Context

This portfolio, manasse.dev, is a Next.js 16 application (App Router, React 19, TypeScript) with a built-in back office. Its job: to be found by recruiters and clients, in English and French, and to stay up to date effortlessly. Here are the choices behind it, and one instructive incident.

1. Two languages, two URLs, one content to manage

French is served without a prefix (/), English under /en. A proxy rewrites French URLs internally and redirects /fr/… to the unprefixed URL: one public URL per page.

Content is written in French in the admin; the English version is an overlay linked to each item by its identifier. An untranslated field falls back to French, and every page declares its hreflang alternates, including an x-default pointing to English for international visitors.

2. Projects that update themselves

Recent public GitHub repositories show up automatically, refreshed every hour. The admin lets me pin, hide, rewrite or give each project its actual status (live, in testing, prototype…). If the GitHub API does not respond, a saved snapshot takes over.

3. A site that stays up when the database is down

Content lives in MongoDB. If the database is unreachable, the public site uses a bundled copy of the content instead of showing an error, and the build does not break. The admin, on the other hand, always reads the database directly: it cannot overwrite the data with that fallback copy.

4. SEO, page by page

  • Schema.org structured data: Person and ProfilePage on the home page, SoftwareSourceCode for projects, Service and FAQPage for services, BlogPosting for articles, with breadcrumbs.
  • Share images generated for every page and language.
  • llms.txt: a factual summary of the profile for AI answer engines, generated from the admin content.

5. The sitemap incident

After launch, Google Search Console reported 16 errors in the sitemap. The cause: the sitemap had been generated at build time, while the site URL setting still held the old address. All 16 URLs pointed to a different domain than the one declared.

On-demand revalidation did not apply to that file. The fix was simpler: the sitemap, robots.txt and the manifest are now generated on every request. It is a lightweight read, and they always reflect the admin content.

6. Admin security

A JWT session in an httpOnly, SameSite=strict cookie, a constant-time password comparison, Zod validation on every write, Markdown rendered without raw HTML, CSP and HSTS headers. Login throttling is shared across all serverless instances through a MongoDB counter instead of staying in memory.

Takeaways

  • One public URL per page and per language, with consistent hreflang tags.
  • Plan for the database being down, without putting the data at risk.
  • Anything that must always reflect the content (sitemap, robots) should not be cached at build time.