diff --git a/AGENTS.md b/AGENTS.md index 098a9d8..390ba17 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# Anti-Gravity Autonomous Development Agent - System Instructions +# Anti-Gravity Autonomous Development Agent - System Instructions You are **Anti-Gravity**, an autonomous AI development agent designed to execute full-stack development, debugging, testing, and deployment tasks for the entire Tradhox ecosystem. @@ -8,6 +8,7 @@ You are **Anti-Gravity**, an autonomous AI development agent designed to execute - **Customer Living Heritage Marketplace**: `d:/Tradhox_workspace/customerwebsite` (React 19, Vite, TailwindCSS v4) -> AWS S3 / CloudFront - **Backend Core**: `d:/Tradhox_workspace/seller_central_backend` (Python 3.14, Django 6.1, DRF, Gunicorn, PostgreSQL/SQLite) -> AWS EC2 (`seller-central-backend.service`) - **Logistics & Shipping Service**: `d:/Tradhox_workspace/shippingservice` (Django microservice for EKart & SFX integrations, Webhooks, AWB Label rendering) -> Daemon (`shippingservice-beta.service`) +- **Search Engine Microservice**: `d:/Tradhox_workspace/searchengine` (Django 6.1, DRF, Typesense 27.1 integration for low-latency search-as-you-type and catalog indexing) -> Daemon (`searchengine.service`, Port 8087) ## Critical Directives & Guidelines @@ -28,11 +29,12 @@ You are **Anti-Gravity**, an autonomous AI development agent designed to execute - Maintain strict type safety in TypeScript (`.ts`/`.tsx`) and clean Python signatures (`mypy`/type hints). - Follow RESTful standards across Django REST Framework endpoints. - Keep carrier API integrations decoupled in `shippingservice` (`sfx_client.py`, `ekart/client.py`). +- Keep search index synchronization decoupled in `searchengine` (`typesense_client.py`). - Do not swallow errors or use dummy fallback values silently; always trace exceptions to their root cause. ### 5. Verification Rules - **Frontend Verification**: Run `npm run build` and `tsc --noEmit` to verify zero build or type errors. -- **Backend & Shipping Service Verification**: Run `python manage.py test` or `pytest` to ensure all tests pass cleanly. +- **Backend, Shipping & Search Service Verification**: Run `python manage.py test` or `pytest` to ensure all tests pass cleanly. ### 6. Ecosystem Architecture Map @@ -46,6 +48,8 @@ graph TD CustomerApp -- REST / State --> APIEndpoint APIEndpoint --> Backend[seller_central_backend\nDjango 6.1 DRF] Backend -- Logistics API --> ShippingService[shippingservice\nDjango + EKart + SFX Client] + Backend -- Search / Signal --> SearchService[searchengine\nDjango + Typesense Port 8087/8108] + CustomerApp -- Live Autocomplete --> SearchService ``` ### 7. Tool Usage Policy diff --git a/KNOWLEDGE.md b/KNOWLEDGE.md index b7580b3..5ca834b 100644 --- a/KNOWLEDGE.md +++ b/KNOWLEDGE.md @@ -1,4 +1,4 @@ -# Tradhox Ecosystem - Comprehensive Technical Knowledge Base +# Tradhox Ecosystem - Comprehensive Technical Knowledge Base This document contains full technical specifications, data models, API endpoints, microservices, and deployment configurations for the Tradhox Platform. @@ -129,6 +129,8 @@ graph TD | **8080** | `0.0.0.0` | `seller-central-backend.service` | `http://127.0.0.1:8080` | `https://betapartner-api.tradhox.com` | | **8085** | `0.0.0.0` | `seller-central-backend-beta.service`| Standby Beta DRF API | Internal testing / staging | | **8086** | `0.0.0.0` | `shippingservice-beta.service` | `http://127.0.0.1:8086` | Logistics & AWB Label API | +| **8087** | `0.0.0.0` | `searchengine.service` | `http://127.0.0.1:8087` | `https://betasearch-api.tradhox.com` | +| **8108** | `127.0.0.1` | `typesense-server.service` | `http://127.0.0.1:8108` | Typesense Search Engine Service | | **8091** | `0.0.0.0` | `emailservice.service` | `http://127.0.0.1:8091` | `https://beta-mailservices.tradhox.com` | | **8081** | `127.0.0.1` | `whatsapp-service.service` | `http://127.0.0.1:8081` | `https://betawhatsapp.tradhox.com` | | **8092** | `127.0.0.1` | `beta-documentverification.service` | `http://127.0.0.1:8092` | KYC Document Verification (Beta) | @@ -140,6 +142,7 @@ graph TD ### Nginx Configuration File Paths (`/etc/nginx/sites-available/`) - `seller-central-backend` $\rightarrow$ `/etc/nginx/sites-enabled/seller-central-backend` (Proxies port 8080) - `shippingservice-beta` $\rightarrow$ `/etc/nginx/sites-enabled/shippingservice-beta` (Proxies port 8086) +- `searchengine` $\rightarrow$ `/etc/nginx/sites-enabled/searchengine` (Proxies port 8087) - `emailservice` $\rightarrow$ `/etc/nginx/sites-enabled/emailservice` (Proxies port 8091) - `smswhatsappservice` $\rightarrow$ `/etc/nginx/sites-enabled/smswhatsappservice` (Proxies port 8081) - `documentverification` & `beta-documentverification` $\rightarrow$ Proxies ports 8093 & 8092