My Journey Building the CyberAI Research Hub

I embarked on creating the CyberAI Research Hub, an online platform that enables cybersecurity experts, researchers, and students to fight the dynamic world of cyber threats with agility and accuracy. Driven by the Perplexity Sonar API and developed using a cutting-edge tech stack, this project was an exhilarating ride through AI, web development, and cybersecurity. Here's how I came up with the inspiration, what I learned in the process, how I made it, and what obstacles I had to overcome.


What Motivated Me to Develop This Project?

The motivation for the CyberAI Research Hub came from the constant speed of cyber threats and the inefficiencies present in conventional research methodologies. Cybersecurity experts are confronted with a daunting task: remaining one step ahead of attacks such as ransomware, info stealers, and zero-day exploits.

With 190,000 new malware variants appearing every second and ransomware assaults increasing 81% from 2023 to 2024 (CrowdStrike 2025 Global Threat Report), human research—searching through reports, blogs, and databases—is too time-consuming and error-prone. One overlooked threat can cost organizations millions.

The Perplexity Sonar API, offering a real-time, web-wide search and citation-supported answers, stood out to me as revolutionary. I saw it as a tool that would be like having a personal research assistant, providing precise, sourced responses to queries such as:

  • “What are the current IOCs for Lumma stealer?”
  • “How do I avoid CVE-2025-5678?”

My intention was to equip the cybersecurity community by making research more efficient, allowing experts to make quicker, better-informed decisions in a high-pressure industry.


What Did I Learn While Building This Project?

The CyberAI Research Hub was an enriched learning experience, combining leading-edge AI with contemporary web development and cybersecurity knowledge. Below are the major lessons that I learned:

🔍 Perplexity Sonar API Integration

  • Built accurate queries and used the sonar-pro model for sophisticated questions.
  • Applied search_domain_filter to prioritize sources like cisa.gov and crowdstrike.com.
  • Managed API rate limits and parsed JSON responses for seamless integration.

⚛️ React + TypeScript Development

  • Created reusable components with type safety.
  • TypeScript helped catch errors early, resulting in a more reliable codebase.

🔁 State Management with React Query

  • Used React Query to cache data and fetch efficiently.
  • Optimized API calls to keep the UI responsive even during frequent use.

🛠️ Supabase as a Backend

  • Learned to use PostgreSQL-based storage and real-time subscriptions.
  • Stored user profiles and saved searches securely.

🎨 Styling with Tailwind CSS and ShadcnUI

  • Embraced utility-first styling with Tailwind.
  • Used ShadcnUI for polished, pre-built components with a cybersecurity aesthetic.

🛡️ Cybersecurity Basics

  • Studied concepts like TTPs, IOCs, and countermeasures to ensure real-world relevance.

🔐 Security Best Practices

  • Protected API keys, encrypted user data, and enforced HTTPS.

How Did I Build the Project?

The CyberAI Research Hub was constructed with a modern tech stack—React + TypeScript, Tailwind CSS + ShadcnUI, React Query, Supabase, and the Perplexity Sonar API—through a structured development process.

🧠 Research and Planning

  • Tested Sonar API with queries like “Latest ransomware trends 2025.”
  • Reviewed existing threat intelligence tools to define the Hub’s unique value.

🔌 Setting Up the Perplexity Sonar API

  • Acquired an API key, tested with curl and requests in Python.
  • Queried using sonar-pro, max_tokens: 1000, and search_domain_filter.

💻 Building the Frontend (React + TypeScript)

Built a responsive UI featuring:

  • A natural language input field.
  • Markdown-formatted answer and citation display.
  • Export button for PDF/text downloads.
  • Dark theme with neon accents (cybersecurity-inspired).
  • Type-safe components to minimize bugs.

🔄 State Management (React Query)

  • Managed asynchronous data fetching from Sonar and Supabase.
  • Cached repeat queries and implemented optimistic updates.

🧱 Building the Backend (Supabase)

Used Supabase to provide:

  • PostgreSQL database for user profiles and saved searches.
  • Authentication and real-time features (e.g., live alerts).
  • React Query + Supabase client for efficient integration.

🔗 Integrating the Perplexity Sonar API

  • Parsed response data into Markdown.
  • Displayed sourced answers in a readable, interactive format.

🧪 Testing and Iteration

  • Tested queries like “Mitigation strategies for AMOS stealer.”
  • Adjusted UI based on feedback (e.g., improved readability).

🚀 Deployment

  • Hosted frontend on Vercel, backend via Supabase’s hosted infrastructure.
  • Enabled HTTPS and protected environment variables.
  • Resulted in a secure, fast, and professional-grade tool.

What Challenges Did I Encounter?

🎯 Maintaining Answer Accuracy

Challenge: Varying source quality impacted reliability.
Solution: Used search_domain_filter and included citations for transparency. Optimized query phrasing.

🔄 Managing API Rate Limits

Challenge: Risk of hitting limits under heavy use.
Solution: Cached frequent queries and added exponential backoff for retries.

🔐 Securing the Application

Challenge: The app itself needed to be secure.
Solution: Protected API keys (dotenv), enforced HTTPS, used Supabase Auth, and ran mock security audits.

⚖️ Balancing Speed and Depth

Challenge: Needed both quick answers and deep insights.
Solution: Leveraged sonar-pro's high throughput and tunable response depth.

🧠 Learning Supabase

Challenge: Supabase was new, especially real-time features.
Solution: Followed tutorials, built simple database functionality first, then advanced features.

🧾 Building User Trust

Challenge: Experts are skeptical of AI accuracy.
Solution: Provided source citations, planned feedback/reporting features.


Conclusion

The CyberAI Research Hub was a game-changing initiative that married my love for AI with the pressing requirements of the cybersecurity ecosystem. Spurred by the inefficiencies of human research and empowered by the Perplexity Sonar API, I built a tool that enables professionals to act decisively against cyber threats.

Using a modern stack—React + TypeScript, Tailwind CSS + ShadcnUI, React Query, Supabase, and Sonar API—I created a fast, scalable, and intelligent platform. Along the way, I gained expertise in integrating AI, securing applications, and addressing real-world cybersecurity needs.

More than a project, this was a mission to empower researchers with the speed and precision of AI. I’m proud to share it and hope it inspires others to explore the powerful intersection of AI and cybersecurity.

Built With

Share this project:

Updates