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
|
|
@ -6,6 +6,7 @@ const envSchema = z.object({
|
|||
VITE_SUPABASE_ANON_KEY: z.string().min(1),
|
||||
VITE_ENABLE_T2_LIVE: z.enum(['true', 'false']).optional(),
|
||||
VITE_SENTRY_DSN: z.string().url().optional(),
|
||||
VITE_MAINTENANCE_MODE: z.enum(['true', 'false']).optional(),
|
||||
})
|
||||
|
||||
const parsed = envSchema.safeParse(import.meta.env)
|
||||
|
|
@ -18,3 +19,4 @@ if (!parsed.success) {
|
|||
}
|
||||
|
||||
export const env = parsed.data
|
||||
export const isMaintenanceMode = parsed.data.VITE_MAINTENANCE_MODE === 'true'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue