Duet is a Next.js App Router starter for marketing sites that need two languages from day one. Every page exists in English and Arabic, routed as /en/ and /ar/ and pre-rendered for both. The Arabic version mirrors the layout for right-to-left reading, rather than just translating the text.
Translations are TypeScript objects, so if the Arabic dictionary is missing a string the English one has, the build fails and names it. A test also checks list lengths, placeholders, prices and untranslated text. Prices, percentages, dates, times and lists are formatted with the browser's built-in Intl APIs. Arabic uses Latin digits by default, and one setting switches to Arabic-Indic digits.
The site root sends each visitor to the language they chose before, or their browser's best match, and this works on static hosts too. The language switcher keeps visitors on the same page and labels each language in its own script. Each page has canonical and hreflang links for search engines. Styles use Tailwind's logical utilities throughout, Arabic gets its own font stack and line height, and arrows point the right way in both directions.
The sample landing page for a fictional booking product includes a hero with a live-formatted appointment card, features, steps, an FAQ, pricing with a monthly/yearly switch, and a contact form that validates in the reader's language. It is accessible by default with measured contrast, and comes with 16 Vitest tests. Adding a third language takes one config entry and one dictionary.
Included: the complete project source (no node_modules), .env.example, tests and a README covering setup, structure, adding languages and pages, RTL-safe styling and deployment. Run npm install to start.