Skip to content

abelxmendoza/OmegaCore-Chatbot2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OMEGA-CORE A.I.

High Voltage, Post-Human Precision.

A cutting-edge AI chatbot platform built with Next.js and the AI SDK, designed for security researchers, penetration testers, and cybersecurity professionals. Omega-Core features a dark cyberpunk aesthetic with purple neon accents and supports multiple LLM providers optimized for security research.

Omega-Core Theme Next.js TypeScript

🎯 Features

Core Capabilities

  • Multi-Provider LLM Support: OpenAI GPT-4, xAI Grok, and Anthropic Claude models
  • Security Research Focus: Optimized prompts and model selection for penetration testing and cybersecurity research
  • Cyberpunk UI: Dark theme with purple neon accents, circuitry textures, and particle animations
  • Real-time Streaming: Fast, responsive chat experience with streaming responses
  • Chat History: Persistent conversation history with search and organization
  • File Uploads: Support for document analysis and processing
  • Artifact Generation: Code, documents, and spreadsheet creation tools
  • Web Browsing: Fetch and extract content from web pages for research and information gathering
  • Shell Execution: Controlled shell command execution with security safeguards (disabled in production by default)
  • Persistent Memory: Vector database-powered memory system that remembers context across conversations
  • Memory Management: Remember, forget, and search through stored memories
  • Email Integration: Send emails directly from the chat interface
  • Calendar Integration: Create and manage calendar events
  • Command Palette: Quick access to tools and commands (⌘K)

LLM Providers

OpenAI (Default)

  • GPT-4 - Primary chat model
  • GPT-4 Reasoning - Advanced reasoning capabilities

xAI Grok (Recommended for Security Research)

  • Grok Beta - More permissive for security research
  • Grok-2 - Latest model
  • Grok-2 Vision - Vision-capable version

Anthropic Claude (Optional)

  • Claude 3.5 Sonnet - Excellent for technical security discussions
  • Claude 3 Opus - Most capable for complex analysis
  • Claude 3 Sonnet - Balanced performance
  • Claude 3 Haiku - Fast and affordable

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ (ARM64 native for M1 Pro)
  • pnpm (recommended) or npm
  • PostgreSQL database (with pgvector extension)
  • API keys for your chosen LLM providers

🍎 MacBook M1 Pro Users

See M1_PRO_SETUP.md for optimized setup instructions and one-command installation.

Installation

  1. Clone the repository

    git clone https://github.com/abelxmendoza/OmegaCore-Chatbot2.0.git
    cd OmegaCore-Chatbot2.0
  2. Install dependencies

    pnpm install
    # or
    npm install
  3. Set up environment variables

    Create a .env.local file with the following:

    # Authentication
    AUTH_SECRET=your-random-secret-here
    NEXTAUTH_SECRET=your-random-secret-here
    
    # Database
    POSTGRES_URL=your-postgres-connection-string
    
    # OpenAI (Required for GPT-4)
    OPENAI_API_KEY=sk-...
    
    # xAI (Optional - for Grok models)
    XAI_API_KEY=your-xai-key
    
    # Anthropic (Optional - for Claude models)
    ANTHROPIC_API_KEY=sk-ant-...
    
    # Vercel Blob Storage (Optional - for file uploads)
    BLOB_READ_WRITE_TOKEN=vercel_blob_...
    
    # Shell Execution (Optional - NOT recommended for production)
    # Set to 'true' to enable shell execution tool in production
    # WARNING: Only enable if you understand the security implications
    ENABLE_SHELL_TOOL=false
  4. Run database migrations

    pnpm db:migrate
  5. Start the development server

    pnpm dev

    Open http://localhost:3000 in your browser.

🎨 Theme Customization

Omega-Core features a custom cyberpunk theme with the following color palette:

  • Background: #060606 (Matte black)
  • Panels: #0b0b10 (Dark purple-tinted)
  • Primary Accent: #9b00ff (Neon purple)
  • Text: #d8d6e4 (Light metallic gray)
  • Fonts: JetBrains Mono, Orbitron

The theme includes:

  • Animated background with purple glow effects
  • Circuitry texture overlay
  • Neon purple button gradients
  • Smooth hover animations

πŸ”§ Configuration

