A modern, AI-powered cybersecurity dashboard built with Next.js 14, featuring real-time threat monitoring, interactive analytics, and an intelligent AI assistant powered by Groq.
- Weekly Threat Overview - Visual representation of daily threat counts with interactive line charts
- Threat Type Distribution - Pie chart breakdown of malware, phishing, and other attack types
- Real-time Metrics - Track total threats, peak days, and security trends
- Comprehensive table of security events
- Sortable by time, source IP, attack type, and severity
- Color-coded severity levels (High/Medium/Low)
- AI-generated scan results and descriptions
- Powered by Groq - Ultra-fast inference with the
openai/gpt-oss-120bmodel - RAG-like Context - AI has full access to dashboard data for accurate, data-driven responses
- Cybersecurity Expert - Trained to analyze threats, provide recommendations, and assist with incident response
- Real-time Interaction - Smooth chat interface with loading states and auto-scroll
- Security alerts and system notifications
- Timestamped event log
- Quick access to recent security events
- Glassmorphism Design - Modern, frosted glass aesthetic
- Dark/Light Mode - Toggle between themes
- Responsive Layout - Works on desktop and tablet
- Smooth Animations - Framer Motion powered transitions
- Shooting Star Background - Subtle animated background effect
- Node.js 18+
- npm or yarn
- Groq API Key (Get one here)
-
Clone the repository
git clone https://github.com/yourusername/ml-project.git cd ml-project -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.envand add your Groq API key:GROQ_API_KEY=your_groq_api_key_here GROQ_MODEL=openai/gpt-oss-120b
-
Run the development server
npm run dev
-
Open in browser Navigate to http://localhost:3000
ml-project/
├── app/
│ ├── api/
│ │ └── chat/
│ │ └── route.ts # Groq API integration
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main dashboard component
├── lib/
│ └── prompts.ts # AI system prompt & dashboard data
├── public/ # Static assets
├── .env.example # Environment template
├── package.json
├── tailwind.config.ts
└── tsconfig.json
The AI assistant is designed as a cybersecurity expert with access to your dashboard data:
- 📈 Weekly threat statistics (35 threats this week)
- 🎯 Threat distribution (Malware 60%, Phishing 25%, Other 15%)
- 📝 Recent threat logs with IPs, timestamps, and severity
- 🔔 Security notifications and alerts
- 🖥️ Current system status
- "What are the top threats this week?"
- "Show me high severity attacks"
- "What happened on Saturday?"
- "Tell me about the SQL injection attempt"
- "What's our current security posture?"
- "Recommend actions for the DDoS attack"
| Technology | Purpose |
|---|---|
| Next.js 14 | React framework with App Router |
| TypeScript | Type safety |
| Tailwind CSS | Utility-first styling |
| Framer Motion | Animations |
| Recharts | Data visualization |
| Lucide React | Icons |
| Groq SDK | AI inference |
This project uses Next.js 14.2.13 (stable), which is NOT affected by the React Server Components vulnerability (CVE-2025-66478). The vulnerability only affects:
- Next.js 15.x, 16.x
- Next.js 14.3.0-canary.77 and later canary releases
Your installation is secure. ✅
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
- Real database integration (PostgreSQL/MongoDB)
- User authentication
- Custom threat alerts
- Email/Slack notifications
- Historical data analysis
- Export reports to PDF
- Multi-tenant support
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Built with ❤️ using Next.js and Groq AI