--- description: Documentation standards for Prediqo web React/TypeScript code globs: prediqo_web/src/**/*.{ts,tsx} alwaysApply: false --- # Prediqo web documentation conventions Apply the same readability standards as the backend when editing `prediqo_web/`. ## Required comments 1. **File / module** — Top-of-file block describing the feature or shared module role. 2. **Exported components & hooks** — JSDoc with purpose; `@param` for non-obvious props. 3. **Exported functions & services** — JSDoc with `@param`, `@returns`, `@throws` when relevant. 4. **Complex local helpers** — Brief comment when logic is non-obvious (export, DataGrid setup, token refresh). ## Style - English comments (matches backend). - Do not comment obvious JSX or one-liners. - Keep comments updated when behavior changes. ## Example ```tsx /** * Protects routes: redirects unauthenticated users to login and non-admins away from admin pages. */ export function RequireAuth({ children, adminOnly }: RequireAuthProps) { ```