feat(app): implement MAINTENANCE_MODE + configure Claude Code security hooks
- Add VITE_MAINTENANCE_MODE guard in main.tsx (no providers mount when true) - Create static MaintenancePage.tsx (Direction H tokens, zero dependencies) - Register VITE_MAINTENANCE_MODE in env.ts (optional, defaults to false) - Add PreToolUse security hook (9 patterns from SECURITY.md §2) - Add Stop hook for file size check (>200 lines warning) - Register Semgrep MCP server - Update ARCHITECTURE.md §7 (new env var) - Resolve FTD-16 in TECH_DEBT.md
This commit is contained in:
parent
bf778a5a4d
commit
ca4291d7eb
6 changed files with 52 additions and 1 deletions
24
src/app/MaintenancePage.tsx
Normal file
24
src/app/MaintenancePage.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { Logo } from '@/shared/components/Logo'
|
||||
|
||||
export function MaintenancePage() {
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col items-center justify-center gap-6 bg-canvas px-4 text-center">
|
||||
<Logo size="md" />
|
||||
<div className="space-y-2">
|
||||
<h1 className="text-2xl font-semibold text-ink-1">Maintenance en cours</h1>
|
||||
<p className="text-sm text-ink-3">
|
||||
Expria est temporairement indisponible. Revenez dans quelques instants.
|
||||
</p>
|
||||
</div>
|
||||
<p className="text-xs text-ink-4">
|
||||
Des questions ?{' '}
|
||||
<a
|
||||
href="mailto:support@expria.ca"
|
||||
className="text-expria underline-offset-4 hover:underline"
|
||||
>
|
||||
support@expria.ca
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
import { StrictMode } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import { Providers } from './providers'
|
||||
import { MaintenancePage } from './MaintenancePage'
|
||||
import { isMaintenanceMode } from '@/shared/config/env'
|
||||
import '../index.css'
|
||||
|
||||
const container = document.getElementById('root')
|
||||
|
|
@ -10,6 +12,6 @@ if (!container) {
|
|||
|
||||
createRoot(container).render(
|
||||
<StrictMode>
|
||||
<Providers />
|
||||
{isMaintenanceMode ? <MaintenancePage /> : <Providers />}
|
||||
</StrictMode>,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue