- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
34 lines
2.6 KiB
Markdown
34 lines
2.6 KiB
Markdown
# Current State
|
|
|
|
## Current Feature
|
|
Complete COD Removal & Dynamic Admin-Configured Delivery Rules
|
|
|
|
## Current Work
|
|
1. **COD Deprecation & Elimination**:
|
|
- `OrderService.py`: Enforced online-only payments by rejecting `payment_method == "COD"` with HTTP 400.
|
|
- `CheckoutRouter.py`: Defaulted payment method to `RAZORPAY`, actively rejecting `COD`.
|
|
- Storefront Checkout (`app/checkout/page.tsx`): Completely removed Cash on Delivery radio card, disclaimers, and COD branches. Enforced Razorpay (UPI, Cards, Netbanking) and Zero-Amount wallet payment.
|
|
- Content policies: Updated `paymentsContent.ts` and `faqDefaults.ts` confirming all orders require prepaid online payment.
|
|
|
|
2. **Dynamic Delivery Engine**:
|
|
- Database: Seeded default keys in `settings` table: `shipping_delivery_charge: 99.0`, `shipping_free_delivery_enabled: false` (disabled by default), `shipping_free_delivery_min_order_amount: 999.0`.
|
|
- Backend Service & Endpoints: Created `DeliveryService.py` and exposed `GET /api/v1/settings/delivery` (public) and `PUT /api/v1/settings/delivery` (admin).
|
|
- Dynamic Order Cost: `OrderService.create_ecommerce_order` and `CartRouter.py` calculate shipping fee dynamically based on database configuration.
|
|
- Dynamic Storefront Badges: `StorefrontRouter.py` dynamically adjusts trust badges (shows "Express Delivery" when free shipping is disabled).
|
|
|
|
3. **Admin Panel Delivery Configuration**:
|
|
- Created `services/api/deliverySettingsService.ts` in `ikixkart-dashboard`.
|
|
- Added **Delivery & Shipping** blade in `app/(admin)/settings/page.tsx` allowing administrators to modify delivery charges, toggle promotional free delivery on/off, set minimum order qualification amounts, and view live simulation previews.
|
|
|
|
4. **Storefront Dynamic Delivery UI**:
|
|
- Created `services/api/deliveryService.ts` in `storefront`.
|
|
- Cart Drawer (`CartDrawer.tsx`) & Cart Page (`app/cart/page.tsx`): Dynamically hides the "free shipping progress bar" entirely when free shipping is disabled by admin. Dynamically binds to admin threshold when enabled.
|
|
- TopBar & Features: Removed static "Free Shipping on orders over ₹999!" text, replacing with "Express Pan-India Delivery | 100% Genuine Spare Parts".
|
|
|
|
5. **Automated Testing & Parity**:
|
|
- Backend integration test `Backend/test_delivery_cod_rules.py`: **100% PASSED** (COD rejection, flat fee enforcement, dynamic admin enablement to free shipping, reset verification).
|
|
- Admin TypeScript check (`npx tsc --noEmit`): **PASSED (0 errors)**.
|
|
- Storefront TypeScript check (`npx tsc --noEmit`): **PASSED (0 errors)**.
|
|
|
|
## Known Issues
|
|
- None.
|