What problem does it solve? Building a Nuxt 4 frontend with secure session handling, role-based access, and shared dashboard-to-chat state requires consistent patterns that are easy to get wrong, such as leaking JWTs to client JavaScript or wrapping massive API payloads in deep reactivity. ## Core Features & Use Cases - Session composable with httpOnly JWT cookies: Implements useSession with login, profile fetching, and role-based hasScope guards without exposing tokens to client JavaScript. - Route middleware and module visibility: Provides a global auth middleware that redirects unauthenticated users and hides modules based on role scope. - Shared dashboard-chat Pinia store (TwinBI pattern): Sends active dashboard filters as agent context with every chat query, including a "summarize current view" action. - Use Case: A directivo opens the dashboard, drills down into a chart, and clicks "Resumir vista actual" — the store serializes the active filters and sends them as context to the chat agent via useChatStream. ## Quick Start Ask the AI to create a useSession composable and global auth middleware for the Nuxt 4 portal using httpOnly cookie authentication with role-based route guards.