Skip to content

bhargava562/trade-jack

Repository files navigation

📈 TradeJack v1.0

An Agentic AI Supply Chain Hedge Fund for SMEs

TradeJack levels the playing field for local vendors by autonomously predicting market shocks, detecting monopoly price-fixing, and executing split-second procurement across legacy B2B portals before prices spike.


🚨 The Problem

Small and Medium Enterprises (SMEs) lack the custom APIs and massive procurement teams that Fortune 500 companies possess. When global supply chain shocks occur (e.g., floods, port strikes), local vendors find out too late, losing 20-30% of their margins to artificially inflated wholesale prices and hidden monopolies.

💡 The Solution

TradeJack acts as an autonomous, enterprise-grade procurement team. It constantly monitors unstructured global news, predicts supply shortages, secures voice-based authorization from the warehouse manager, and deploys a swarm of AI agents to physically navigate legacy (non-API) wholesaler websites to buy inventory at the lowest True Landed Cost.


Screenshots & Demonstration

1. Secure Authentication & Role-Based Access

Login Page

2. Command Dashboard (Admin View)

Admin Dashboard

3. 4-Stage Agentic Trade Terminal

Trade Terminal

4. Real-Time Swarm Monitor (Admin Only)

Agent Monitor

5. Immutable Trade History

Trade History


⚙️ How It Works: The 4-Stage Agentic Workflow

  1. 🧠 Predict (The Macro-Event Trigger):
    • Ingests real-time global news.
    • Amazon Nova 2 Lite performs causal reasoning (e.g., "Heavy rains in Brazil" → "Coffee supply drops" → "Prices will spike").
  2. 📞 Authorize (The Gatekeeper):
    • Triggers an emergency voice dispatch (Nova 2 Sonic architecture).
    • Calls the deskless warehouse manager for a verbal "EXECUTE" command, bridging the physical and digital worlds.
  3. 🕵️ Verify (Anti-Monopoly Engine - TAME):
    • Before purchasing, the AI calculates the markup against the raw commodity index.
    • Uses economic proofs to detect and warn users of hidden monopolies artificially fixing prices.
    • Formula: $$Markup = \frac{\text{Landed Cost} - \text{Commodity Index Cost}}{\text{Commodity Index Cost}} \times 100$$
  4. 🤖 Execute (The UI Swarm):
    • Deploys parallel browser agents (Nova Act architecture).
    • Physically navigates clunky, legacy web portals, finds the "Add to Cart" buttons, and secures the cheapest inventory.

🎯 Who is this for?

  • Local Vendors & Retailers: Who need to secure inventory before wholesale prices spike.
  • Deskless Warehouse Managers: Who need to authorize high-stakes purchases via voice while on the floor.
  • Mid-Market Procurement Officers: Who want to avoid being price-gouged by hidden supplier monopolies.

🛠️ Tech Stack & Architecture

This project utilizes a serverless, highly optimized architecture to ensure zero cost failures and rapid execution.

  • Frontend: React + Vite (Custom dark-mode UI with portal scanline animations)
  • AI Orchestration & Backend: Puter.js (Serverless framework)
  • Reasoning Engine: Amazon Nova 2 Lite
  • Security Layer: Delimiter Prompt Shielding & Token Truncation
  • Caching & Persistence: Puter Key-Value Store (puter.kv)

🛡️ Enterprise-Grade Guardrails

To ensure economic safety and prevent malicious use, TradeJack implements:

  • Prompt Injection Security: Strict delimiter shielding prevents users from overriding the AI's core instructions.
  • Cost Optimization: KV-Caching stores market reasoning for 24 hours, preventing redundant API calls and credit depletion.
  • Economic Sanity Checks: Hardcoded UI validation prevents the execution of anomalous or hallucinated market prices.

🚀 Getting Started (Testing Instructions)

Prerequisites

  • Node.js (v18+)
  • A Puter.js account (Free - handles all AI authentication seamlessly)

Installation

  1. Clone the repository:
    git clone [https://github.com/yourusername/tradejack.git](https://github.com/yourusername/tradejack.git)
    cd tradejack
    
2. **Install dependencies:**
```bash
npm install
  1. Run the development server:
npm run dev
  1. Experience the Demo:
  • Open localhost:5173 in your browser.
  • Paste a sample news headline (e.g., "Unexpected frost wipes out 40% of Florida's orange crop").
  • Click Initiate Predictive Trigger and watch the autonomous swarm in action!

🔮 What's Next (Roadmap)

  • Phase 2: Multimodal AI integration. Vendors will snap photos of physical delivery slips, and TradeJack will cross-reference them against digital receipts to flag unauthorized "unloading fees."
  • Phase 3: Full AWS Fargate Docker integration for the live Nova Act browser swarm.

About

TradeJack: An AI supply chain hedge fund for SMEs. Built with React, Puter.js & Amazon Nova. It predicts market shocks from live news, secures voice authorization, and deploys an autonomous browser swarm to procure inventory across legacy B2B portals before prices spike. Features an Anti-Monopoly Engine (TAME) to detect price fixing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors