Quick start
build right after astro build): unit tests for the TypeScript under
src/ (coverage gate: 90%, and 80% for any single file), and smoke tests in smoke/ that read the built dist/ — every page
exists in every language, each has its title, description, canonical and hreflang links, no internal
link or asset points to a missing file, the sitemap and robots.txt match the built pages, and no
undefined or raw translation key leaked into the HTML. One file on its own:
npx vitest run <file> --coverage.enabled=false (smoke files need a built dist/).
Where things live
Rule of thumb: language-neutral facts (URLs, prices, handles) live in
src/data/; anything
a reader sees as words lives in public/locales/.Rebranding (the short path)
1
Brand & product data
Edit
src/data/site.ts (name, emails, socials — the brand name in header/footer/titles is
driven entirely by site.name) and src/data/product.ts (download links, prices, features).2
Assets
Replace the icon set in
public/ (favicon.ico, favicon-16/32/48.png,
apple-touch-icon.png, icon-192.png, icon-512.png, icon-512-maskable.png) and the
1200×630 social card public/og-default.png, and put your name in public/site.webmanifest;
drop your app screenshots into src/screenshots/ (01-…, 02-…) and delete the demo images.3
Domain & copy
Set
PUBLIC_SITE_URL in env/env.prod; swap the copy in public/locales/en/*.json.Legal documents
The site ships a Privacy Policy (/privacy) and Terms (/terms) as a comprehensive
starter template, in English and Russian:
- Privacy Policy — GDPR/CCPA-shaped: who is responsible, what’s collected and why, legal basis, sharing, international transfers, retention, security, data breaches, children, AI & machine learning, automated decisions, your rights, plus regional sections for the EEA, UK & Switzerland, California (CCPA/CPRA), other US states and Canada (PIPEDA).
- Terms — a hardened end-user agreement: license, acceptable use, intellectual property, your content, third-party services, purchases & subscriptions, warranty disclaimer, limitation of liability, indemnification, termination, governing law & disputes, and the Apple & Google store terms the stores require.
privacyModules in
src/data/product.ts — each entry adds one matching section, and anything not listed stays out,
so the policy never over-discloses (a common App Store / Google Play rejection). The modules:
push, payments, uploads, location, contacts, camera_media, microphone, health,
financial, identity, ugc, ai, ads. The kit ships with push, payments and
uploads.
Make them yours:
1
Fill in the placeholders
Set
legal.company and legal.jurisdiction in src/data/site.ts — they replace
[Your Company] and [your country] throughout. The contact address is
site.supportEmail.2
Match the modules to your app
Keep
privacyModules in step with what the app does; the wording lives in
public/locales/<lang>/legal.json.3
Get them reviewed
Each document opens with a notice to replace the placeholders and have the text reviewed
for your jurisdiction. It’s a strong starting point, not legal advice.
VITE_LEGAL_PRIVACY_URL / VITE_LEGAL_TERMS_URL
(see App).
Design tokens & fonts
Colours, fonts, radii, spacing, elevation and motion are CSS custom properties insrc/styles/_variables.scss, with light and dark themes:
- Accent is a dusty-indigo ramp (
--accent-50…900) — change--accent-400(dark) /--accent-600(light) and it propagates everywhere. - Neutrals are warm greys, not pure zinc.
- Fonts are a pairing: a display face — Golos Text — on headings (
--font-display), and the system stack for body/UI (--font-sans). The display face is self-hosted: its woff2 files sit inpublic/fonts/, declared by the@font-faceblocks insrc/styles/base/_fonts.scss, andsrc/layouts/Base.astropreloads the weight the page heading uses. To swap it: replace the woff2 files inpublic/fonts/, update the@font-faceblocks in_fonts.scss, point--font-displayat the new family, and update the preloaded file (preloadFont) inBase.astro. Any OFL font with Cyrillic works; the kit ships one so it’s legal to redistribute.
Craft layer
src/styles/utilities/_effects.scss holds the depth/motion primitives — all token-driven and
prefers-reduced-motion-safe: a designed focus ring, data-reveal (fade-up on scroll),
.spotlight (cursor-follow on cards), .ambient-glow (hero bloom), .text-gradient.
Navigation uses Astro View Transitions (<ClientRouter /> in Base.astro). The site’s scripts
— the reveal/spotlight script in Base.astro, the home hero gallery, the header — re-initialise on
every astro:page-load.
Languages
Ships English + Russian; the switcher is in the header. Every part of the site — the i18n config, the sitemap, the header switcher, breadcrumbs, structured data, the layout, the content schema — reads one list,LOCALES in src/data/locales.ts. Adding a third language (e.g. de)
is three steps:
1
Register the code
Add it to
LOCALES in src/data/locales.ts (['en', 'ru', 'de']). Give it a switcher
label under langs in every public/locales/*/nav.json, and extend the two per-language
choices in src/layouts/Base.astro: its Open Graph locale (ogLocale) and preloaded font
subset (preloadFont).2
Translate
Copy
public/locales/en/ → public/locales/<code>/ and translate. For blog/changelog, add
<slug>-<code>.md with lang: "<code>"; a blog translation carries the same
translationKey as the other language versions of that post — that’s what links them for
hreflang.3
Build
npm run build runs astro-i18next generate, producing the localized page tree under
src/pages/<code>/ — rebuilt each build, never edited. Add src/pages/<code>/ next to
src/pages/ru/ in .gitignore and in the ESLint ignores in eslint.config.mjs.'ru' from LOCALES in src/data/locales.ts and delete public/locales/ru/ + the
*-ru.md files.
Generator gotchas:
- No
---after a page’s closing frontmatter fence (e.g. a// --- sectioncomment in a<script>):astro-i18next generatematches the frontmatter greedily and rewrites the English source into unparseable output. Inside the frontmatter it’s fine. - The localized copy sits one folder deeper, and only the frontmatter’s relative
importpaths are rewritten — write path strings such asimport.meta.globroot-relative (/src/…), and importsrc/data/into a page<script>through the@data/*alias. - Locale JSON is read once at dev-server start — restart
npm run serveafter editingpublic/locales/*.
Content, support form, monitoring
- Blog & changelog are Astro content collections — add a Markdown file, it appears. Schemas in
src/content.config.ts. Pages read fromsrc/data/+ locale JSON, so nothing is hardcoded. - Support form: set
PUBLIC_SUPPORT_ENDPOINTto the full URL of your API’sPOST /v1/support(e.g.https://api.example.com/v1/support) and add the site’s origin to the API’sCORS_ORIGINS. It posts without an account; the API emails each message to itsMAIL_REPLY_TO(Reply-To = the sender, so you answer from your mail client), allows 5 messages per IP per 10 minutes, and silently drops bots (a hidden honeypot field + a minimum fill time). Empty (default) = demo mode: it validates but shows an “email us” notice instead of posting. No code change on launch day — set the variable and rebuild. - Sentry loads only when
PUBLIC_SENTRY_DSNis set, cookies are accepted, and it’s notlocalhost. Empty DSN = off.
Stack
Astro (+ View Transitions) · SCSS · astro-i18next · astro-seo ·@astrojs/sitemap ·
astro-robots-txt · astro-compress · Iconify (lucide + simple-icons) · @sentry/browser.