A modern, AI-powered web application for analyzing URLs and detecting potential security threats. Built with Next.js 14, TypeScript, and Tailwind CSS, featuring real-time threat analysis using VirusTotal and HuggingFace APIs.
- Real-time URL Analysis: Instant threat detection using multiple security services
- Dual-Engine Detection: Combines VirusTotal's comprehensive database with AI-powered analysis
- Batch Analysis: Analyze multiple URLs simultaneously (up to 10 per batch)
- Smart Caching: 15-minute result caching to reduce API calls
- URL History: Track and re-analyze previously checked URLs
- Modern UI/UX: Beautiful, responsive interface with smooth animations
- Dark Mode: Full dark mode support with system preference detection
- Educational Content: Learn about phishing, malware, and URL safety
- Detailed Results: Comprehensive threat information with actionable recommendations
- Export Functionality: Download batch analysis results as CSV
- Progressive Web App: Optimized for all devices
- Server-Side Rendering: Fast initial load with Next.js
- Type Safety: Full TypeScript implementation
- API Routes: Secure backend API with proper error handling
- Vercel-Ready: Optimized for deployment on Vercel
- Node.js 18+ and npm
- VirusTotal API key
- HuggingFace API key
- Clone the repository:
git clone https://github.com/amanthanvi/malicious-url-detector.git
cd malicious-url-detector
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env.local
file in the root directory:
VIRUSTOTAL_API_KEY=your_virustotal_api_key
HUGGINGFACE_API_KEY=your_huggingface_api_key
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
The easiest way to deploy is using Vercel:
- Push your code to GitHub
- Import your repository on Vercel
- Add environment variables in Vercel dashboard:
VIRUSTOTAL_API_KEY
HUGGINGFACE_API_KEY
- Deploy!
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Headless UI, Hero Icons
- Animations: Framer Motion
- State Management: Zustand
- API Integration: Axios
- Theme: next-themes
- Analytics: Vercel Analytics
Analyzes a single URL for threats.
Request Body:
{
"url": "https://example.com"
}
Response:
{
"url": "https://example.com",
"timestamp": "2024-01-01T00:00:00Z",
"status": "safe|suspicious|malicious|error",
"summary": "Analysis summary",
"details": {
"virusTotal": { ... },
"huggingFace": { ... }
},
"threatInfo": { ... }
}
- API keys are stored as environment variables
- Input validation on all user inputs
- Rate limiting implemented via caching
- No user data is permanently stored
- HTTPS enforced in production
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
This project is licensed under the MIT License - see the LICENSE file for details.
- VirusTotal for their comprehensive threat intelligence API
- HuggingFace for the final-complete-malicious-url-model
- Vercel for hosting and deployment
Aman Thanvi - contact@amanthanvi.com | aman_thanvi@outlook.com
Project Link: https://github.com/amanthanvi/malicious-url-detector