Skip to content

SaiVigneshchalnati/cyber_shield_ai

Repository files navigation

Cyber Shield AI - Cybersecurity Assistant

Cyber Shield AI is an interactive chatbot powered by Google's Gemini AI, specifically designed to provide expert guidance on cybersecurity topics. The application offers real-time responses to user queries about various aspects of cybersecurity, making complex security concepts more accessible.

Cyber Shield AI Screenshot

Features

  • 🛡️ Specialized Cybersecurity Focus

    • Passwords & Authentication
    • Zero Trust Security
    • Malware & Ransomware Protection
    • Network Security (Firewalls, VPN, IDS)
    • Phishing & Social Engineering
    • Data Privacy & Encryption
    • Incident Response
    • Web & Cloud Security
    • Mobile & IoT Security
    • Compliance & Regulations
    • Emerging Threats
    • Security Tools
    • DevSecOps
  • 💬 Interactive Chat Interface

    • Real-time responses
    • Message history
    • Auto-scrolling chat
    • Loading states
    • Error handling
  • 🎨 Modern UI/UX

    • Responsive design
    • Dark theme
    • Clean typography
    • Smooth animations
    • Professional iconography

Technology Stack

  • Frontend Framework: React 18.3
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Icons: Lucide React
  • AI Integration: Google Generative AI (Gemini)
  • Build Tool: Vite
  • Development Tools: ESLint

Project Structure

cyber-shield-ai/
├── src/
│   ├── https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip           # Main application component
│   ├── https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip         # Application entry point
│   └── https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip        # Global styles
├── public/              # Static assets
├── https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip          # HTML template
├── https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip        # Project dependencies
├── https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip       # TypeScript configuration
├── https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip      # Vite configuration
└── https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip           # Project documentation

Setup Instructions

  1. Clone the Repository

    git clone <repository-url>
    cd cyber-shield-ai
  2. Environment Setup Create a .env file in the root directory:

    VITE_GEMINI_API_KEY=your_gemini_api_key
    
  3. Install Dependencies

    npm install
  4. Start Development Server

    npm run dev
  5. Build for Production

    npm run build

Environment Variables

  • VITE_GEMINI_API_KEY: Google Gemini AI API key (Required)

API Integration

The application uses Google's Gemini AI API for processing cybersecurity queries. The integration is handled in https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip through the getGeminiResponse function:

const genAI = new GoogleGenerativeAI(https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip);

async function getGeminiResponse(question: string): Promise<string> {
  const model = https://raw.githubusercontent.com/SaiVigneshchalnati/cyber_shield_ai/main/semicrome/shield-cyber-ai-1.5.zip({ model: "gemini-pro" });
  // ... process response
}

Component Architecture

App Component

  • Manages chat state and user interactions
  • Handles message history
  • Implements auto-scrolling
  • Processes AI responses
  • Renders chat interface

Message Interface

interface Message {
  type: 'user' | 'bot';
  content: string;
}

Styling

The application uses Tailwind CSS for styling with a custom dark theme:

  • Background colors: gray-900, gray-800
  • Accent colors: cyan-500, cyan-600
  • Text colors: gray-100
  • Responsive design breakpoints
  • Flexible chat container layout

Error Handling

The application implements comprehensive error handling:

  • API connection errors
  • Invalid responses
  • Network issues
  • Input validation

Security Considerations

  1. API Key Protection

    • Environment variables for sensitive data
    • No client-side exposure of API keys
  2. Input Sanitization

    • User input validation
    • Empty message prevention
    • Rate limiting through UI disabled states

Performance Optimizations

  1. React Optimizations

    • Efficient state management
    • Memoized callbacks
    • Optimized re-renders
  2. UI/UX Optimizations

    • Smooth scrolling
    • Loading states
    • Responsive design
    • Efficient message rendering

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT License - feel free to use this project for personal or commercial purposes.

Support

For support, please open an issue in the repository or contact the development team.


Built with ❤️ using React and Google's Gemini AI

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors