Use this folder for Next.js (or other) frontends. Keep UI Kit and i18n centralized.
- Canonical BFF URL: The frontend talks to the backend exclusively via
https://grc-backend.shahin-ai.com(BFF / API gateway). - CSP
connect-src: The HTML entry (index.html) Content-Security-Policy allowsconnect-srconly toself,https://grc-backend.shahin-ai.com(and itswss://variant), and the main Shahin domains. - Domain Enforcement: In production builds, the React app enforces
window.location.host === 'www.shahin-ai.com'and redirects any other host tohttps://www.shahin-ai.comwhile preserving path and query. - Login Flow Rule: All authentication flows must start from
/onhttps://www.shahin-ai.com. Direct access to internal routes (e.g./app,/advanced,/tenant/...) is wrapped byProtectedRouteand redirects unauthenticated users back to/. - Backend Login Origin Check: The BFF
/api/auth/loginendpoint only accepts requests withOrigin: https://www.shahin-ai.comin production and returns403for other origins.