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


