From 11a0b8c83f1fad2bbf4a919ffa38faba7ef59e96 Mon Sep 17 00:00:00 2001 From: vickytechkey Date: Fri, 2 Oct 2026 11:59:12 +0530 Subject: [PATCH] docs: add API base URL standard https://betapartner-api.tradhox.com/api for local and beta testing --- AGENTS.md | 7 +++++-- KNOWLEDGE.md | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ddc6e51..b7f22d9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,6 +8,9 @@ You are **Anti-Gravity**, an autonomous AI development agent designed to execute - **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`) +## Critical API Endpoint Standards +- **API Base URL**: Always use `https://betapartner-api.tradhox.com/api` for **both Beta and Local Testing** environments. + ## Core Guidelines & Execution Standards ### 1. Code Quality & Architecture @@ -26,9 +29,9 @@ You are **Anti-Gravity**, an autonomous AI development agent designed to execute graph TD User([Supplier UI]) --> S3[AWS S3 / CloudFront] S3 --> Frontend[supplier_central_frontend\nReact 19 + TS + Vite] - Frontend -- REST / JWT --> Backend[seller_central_backend\nDjango 6.1 DRF] + Frontend -- REST / JWT --> APIEndpoint[https://betapartner-api.tradhox.com/api\n(Beta & Local Testing)] + APIEndpoint --> Backend[seller_central_backend\nDjango 6.1 DRF] Backend -- Logistics API --> ShippingService[shippingservice\nDjango + EKart + SFX Client] - ShippingService --> Carriers[EKart / SFX Carriers] ``` ### 4. Tool Usage Policy diff --git a/KNOWLEDGE.md b/KNOWLEDGE.md index df2da60..4935493 100644 --- a/KNOWLEDGE.md +++ b/KNOWLEDGE.md @@ -4,13 +4,21 @@ This document contains full technical specifications, data models, API endpoints --- +## 🚨 Critical Environment & API Standard + +> [!IMPORTANT] +> **API Base URL Rule**: Use `https://betapartner-api.tradhox.com/api` as the API endpoint for **both Beta and Local Testing** environments. + +--- + ## 🏛️ Ecosystem Overview ```mermaid graph TD UI([Supplier Browser]) --> S3[AWS S3 / CloudFront\n(supplier_central_frontend)] S3 --> ReactApp[React 19 + TypeScript + Vite] - ReactApp -- REST / JWT --> EC2[AWS EC2 Server\n(seller_central_backend)] + ReactApp -- REST / JWT --> APIEndpoint[https://betapartner-api.tradhox.com/api\n(Beta & Local Testing)] + APIEndpoint --> EC2[AWS EC2 Server\n(seller_central_backend)] EC2 --> Backend[Django 6.1 DRF Core] Backend -- Logistics API --> ShippingService[shippingservice\nDjango Microservice] ShippingService --> EKart[EKart Carrier Client] @@ -24,6 +32,7 @@ graph TD - **Directory**: `d:/Tradhox_workspace/supplier_central_frontend` - **Tech Stack**: React 19, TypeScript, Vite, TailwindCSS v4, Bulma CSS, Lucide React, FontAwesome. - **Hosting**: AWS S3 Static Hosting / CloudFront CDN. +- **API Base Endpoint**: `https://betapartner-api.tradhox.com/api` (for both local development & beta). ### Key Pages & Routing - **Public Routes**: @@ -44,7 +53,7 @@ graph TD - `StorefrontPage.tsx` & `SettingsPage.tsx` - Seller brand settings. ### API Client Layer (`src/services/api.ts`) -- Configured with `BASE_URL` pointing to EC2 backend. +- Configured with `BASE_URL = https://betapartner-api.tradhox.com/api`. - Manages JWT Bearer token authentication via `getAuthHeaders()`. --- @@ -54,6 +63,7 @@ graph TD - **Directory**: `d:/Tradhox_workspace/seller_central_backend` - **Tech Stack**: Python 3.14, Django 6.1, DRF, SimpleJWT, Gunicorn, PostgreSQL/SQLite, Boto3. - **Daemon**: `seller-central-backend.service` on AWS EC2. +- **API Host Domain**: `https://betapartner-api.tradhox.com/api` ### Core Endpoints & Functionality - **Auth & KYC**: