Project Sneak Peek
TradeScout is a next-generation web intelligence tool that allows users to find potential buyers, sellers, importers, or exporters worldwide simply by entering a product name and a location.
By leveraging Artificial Intelligence (Google Gemini) for query optimization and real-time data scraping technologies (SerpAPI/Google Maps), it delivers contact information, addresses, and activity details of companies in seconds.
The primary goal of this project is to automate the market research process for companies currently engaged in or looking to enter international trade.
Future Roadmap:
One of TradeScout’s core strengths is its modular design, built to adapt to changing technology needs without rewriting the entire codebase.
BaseLLMModel) for query generation.Easy Swap: You can switch to OpenAI (GPT-4), Anthropic (Claude), or even local open-source models (Llama 3, Mistral) simply by adding a new class that inherits from BaseLLMModel and updating one line of configuration.
ScraperService is designed to support multiple backends.The project is built on a modern, scalable, and microservices-oriented technology stack:
.
├── app/
│ ├── api/v1/ # API Endpoints (Search router, etc.)
│ ├── core/ # Core configuration (Logger, etc.)
│ ├── db/ # Database and Cache connections (Supabase, Redis)
│ ├── models/ # Pydantic data models (BusinessResult, SearchResponse)
│ ├── services/ # Business logic layer
│ │ ├── llm_models/ # Base classes for easy LLM swapping
│ │ ├── search_fields/ # Dynamic search fields (Subject, Location)
│ │ ├── query_builder.py # AI query builder
│ │ ├── scraper_service.py # SerpAPI integration
│ │ └── search_service.py # Search orchestration
│ └── main.py # FastAPI entry point
├── frontend/
│ └── app_ui.py # Streamlit user interface
├── logs/ # Application logs
├── .env # Environment variables (API keys)
├── docker-compose.yml # Docker service definitions
├── Dockerfile # Backend container definition
└── requirements.txt # Python dependencies
The easiest way to run the project locally is using Docker.
Clone the repository and navigate to the root directory:
git clone https://github.com/imOlogy/trade-scout.git
cd trade-scout
Create a .env file in the root directory and populate it with your specific API keys:
# --- Google AI (Gemini) ---
GOOGLE_API_KEY=Your_Gemini_API_Key
# --- SerpAPI (Google Maps Scraping) ---
SERPAPI_API_KEY=Your_SerpAPI_Key
# --- Supabase (Database) ---
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_KEY=Your_Supabase_Anon_Key
# --- Redis (Cache) ---
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=mysecretpassword
CACHE_EXPIRATION=3600
# --- App Settings ---
LOG_LEVEL=INFO
FASTAPI_URL=http://app:8000
Launch the entire system (Backend, Frontend, and Redis) with a single command:
docker-compose up --build
Once completed:
http://localhost:8501http://localhost:8000/docshttp://localhost:8501 in your browser.Simple keywords entered by the user (e.g., “Hazelnuts”, “Germany”) are sent to the active LLM via app/services/query_builder.py. The system is designed to allow developers to modify the prompt engineering or switch the underlying model without touching the rest of the application logic.
Data is stored in the search_results table. The table is automatically created if it does not exist when the application starts (app/db/db.py).
Redis is used to prevent incurring repeated API costs (SerpAPI and Gemini) for the exact same queries. The default cache duration is 1 hour (CACHE_EXPIRATION).
git checkout -b feature/new-feature).git commit -m 'Add new feature').git push origin feature/new-feature).This project is licensed under the MIT License.
About This Project This platform was engineered with flexibility and ease of customization at its core. It is designed to empower any corporation or business to initiate or accelerate their export/import market analysis with minimal technical friction. Please note: TradeScout is currently under active development. New features, performance optimizations, and integrations are being added regularly to further streamline global trade intelligence.