diff --git a/README.md b/README.md index c890b2de3..028ab03bd 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ -![headnew](https://github.com/user-attachments/assets/a44fd1e7-1861-46d0-aff7-19cf33e86baa) + +![new_header](https://github.com/user-attachments/assets/e236b764-0ddc-42ff-a1f1-8fbb3d2e0e65) # SurfSense -While tools like NotebookLM and Perplexity are impressive and highly effective for conducting research on any topic, SurfSense elevates this capability by integrating with your personal knowledge base. It is a highly customizable AI research agent, connected to external sources such as search engines (Tavily), Slack, Notion, and more to come. +While tools like NotebookLM and Perplexity are impressive and highly effective for conducting research on any topic/query, SurfSense elevates this capability by integrating with your personal knowledge base. It is a highly customizable AI research agent, connected to external sources such as search engines (Tavily), Slack, Notion, YouTube, GitHub and more to come. # Video @@ -45,6 +46,7 @@ Open source and easy to deploy locally. - Slack - Notion - Youtube Videos +- GitHub - and more to come..... #### 🔖 Cross Browser Extension @@ -150,6 +152,20 @@ For local frontend setup just fill out the `.env` file of frontend. You should see your Next.js frontend running at `localhost:3000` +#### Some FrontEnd Screens + +**Search Spaces** + +![search_spaces](https://github.com/user-attachments/assets/e254c38c-f937-44b6-9e9d-770db583d099) + +**Research Agent** + +![researcher](https://github.com/user-attachments/assets/fda3e61f-f936-4b66-b565-d84edde44a67) + + +**Agent Chat** + +![chat](https://github.com/user-attachments/assets/bb352d52-1c6d-4020-926b-722d0b98b491) --- @@ -193,12 +209,15 @@ After filling in your SurfSense API key you should be able to use extension now. ### **BackEnd** - **FastAPI**: Modern, fast web framework for building APIs with Python - + - **PostgreSQL with pgvector**: Database with vector search capabilities for similarity searches - **SQLAlchemy**: SQL toolkit and ORM (Object-Relational Mapping) for database interactions +- **Alembic**: A database migrations tool for SQLAlchemy. + - **FastAPI Users**: Authentication and user management with JWT and OAuth support + - **LangChain**: Framework for developing AI-powered applications - **GPT Integration**: Integration with LLM models through LiteLLM @@ -214,10 +233,8 @@ After filling in your SurfSense API key you should be able to use extension now. - **pgvector**: PostgreSQL extension for efficient vector similarity operations - **Chonkie**: Advanced document chunking and embedding library - -- Uses `AutoEmbeddings` for flexible embedding model selection - -- `LateChunker` for optimized document chunking based on embedding model's max sequence length + - Uses `AutoEmbeddings` for flexible embedding model selection + - `LateChunker` for optimized document chunking based on embedding model's max sequence length diff --git a/surfsense_web/app/dashboard/[search_space_id]/connectors/add/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/connectors/add/page.tsx index f70bb6209..5eeaae5a8 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/connectors/add/page.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/connectors/add/page.tsx @@ -1,29 +1,24 @@ "use client"; -import { cn } from "@/lib/utils"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"; +import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible"; import { - IconBrandGoogle, - IconBrandSlack, - IconBrandWindows, IconBrandDiscord, - IconSearch, - IconMessages, - IconDatabase, - IconCloud, IconBrandGithub, IconBrandNotion, - IconMail, + IconBrandSlack, + IconBrandWindows, IconBrandZoom, + IconChevronDown, IconChevronRight, + IconMail, IconWorldWww, } from "@tabler/icons-react"; -import { motion, AnimatePresence } from "framer-motion"; -import { useState } from "react"; -import { useParams } from "next/navigation"; +import { AnimatePresence, motion } from "framer-motion"; import Link from "next/link"; -import { Button } from "@/components/ui/button"; -import { Separator } from "@/components/ui/separator"; -import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible"; -import { useForm } from "react-hook-form"; +import { useParams } from "next/navigation"; +import { useState } from "react"; // Define the Connector type interface Connector { @@ -31,7 +26,7 @@ interface Connector { title: string; description: string; icon: React.ReactNode; - status: "available" | "coming-soon" | "connected"; // Added connected status example + status: "available" | "coming-soon" | "connected"; } interface ConnectorCategory { @@ -47,12 +42,11 @@ const connectorCategories: ConnectorCategory[] = [ title: "Search Engines", connectors: [ { - id: "web-search", - title: "Web Search", - description: "Enable web search capabilities for broader context.", + id: "tavily-api", + title: "Tavily API", + description: "Search the web using the Tavily API", icon: , - status: "available", // Example status - // Potentially add config form here if needed (e.g., choosing provider) + status: "available", }, // Add other search engine connectors like Tavily, Serper if they have UI config ], @@ -94,10 +88,9 @@ const connectorCategories: ConnectorCategory[] = [ description: "Connect to your Notion workspace to access pages and databases.", icon: , status: "available", - // No form here, assumes it links to its own page }, { - id: "github-connector", // Keep the id simple + id: "github-connector", title: "GitHub", description: "Connect a GitHub PAT to index code and docs from accessible repositories.", icon: , @@ -127,6 +120,44 @@ const connectorCategories: ConnectorCategory[] = [ }, ]; +// Animation variants +const fadeIn = { + hidden: { opacity: 0 }, + visible: { opacity: 1, transition: { duration: 0.4 } } +}; + +const staggerContainer = { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.1 + } + } +}; + +const cardVariants = { + hidden: { opacity: 0, y: 20 }, + visible: { + opacity: 1, + y: 0, + transition: { + type: "spring", + stiffness: 260, + damping: 20 + } + }, + hover: { + scale: 1.02, + boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)", + transition: { + type: "spring", + stiffness: 400, + damping: 10 + } + } +}; + export default function ConnectorsPage() { const params = useParams(); const searchSpaceId = params.search_space_id as string; @@ -141,85 +172,142 @@ export default function ConnectorsPage() { }; return ( -
+
-

Connect Your Tools

-

+

+ Connect Your Tools +

+

Integrate with your favorite services to enhance your research capabilities.

-
+ {connectorCategories.map((category) => ( - toggleCategory(category.id)} - className="space-y-2" + variants={fadeIn} + className="rounded-lg border bg-card text-card-foreground shadow-sm" > -
-

{category.title}

- - {/* Replace with your preferred expand/collapse icon/button */} - - -
- -
- {category.connectors.map((connector) => ( -
-
-
-
- {connector.icon} -

- {connector.title} -

- {connector.status === "coming-soon" && ( - - Coming soon - - )} - {/* TODO: Add 'Connected' badge based on actual state */} -
-

- {connector.description} -

-
-
- {/* Always render Link button if available */} - {connector.status === 'available' && ( -
- - - -
- )} - {connector.status === 'coming-soon' && ( -
- -
- )} - {/* TODO: Add logic for 'connected' status */} -
- ))} + toggleCategory(category.id)} + className="w-full" + > +
+

{category.title}

+ + +
- - -
+ + + + + {category.connectors.map((connector) => ( + + + +
+ + {connector.icon} + +
+
+
+

{connector.title}

+ {connector.status === "coming-soon" && ( + + Coming soon + + )} + {connector.status === "connected" && ( + + Connected + + )} +
+
+
+ + +

+ {connector.description} +

+
+ + + {connector.status === 'available' && ( + + + + )} + {connector.status === 'coming-soon' && ( + + )} + {connector.status === 'connected' && ( + + )} + +
+
+ ))} +
+
+
+ + ))} -
+
); } diff --git a/surfsense_web/components/ModernHeroWithGradients.tsx b/surfsense_web/components/ModernHeroWithGradients.tsx index c0bde3fe0..bd10a50ca 100644 --- a/surfsense_web/components/ModernHeroWithGradients.tsx +++ b/surfsense_web/components/ModernHeroWithGradients.tsx @@ -36,7 +36,7 @@ export function ModernHeroWithGradients() {

- A Customizable AI Research Agent just like NotebookLM or Perplexity, but connected to external sources such as search engines (Tavily), Slack, Notion, and more. + A Customizable AI Research Agent just like NotebookLM or Perplexity, but connected to external sources such as search engines (Tavily), Slack, Notion, YouTube, GitHub and more.

{ const iconProps = { className: "h-4 w-4" }; switch(connectorType) { + case 'GITHUB_CONNECTOR': + return ; case 'YOUTUBE_VIDEO': return ; case 'CRAWLED_URL':