Intelligent web search and information synthesis platform
Features • Demo • Installation • Usage • Architecture • Contributing • License
SageSearch is a sophisticated search platform built with Flutter and FastAPI that transforms how users discover information online. It intelligently retrieves, analyzes, and synthesizes content from multiple web sources, delivering comprehensive AI-enhanced responses to user queries while maintaining source attribution.
SageSearch in action - Intelligent search results with source attribution
- 🎯 Intuitive Interface - Clean, modern UI with focus on content and readability
- 📱 Fully Responsive - Seamless experience across desktop, tablet, and mobile devices
- 💡 Smart Suggestions - Contextual search suggestions and history tracking
- 🎨 Customizable Theme - Dark mode support with elegant color scheme
- ⚡ Performance Optimized - Fast loading times and smooth animations
- 🔍 Intelligent Web Search - Leverages Tavily API for accurate and relevant search results
- 🧠 Smart Source Ranking - Uses sentence transformers to prioritize the most relevant sources
- 🤖 AI-Powered Responses - Generates comprehensive answers using Google Gemini
- 🔄 Real-time Communication - WebSocket support for streaming responses
- 🌐 RESTful API - Clean and well-documented endpoints for easy integration
- Flutter SDK (latest version)
- Dart SDK (latest version)
- A code editor (VS Code, Android Studio, or IntelliJ IDEA)
- Python 3.8+
- Tavily API key - For web search capabilities
- Google Gemini API key - For AI response generation
-
Clone the repository
git clone https://github.com/AyushKr2003/sage_search.git cd sage_search -
Install dependencies
cd frontend flutter pub get -
Environment Setup
Create a
.envfile in the frontend directory based on the provided example:copy .env.example .env
Then update the values in
.envwith your configuration:BACKEND_URL='ws://localhost:8000/ws/chats' -
Run the application
flutter run
-
Navigate to the backend directory
cd backend -
Set up the environment
# Create and activate virtual environment python -m venv venv .\venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Configure environment variables copy .env.example .env
Edit the
.envfile with your API keys:TAVILY_API_KEY=your_tavily_api_key GEMINI_API_KEY=your_gemini_api_key -
Run the server
# Development mode with auto-reload uvicorn main:app --reload # Production mode uvicorn main:app --host 0.0.0.0 --port 8000
The server will be available at
http://localhost:8000
SageSearch provides an intuitive interface for searching and discovering information:
- Enter your query in the search bar
- Review the AI-synthesized answer with highlighted sources
- Explore related topics through suggested searches
- Toggle between light and dark themes based on your preference
sage_search/
├── lib/
│ ├── constant/
│ │ └── const.dart # Application constants and configuration
│ ├── pages/
│ │ └── home_page.dart # Main application interface
│ ├── theme/
│ │ └── colors.dart # Theme definitions and styling
│ ├── widgets/
│ │ ├── custome_list.dart # Reusable list component
│ │ ├── search_section.dart # Search interface component
│ │ ├── side_bar.dart # Navigation sidebar
│ │ ├── side_bar_button.dart # Interactive sidebar elements
│ │ └── top_bar.dart # Application header component
│ ├── services/
│ │ └── web_socket_service.dart # API and data services
│ └── main.dart # Application entry point
│
├── server/
│ ├── main.py # FastAPI application and endpoints
│ ├── config.py # Configuration settings
│ ├── services/
│ │ ├── search_service.py # Tavily API integration
│ │ ├── sort_sorce_service.py # Source ranking
│ │ └── llm_service.py # Gemini AI integration
│ ├── pydantic_model/
│ │ └── chat_body.py # Request/Response models
│ ├── tests/ # Unit and integration tests
│ └── requirements.txt # Project dependencies
POST /chats
Request body:
{
"query": "What are the latest developments in quantum computing?"
}Connect to /ws/chats to receive streaming responses.
Example client usage:
const ws = new WebSocket('ws://localhost:8000/ws/chats');
ws.onopen = () => {
ws.send(JSON.stringify({ query: "What are the latest developments in quantum computing?" }));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(data);
};Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature) - Commit your Changes (
git commit -m 'Add some amazing feature') - Push to the Branch (
git push origin feature/amazing-feature) - Open a Pull Request
See the open issues for a list of proposed features and known issues.
This project is licensed under the MIT License - see the LICENSE file for details.
- Flutter - UI toolkit for building natively compiled applications
- Google Fonts - Beautiful typography
- Material Design - Design system and components
- Tavily API - For search capabilities
- Google Gemini - For AI response generation
- FastAPI - For the web framework
- Sentence Transformers - For source ranking
- All contributors who have helped shape SageSearch


