A production-style hackathon app that analyzes Linux commands with deterministic risk logic and gives users actionable safety guidance before execution.
- Risk score (0-100) for each command
- Blast radius estimation (files affected, downtime, recovery)
- Human-readable explanation of command and flags
- Safer alternatives with one-click copy
- Decision output based on user level:
ALLOW,WARN,BLOCK - Real-time typing analysis preview
- Playground mode (same command in different directories)
- Command chain visualizer
- Learning mode with XP progression
- User auth and command history with Supabase
- Analytics dashboard with risk trends and heatmap
- Frontend: React (Vite), Tailwind CSS, Framer Motion, Zustand, Recharts
- Backend: Node.js + Express
- Database/Auth/Realtime: Supabase
frontend/React appbackend/Express APIsupabase-schema.sqlDB schema and RLS policies
cd frontend
npm install
cd ../backend
npm installcopy .env.example .envFill these values:
- Shared root
.env(used by both frontend and backend)PORTSUPABASE_URLSUPABASE_SERVICE_ROLE_KEYVITE_API_URLVITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
Run SQL from supabase-schema.sql in the Supabase SQL editor.
cd backend
npm run devcd frontend
npm run devOpen the frontend URL (default Vite: http://localhost:5173).
POST /api/analyze- body:
{ command, userLevel, currentDir }
- body:
GET /api/history?userId=...POST /api/save-command- body:
{ userId, command, currentDir, analysis }
- body:
The backend uses a deterministic rules engine only (no AI/ML):
- Base risk by command (
rm,dd,mkfs, etc.) - Additional risk by flags (
-rf,--no-preserve-root, wildcard usage) - Directory context weighting (
/,/home,/tmp) - User-level weighting (
beginner,intermediate,expert) - Decision tree:
BLOCKif risk >= 80WARNif risk >= 50ALLOWotherwise
rm -rf /- expected: very high risk,
BLOCK,SYSTEM KILLER
- expected: very high risk,
chmod -R 777 /etc- expected: high risk,
WARNorBLOCKbased on context
- expected: high risk,
ls -la /home- expected: low risk,
ALLOW
- expected: low risk,
cd / && rm -rf *- expected: high chain risk and explicit chain visualization
Most severe infra incidents start with one dangerous command in the wrong context. This product acts like a CLI pre-flight safety layer for teams: deterministic, transparent, and fast enough for real workflows.
- Start on landing page and live typing preview
- Run dangerous command in analyzer and show decision + alternatives
- Toggle playground mode and compare contexts
- Show command chain visualizer with multi-step command
- Sign in and open dashboard for trend charts and heatmap
- Show learning mode XP and command breakdown