You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enables tailwindcss and autoprefixer plugins for stylesheet pipeline.
frontend/tailwind.config.js
Tailwind config
Declares content globs (pages/components/app) and extends theme with dark color token.
frontend/setup_frontend.ps1
Setup automation script
Verifies Node/npm, optionally cleans installs, runs npm install, checks key packages, creates .env.local, prints next steps.
4.2 Components (frontend/components)
File
What It Contains
Detailed Behavior
frontend/components/PredictionCard.jsx
Active ML summary component
Animated card rendering risk_score, confidence, attack type, hybrid sub-scores, predicted attack tags, and CVE list with NVD links. Used by report page.
frontend/components/LogTerminal.jsx
Placeholder component file
Currently empty; scan/history pages render logs inline instead of using this component.
frontend/components/RiskMeter.jsx
Placeholder component file
Currently empty; no active risk gauge component rendered from this file.
frontend/components/VulnTable.jsx
Placeholder component file
Currently empty; report table is rendered directly in page component.
4.3 Pages (frontend/pages)
File
What It Contains
Detailed Behavior
frontend/pages/_app.js
App wrapper
Imports styles/globals.css and wraps route component in a full-height container.
frontend/pages/index.js
Landing page
Reads token presence to alter nav CTA; renders feature cards and “How it works” flow; routes to login/register/scan/history/contact.
frontend/pages/login.js
Login page
Dark/light toggle persisted to localStorage; submits credentials via services/api.login; stores token/user and routes to /scan; handles HTTP/network error messaging.
frontend/pages/register.js
Register page
Redirects authenticated users to /scan; dark/light toggle persistence; submits signup via services/api.register; stores token/user and routes to /scan; displays validation/server/network errors.
frontend/pages/scan.js
Main scan dashboard
Auth-gated; loads scanner list (getAvailableScanners), starts scans (startScan), polls status (getScanStatus every 3s), appends backend logs, tracks progress/status, redirects to report on completion.
frontend/pages/history.js
History dashboard
Auth-gated history list from getScanHistory; status/risk badges and timestamps; report navigation only enabled for completed scans.
frontend/pages/results/index.js
Alternate results listing
Similar to history with risk classification and summary cards; supports refresh and new scan actions; routes into report page.
frontend/pages/contact.js
Contact + FAQ page
Frontend-only contact form simulation (sent state), static channel links, animated FAQ accordion, nav links to home/scan.
frontend/pages/report/[id].js
Detailed report page
Fetches results via getScanResults(id); renders summary, PredictionCard, findings table, raw output; PDF download via downloadPDFReport(id) blob handling.
frontend/pages/report/Report.module.css
Legacy report CSS module
Contains static table/container styles from an earlier styling approach; current report page primarily uses Tailwind classes.
frontend/pages/results/Results.module.css
Legacy results CSS module
Contains static table/button/risk-color classes from earlier styling; current results page primarily uses Tailwind classes.