Public and private route separation
Public pages use a separate route layout and do not load the authenticated workspace shell, sidebar state, or private clinical QueryClient.
CliviQue security
CliviQue uses layered controls across browser sessions, route layouts, the same-origin gateway, backend authorization, organization and facility scope, caching, database access, and deployment configuration.
Current architecture
These statements describe the current application architecture. They are not claims of a regulatory certification or a guarantee that no security incident can occur.
Public pages use a separate route layout and do not load the authenticated workspace shell, sidebar state, or private clinical QueryClient.
In production, access and refresh credentials are kept in host-bound, Secure, SameSite=Strict, HttpOnly cookies through a same-origin Next.js gateway.
Protected requests are authenticated and authorized by FastAPI. Browser role and permission values are interface hints, not the source of authority.
Sampled clinical and billing paths resolve organization and facility access on the backend before querying protected records.
Private cached state is cleared on login, logout, identity change, storage change, and cross-tab session events. Remote logout redirects other tabs to login.
The application applies CSP, anti-framing, MIME-sniffing prevention, restrictive referrer and permissions policies, no-store responses, origin checks, and Fetch Metadata validation.
Browser boundary
Public routes are statically renderable marketing pages. Only authenticated workspace routes load the clinical QueryClient, workspace shell, permission-aware navigation, and sidebar cookie. Production gateway access is restricted to the configured central HMIS hostname.
Public hospital domains are not treated as authorization evidence and should not receive an HMIS-wide cookie.
Web session behaviour
Protected endpoints resolve the authenticated user and enforce action permissions, subscription entitlements, organization scope, facility scope, and record filters on the backend. Hiding a button alone is never treated as sufficient authorization.
Additional hardening
Production startup validation rejects known development secrets, insecure database transport, unsafe redirect and CORS settings, placeholder billing configuration, development migrations, and other explicitly unsafe defaults. API documentation is disabled by default in production.
Authentication endpoints include configurable account-and-IP keyed throttling. Refresh tokens are stored as hashes and rotated by the backend.
Shared responsibility
Use individual staff accounts and do not share credentials.
Apply appropriate role assignments and promptly disable departing or suspended users.
Protect workstations, mobile devices, networks, backups, exports, and printed documents.
Train staff on privacy, phishing, safe disclosure, and local clinical record procedures.
Review access, facility configuration, subscription scope, and operational logs regularly.
Meet applicable health, privacy, retention, breach, consent, and professional requirements.
Use the contact page and clearly mark the message as a security report. Do not include patient records, passwords, session tokens, secret keys, or unnecessary personal health information in ordinary email. Provide enough non-sensitive detail for safe follow-up.
Guided implementation
A hospital evaluation should cover account roles, facility scope, deployment hosts, data handling, backups, incident contacts, device security, retention expectations, and responsibilities on both sides.