Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Every environment variable the application reads, and every setting managed in *

## Application and website

Dashboard: **General** (immediate), **Branding & SEO** (immediate), **Social profiles** (immediate), **Marketplace** (immediate).
Dashboard: **General** (immediate), **Branding & SEO** (immediate), **Languages & international SEO** (immediate), **Social profiles** (immediate), **Marketplace** (immediate).

| Variable | Purpose | Required | Secret | Startup | Managed in dashboard | Change needs |
| --- | --- | --- | --- | --- | --- | --- |
Expand Down Expand Up @@ -107,7 +107,7 @@ Dashboard: **Stripe** (immediate, connection test), **PayPal** (immediate, conne

## Advertising

Dashboard: **Google AdSense** (immediate), **Adsterra** (immediate), **Ad placements** (immediate).
Dashboard: **Google AdSense** (immediate), **Adsterra** (immediate), **Ad content policy** (immediate), **Ad placements** (immediate).

## Analytics

Expand Down
30 changes: 30 additions & 0 deletions docs/international-expansion/advertising-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Advertising audit

## Placements on app pages
Before: up to three units, including a compact native unit directly inside a "Ready to try …?" box with a second visit button, and a unit after the reviews at the bottom of the page.
Now: at most **two** — `listing` between the app's details and the reviews (well below the single "Visit Official Website" button) and `desktop-sidebar` on screens ≥ 1280 px. Enforced three times: page markup, the manager's per-page maximum (setting capped at 2) and the browser guard. The `listingNative` toggle is kept for compatibility but unused.

## Controls Webcenta enforces
| Control | Where |
|---|---|
| Ads only after advertising consent | `Ad` component |
| No ads on app pages in blocked categories (gambling, betting, adult, dating, crypto/forex/high-risk finance, weapons/drugs/tobacco/alcohol, political/religious) or rated 18+ | Settings → Ad content policy, `src/server/ads/content-policy.ts` |
| No ads for a country, or no AdSense / no Adsterra for a country | Admin → Country policies |
| No ads when the country is unknown (optional) | Ad content policy |
| One provider per slot: AdSense when approved, else Adsterra; never both | `resolvePlacement` |
| Sandboxed frames; banner and native formats only (no popunder, Smartlink, Social Bar) | `/ads/frame/<unit>` |
| Placement limits, spacing, phone/desktop switches | Settings → Ad placements |
| Report this ad → admin review | `/report-ad`, Admin → Ad reports & policy |

The frame endpoint applies the same country rules, so opening a frame URL directly does not bypass them.

## What depends on the providers (Webcenta cannot do it)
Webcenta cannot see the creative inside an ad frame (cross-origin, sandboxed) and cannot filter it.
- **Google AdSense**: Blocking controls → Content (sensitive and general categories) and Advertiser URLs. Apply every blocked category and the blocked-advertiser list there.
- **Adsterra**: category and advertiser filtering is handled by Adsterra (publisher dashboard options and account manager / support). Ask them to apply the categories in Ad content policy to webcenta.com and send the blocked-advertiser list. Webcenta does not claim that Adsterra filters every category.
- Record the date of each check in Ad content policy; the Ad reports page shows it as a checklist.

Therefore no claim is made that advertising is fully controlled: Webcenta controls where ads appear and for whom; the providers control which ads are served.

## Fast response
Admin → Ad reports & policy links to switching a placement off, turning Adsterra off and the country policies. Reports store page, placement, provider, reason, description and country code (no IP); they are deleted after 12 months.
53 changes: 53 additions & 0 deletions docs/international-expansion/checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# International expansion — checklist

Status legend: ✅ done and tested · 🟡 done with documented limits · ⏳ needs the owner (account, credentials or a decision) · ❌ not done.

## 1. Header, bottom navigation and PWA prompts
- ✅ Exactly one header, one bottom tab bar and one footer: they are rendered only by `src/app/(public)/layout.tsx` (verified by search and by `tests/e2e/international.spec.ts`, which counts them after every tab, after Back, and with `display-mode: standalone` emulated).
- ✅ Tab bar fixed to the viewport bottom, above the home indicator (`env(safe-area-inset-bottom)`), stable while scrolling (tested at 390 × 844 after scrolling 2,000 px).
- ✅ Install, update and push prompts and the cookie notice use one rule (`above-mobile-nav` in `globals.css`): on phones they sit above the tab bar plus the safe area; on larger screens at the bottom edge. Test: the install prompt's bottom edge is above the tab bar's top edge.
- ✅ Install prompt dismissible, choice remembered (`wc-install-dismissed`); not shown in installed mode.
- ✅ Home / Games / Apps / Search kept.
- 🟡 The uploaded screenshots mentioned in the request were not attached to the conversation, and webcenta.com cannot be reached from this build environment (the network proxy refuses it), so the investigation used the code and production builds run locally. See `responsive-audit.md` for the root causes found.

## 2. Card navigation and detail page
- ✅ Store rows and featured cards are one link each; no nested links or buttons; keyboard reachable (tested: Enter on a focused row opens the app page).
- ✅ "View" pills and the "View" label on featured cards removed; section headings use a plain "See all" text link instead of a chevron.
- ✅ Exactly one "Visit Official Website" button on an app page (tested).
- ✅ The "Ready to try …?" box with its sponsored unit and second visit button removed.
- ✅ At most two ads on an app page (placement manager maximum lowered to 2; setting capped at 2): one between the app's details and the reviews, and the desktop sidebar unit. Tested: ≤ 2 loaded, the inline one > 300 px below the visit button.

## 3. Advertising content and country restrictions
- ✅ Admin → Settings → Ad content policy: ten brand-safety categories (all blocked by default), behaviour when the country is unknown, blocked-advertiser register, dates when provider dashboards were last checked.
- ✅ Enforced by Webcenta: no ads on app pages in blocked categories or rated 18+; no ads / no provider for countries switched off in Country policies; optional "no ads when the country is unknown"; the ad frame endpoint applies the same rules.
- ✅ "Report this ad" link on every ad label → `/report-ad` → Admin → Ad reports & policy (resolve / dismiss, audit-logged).
- 🟡 The creative inside an ad frame is chosen by the provider and cannot be inspected or filtered by Webcenta. Category and advertiser blocking must be applied in the AdSense and Adsterra dashboards (checklist on the Ad reports page). See `advertising-audit.md`.
- ✅ AdSense first, Adsterra fallback, never both in one slot; same rules for both.

## 4. Country detection
- ✅ Country from the configured CDN header only (`cf-ipcountry` by default); no GPS, no IP stored for this, unknown is never guessed.
- ✅ No country question at sign-up; optional region in account settings.
- ✅ Restrictions of detected and chosen country add up; choosing a country never removes a restriction (unit-tested, including age of majority).
- ✅ Admin → Country policies table (restricted / permitted categories, adult age, ads off, providers off, last reviewed, notes); removing a policy needs a fresh authenticator code.
- ✅ Privacy Policy explains country detection, language storage and ad reports (published as a new version on existing installs if the policy text was never edited).
- ⏳ Hostinger does not add a country header by itself. Until a CDN that sets one (for example Cloudflare's `CF-IPCountry`) is in front of webcenta.com, every visitor's country is **unknown**. An offline GeoIP database was considered; installing it was blocked in this session and needs the owner's approval (see `geo-compliance.md`).

## 5. Languages
- ✅ 50 languages registered (P1 15, P2 25, P3 10 with Afrikaans as no. 50), valid BCP 47 codes, native names, four right-to-left languages.
- ✅ URLs: English unprefixed, others `/es/…`, `/pt-br/…`, `/zh-hans/…`; same routes; `/en/…` → 308; switched-off languages → 307 to English.
- ✅ Selector in the header, footer, account menu and profile settings; choice saved in a cookie and in the account; browser language only suggested.
- ✅ Locale-aware dates, numbers, plurals, collation and country names (`src/i18n/format.ts`, `Intl`).
- ✅ Real RTL: `dir="rtl"` on `<html>`, logical spacing classes in the public UI (tested: Arabic at 360 and 1440 px, no horizontal scroll, mirrored header).
- 🟡 Coverage: 15 languages have every bundled key (211 keys: navigation, prompts, consent, store pages, metadata, top-level category names); 35 have none and show English. The 14 non-English translations were drafted by AI and **have not been reviewed by native speakers** (marked "Unreviewed" in the dashboard). Admin, developer portal, emails, legal texts and many account forms remain English. See `translation-audit.md`.
- ✅ Developer-written descriptions and reviews stay in their original language and are marked with `lang`.
- ✅ Admin → SEO & languages: languages, coverage %, missing keys, errors, source / review state, last update; `npm run i18n:check` and a unit test fail on markup, placeholder or plural errors.

## 6–7. Multilingual SEO and admin
- ✅ hreflang (reciprocal, x-default, only indexed languages) and self-referencing canonicals; pages whose main text is not translated are indexed only in English.
- ✅ Multilingual sitemap with the same alternates.
- ✅ Translated titles and descriptions; per-language homepage title, description and keywords (validated); category names per language (admin overrides).
- ✅ hreflang validation, sitemap status and robots status in Admin → SEO & languages.
- ⏳ Search Console / Bing: submit `/sitemap.xml`; indexing can only be confirmed there.

## 8–11. Performance, security, tests, deployment
- See `test-results.md` and `seo-audit.md`. Deployment status is in the final report.
31 changes: 31 additions & 0 deletions docs/international-expansion/geo-compliance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Country detection and compliance

## How the country is determined
1. The request header named in Settings → Security → Country header (default `cf-ipcountry`), set by a CDN or proxy from the visitor's IP address.
2. Only a valid two-letter code is accepted; `XX` (unknown) and `T1` (Tor) are treated as unknown.
3. Nothing else: no GPS or browser location, no third-party lookup, no guessing. If the header is missing the country is **unknown**.

Webcenta does not store the IP address for this purpose. The country code is used for the request only, except in ad reports (kept 12 months).

### Current production limitation
Hostinger's web hosting does not add a country header by itself. Until webcenta.com is behind a CDN that sets one (Cloudflare `CF-IPCountry`, or any CDN header configured in Settings → Security), every visitor is "unknown". Effects with the default settings: listings and categories restricted to certain countries are hidden ("deny"), country policies cannot apply, and ads use the brand-safe default.
Options for the owner:
- Put a CDN in front of the site that sets a trusted country header (DNS change: owner's decision; not done here).
- Approve adding an offline country database (for example DB-IP Lite country, CC BY 4.0, ~16 MB). Installing it was attempted in this session and blocked by the session's permission policy, so it was not added.

A header is only trustworthy if the CDN overwrites it. Without a CDN, a visitor could send the header themselves; this can only change which country's restrictions apply (and VPNs already allow the same), which is why restrictions of the chosen and detected country add up and never relax a global rule.

## Uses
| Use | Country used |
|---|---|
| Hidden categories / listings, minimum adult age (Country policies) | detected AND chosen (stricter wins) |
| Listing geo-restrictions | detected, else chosen |
| Ads off / provider off | detected AND chosen |
| Regional display (currency label, country names) | chosen, else detected |
| Language | never — language is independent of country |

## Country policy table (Admin → Country policies)
Columns: country, restricted categories (slugs, validated), permitted categories (record only — never lifts a global block), minimum adult age (18–25), ads off, providers off, last reviewed, notes. Changes are audit-logged; deleting a policy requires a fresh authenticator code. No policies are pre-filled: which categories are lawful in which country is a legal question for the owner.

## Sign-up and profile
Registration does not ask for a country. Account → Profile → Region is optional and explains that restrictions where the visitor is still apply.
12 changes: 12 additions & 0 deletions docs/international-expansion/responsive-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Responsive and PWA audit

## Duplicate header / bottom navigation — findings
- The header, tab bar, footer, PWA manager and cookie notice are rendered in exactly one place (`src/app/(public)/layout.tsx`). Error pages that draw their own header are only used outside that layout. No route renders the layout twice.
- Automated check (`international.spec.ts`): exactly one header and one tab bar after each tab, after Back, after scrolling, in a normal tab and with `display-mode: standalone` emulated (installed app).
- Real overlap found: the install, update and push prompts were fixed at `bottom: 7rem` with no safe-area term, and the cookie notice used its own offset. On iPhones with a home indicator (34 px) and in installed mode the prompt sat on or against the tab bar, which can look like a second bar. Fix: one shared rule (`above-mobile-nav`) = tab bar bottom offset (`max(0.75rem, safe-area)`) + tab bar height + gap; tested at 375 × 812.
- Real bug found while testing: fixed overlays inside the header (which uses `backdrop-filter`) are positioned relative to the header, not the screen. The new language dialog is rendered in a portal (as the account menu already was).
- Long screenshots stitched from a scrolled page repeat sticky and fixed elements. That is a capture artefact, not a second element; the tests above count the elements in the DOM.
- Not reproducible here: the uploaded screenshots were not attached, and webcenta.com is not reachable from this environment. If a duplicate is still visible on a device, a screen recording with the device, browser and whether the app is installed would identify it.

## Viewports
Screenshots for 320 × 568, 360 × 800, 375 × 812, 390 × 844, 430 × 932, 768 × 1024, 1024 × 768, 1280 × 800, 1440 × 900 and 1920 × 1080 are produced by `tests/e2e/responsive-audit.spec.ts` (`RESPONSIVE_AUDIT=1`) and `international.spec.ts` (`INTL_SHOTS=1`, Arabic RTL, install prompt, admin pages). Results are summarised in `test-results.md`.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"generatedAt": "2026-11-20T13:25:04.307Z",
"engine": "Chromium (Playwright device emulation)",
"checks": 230,
"problems": []
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions docs/international-expansion/seo-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Multilingual SEO audit

## URL structure
- English (x-default): `https://webcenta.com/...` — unchanged, no redirects for existing URLs.
- Other languages: `https://webcenta.com/<prefix>/...` (`/es/`, `/fr/`, `/pt-br/`, `/zh-hans/`, `/ar/` …), served by the same routes (proxy rewrite).
- `/en/...` → 308 to the unprefixed URL (no duplicate English copy). Prefixes of languages that are switched off → 307 to English.
- No redirect based on Accept-Language or country. Only a visitor who chose a language (cookie) is sent to that language's URL, with a temporary redirect; crawlers do not keep that cookie.

## hreflang and canonicals
- Each page declares a self-referencing canonical and `alternates.languages` for every **indexed** language plus `x-default` (`src/server/i18n/seo.ts`). The set is identical on every language version, so links are reciprocal by construction (unit-tested with `hreflangProblems`; checked live in Admin → SEO & languages).
- Page kinds:
- translated (home, Apps, categories, category pages): all indexed languages;
- app pages: all indexed languages when "Index app pages in other languages" is on (default), otherwise English only — descriptions are the developer's original text;
- original-language pages (about, policies, contact, collections): English only; other language versions carry `noindex, follow`.
- Search results, accounts, sign-in, API, admin and developer hosts remain `noindex` / excluded.

## Sitemap
`/sitemap.xml` lists every indexable URL in every language it is indexed in, each with the same `xhtml:link` alternates (`src/server/seo/sitemap-entries.ts`), capped at 50,000 URLs. With 15 indexed languages, ~2,600 listings would reach the cap; split the sitemap (`generateSitemaps`) before that.

## Metadata
Translated page titles, descriptions, category names and `og:locale`. Brand and app names are never translated. Homepage title, description and keywords per language are editable (Admin → SEO & languages); keywords are validated (≤ 10, 2–50 characters, no duplicates, links or markup).

## Search Console and Bing
Existing verification (HTML file, meta tag, BingSiteAuth.xml) works on the root domain and covers all language folders. Submit `/sitemap.xml` again so the language URLs are discovered. **No claim is made that any page is indexed**: that can only be confirmed in Search Console and Bing Webmaster Tools.

## Performance
Only the visitor's language catalogue plus English is loaded per request; the browser receives the small `common` catalogue (~8 KB). No hydration mismatch: the server sets `lang`/`dir` from the URL, and the client receives the same messages.
Loading
Loading