Resolved multiple issues preventing the 'competitor-analysis' app from running and serving its frontend:
1. **Fixed Python SyntaxError in Prompts:** Corrected unterminated string literals and ensure proper multi-line string formatting (using .format() instead of f-strings for complex prompts) in .
2. **Addressed Python SDK Compatibility (google-generativeai==0.3.0):**
* Removed for and by adapting the orchestrator to pass JSON schemas as direct Python dictionaries, as required by the older SDK version.
* Updated with detailed guidance on handling / imports and dictionary-based schema definitions for older SDKs.
3. **Corrected Frontend Build Dependencies:** Moved critical build dependencies (like , , ) from to in .
* Updated to include this pitfall, ensuring frontend build tools are installed in Docker.
4. **Updated Documentation:**
* : Added comprehensive lessons learned regarding dependencies, Python SDK versioning (specifically and imports for ), and robust multi-line prompt handling.
* : Integrated specific details of the encountered errors and their solutions, making the migration report a more complete historical record and guide.
These changes collectively fix the 404 error by ensuring the Python backend starts correctly and serves the frontend assets after a successful build.
This commit introduces the foundational elements for the new "Company Explorer" web application, marking a significant step away from the legacy Google Sheets / CLI system.
Key changes include:
- Project Structure: A new directory with separate (FastAPI) and (React/Vite) components.
- Data Persistence: Migration from Google Sheets to a local SQLite database () using SQLAlchemy.
- Core Utilities: Extraction and cleanup of essential helper functions (LLM wrappers, text utilities) into .
- Backend Services: , , for AI-powered analysis, and logic.
- Frontend UI: Basic React application with company table, import wizard, and dynamic inspector sidebar.
- Docker Integration: Updated and for multi-stage builds and sideloading.
- Deployment & Access: Integrated into central Nginx proxy and dashboard, accessible via .
Lessons Learned & Fixed during development:
- Frontend Asset Loading: Addressed issues with Vite's path and FastAPI's .
- TypeScript Configuration: Added and .
- Database Schema Evolution: Solved errors by forcing a new database file and correcting override.
- Logging: Implemented robust file-based logging ().
This new foundation provides a powerful and maintainable platform for future B2B robotics lead generation.
- Updated 'docker-compose.yml' with new DuckDNS token to lock out rogue updaters (FritzBox/HA).
- Enhanced 'dns-monitor/monitor.sh' to detect 'IP Flapping' (Zombie Updaters) by comparing Public vs. Global vs. Local IPs.
- Updated documentation 'duckdns_setup.md' with troubleshooting steps for IP flapping and zombie updaters.
- Reverts docker-compose.yml to use volume mount for gemini_api_key.txt, due to format constraints.
- Restores and refines Config.load_api_keys() in config.py.
- **Crucially, calls Config.load_api_keys() at the start of gtm_architect_orchestrator.py to ensure keys are loaded.**
- Adjusts _get_gemini_api_key in helpers.py to prioritize keys from Config.API_KEYS.
- This definitively addresses the 'API Key missing' error by guaranteeing key initialization.
- Modifies docker-compose.yml to use for injecting the Gemini API key, which is more robust than volume mounting.
- Updates helpers.py to prioritize reading the API key from the environment variable.
- Removes the now-redundant file-based key loading logic from config.py and the Dockerfile.
- This change completely bypasses the problematic file system interactions within the container, providing a definitive fix for the 'API Key missing' error.
- Refactor Docker build process for gtm-app to ensure reliability
- Correct volume mounts and build context in docker-compose.yml to prevent stale code
- Fix frontend 404 error by using relative paths in index.html
- Ensure API key is correctly mounted into the container
- Stabilize Node.js to Python data passing via explicit --data argument
- Update gtm_architect_documentation.md with extensive troubleshooting guide
- market_db_manager.py: Made DB_PATH configurable via environment variable.
- Dockerfile.b2b: Included market_db_manager.py in the B2B container image.
- docker-compose.yml: Configured separate DB paths and volumes for Market Intel and B2B Assistant.
- B2B Server: Added API routes for project management (list, load, save, delete).
- B2B UI: Implemented auto-save and a 'Project History' modal for loading past runs.
- Implement a central reverse proxy (Nginx) with Basic Auth on port 8090.
- Create a unified landing page (dashboard) to access B2B Assistant and Market Intelligence.
- Update frontends with relative API paths and base paths for subdirectory routing (/b2b/, /market/).
- Optimize Docker builds with .dockerignore and a Python-based image for market-backend.
- Enable code sideloading for Python logic via Docker volumes.
- Fix TypeScript errors in general-market-intelligence regarding ImportMeta.
- Added Dockerfile and nginx.conf for frontend production build.
- Added docker-compose.yml to orchestrate backend and frontend.
- Updated geminiService.ts to support relative API paths via Nginx proxy.
- Updated documentation with deployment instructions for Synology/Docker.