Model Selection

Models are configured in lib/ai/models.ts and entitlements in lib/ai/entitlements.ts.

Guest users can access:

  • GPT-4 models
  • Grok Beta
  • Claude 3 Haiku

Registered users have access to all models including premium options.

Security Research Prompts

The system prompts are optimized for security research and can be customized in lib/ai/prompts.ts. The default prompt emphasizes:

  • Ethical hacking and penetration testing
  • Security vulnerability analysis
  • Tool development for security research
  • Educational security content

πŸ“¦ Tech Stack

  • Framework: Next.js 15.3 (App Router, Turbo mode)
  • Language: TypeScript
  • AI SDK: AI SDK v4.3
  • Database: PostgreSQL with Drizzle ORM + pgvector
  • Authentication: NextAuth.js v5
  • Styling: Tailwind CSS with custom cyberpunk theme
  • UI Components: Radix UI
  • Fonts: JetBrains Mono, Orbitron, Geist
  • Performance: LRU Cache, Token Bucket Rate Limiting, Vector Indexing

πŸš€ Performance Optimizations

  • LRU Cache: O(1) embedding and query caching
  • Token Bucket Rate Limiting: O(1) rate limit checks
  • Vector Indexing: O(log n) similarity search with IVFFlat
  • Batch Processing: Optimized embedding generation
  • Database Indexing: Optimized queries with composite indexes

See OPTIMIZATION_GUIDE.md for detailed performance documentation.

🚒 Deployment

Deploy to Vercel

  1. Connect your GitHub repository to Vercel

  2. Add environment variables in Vercel dashboard:

    • AUTH_SECRET - Generate at https://generate-secret.vercel.app/32
    • POSTGRES_URL - Your PostgreSQL connection string
    • OPENAI_API_KEY - Required
    • XAI_API_KEY - Optional (for Grok)
    • ANTHROPIC_API_KEY - Optional (for Claude)
    • BLOB_READ_WRITE_TOKEN - Optional (for file uploads, if using Vercel Blob)
  3. Deploy!

Manual Deployment

# Build for production
pnpm build

# Start production server
pnpm start

πŸ› οΈ Development

Available Scripts

pnpm dev          # Start development server
pnpm build        # Build for production
pnpm start         # Start production server
pnpm lint          # Run linter
pnpm db:migrate    # Run database migrations
pnpm db:studio     # Open Drizzle Studio

Project Structure

β”œβ”€β”€ app/                    # Next.js app directory
β”‚   β”œβ”€β”€ (auth)/            # Authentication pages
β”‚   β”œβ”€β”€ (chat)/            # Chat interface and API routes
β”‚   └── layout.tsx         # Root layout with theme
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ chat-header.tsx    # Header with Omega-Core branding
β”‚   └── app-sidebar.tsx    # Sidebar with branding
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ ai/                # AI provider configuration
β”‚   β”‚   β”œβ”€β”€ providers.ts   # Multi-provider setup
β”‚   β”‚   β”œβ”€β”€ models.ts      # Available models
β”‚   β”‚   β”œβ”€β”€ prompts.ts    # System prompts
β”‚   β”‚   └── tools/        # AI tools (calculator, weather, web browser, shell, etc.)
β”‚   └── db/               # Database queries and schema
└── types/                 # TypeScript type definitions

πŸ” Security & Privacy

  • Comprehensive security measures - See SECURITY.md for details
  • Input validation - All inputs validated with Zod schemas
  • Output sanitization - All outputs sanitized to prevent XSS
  • Rate limiting - Token bucket algorithm prevents abuse
  • Security headers - CSP, HSTS, X-Frame-Options, and more
  • Secure cookies - HttpOnly, Secure, SameSite flags
  • SQL injection prevention - Drizzle ORM with parameterized queries
  • File upload security - Type validation, magic byte verification, size limits
  • User data isolation - Users can only access their own data
  • API key security - All keys stored as environment variables (never committed)
  • Database connections - SSL required for all connections
  • Guest mode - Available for anonymous usage with limited permissions

πŸ“ License

This project is open source and available under the MIT License.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ™ Acknowledgments


Omega-Core A.I. - High Voltage, Post-Human Precision.

For questions or support, open an issue on GitHub.

About

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 53