Skip to content

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ TENDERFLOW AI

TenderFlow AI Logo

Next-Gen Autonomous Government Tender & Procurement Automation Suite

Next.js 15 TypeScript Tailwind CSS Google Gemini Groq OpenAI Firebase PWA Ready


Transform 4 hours of tedious government tender paperwork into a 60-second automated workflow.
24/7 Server Auto-Scanner • Live GeM Explorer • Deep AI Bid Analysis • Real-Time AI Quota Tracking • One-Click Multi-Document Generation • Firm Letterhead Engine • Bilingual Hindi-English Transliteration • Print-Ready A4 PDF Engine • 100% Offline-First (IndexedDB) + Cloud Sync (Firestore)

Key FeaturesSystem Workflow24/7 Auto-ScannerGeM ExplorerAI AnalysisAI Quota HUDDocument PipelineArchitectureAI EngineQuickstartDocumentation Hub

separator

🌟 Executive Overview

TenderFlow AI is an enterprise-grade procurement automation platform engineered specifically for government contractors, vendors, and administrative departments.

Whether running autonomous 24/7 server-side scans for newly published tenders across Indian states/cities, performing instant AI deep-analysis of complex tender clauses (ATC), or tracking live AI API quotas in real-time, TenderFlow orchestrates, drafts, and renders an entire synchronized package of official documents — complete with firm-specific letterheads, custom legal conditions, localized Hindi transliterations, dynamic GST calculations, and pixel-perfect A4 print-ready layouts.


🔄 System Workflow

flowchart TD
    subgraph CRON ["🤖 24/7 Autonomous Server-Side Scanner"]
        CS["<b>Vercel Cron (Every 30 Mins)</b><br/>Mumbai (bom1) Serverless Execution"]
        CP["<b>Scan Profiles</b><br/>State • City • Department • Days Ahead"]
        CS --> CP
    end

    subgraph SOURCES ["🌐 Tender Input & Live Discovery"]
        G["<b>GeM Portal Live Explorer</b><br/>bidplus.gem.gov.in (Bid/RA, Category, Ministry, BOQ)"]
        M["<b>Manual / Custom Entry</b><br/>Tender ID • Budget • Quantities • Rates • GST %"]
    end

    subgraph ANALYSIS ["🧠 AI Deep Analysis & Intelligence"]
        A["<b>Tender AI Deep-Parser</b><br/>Buyer Terms (ATC) • Technical Specs • EMD / EPBG • Mandatory Docs"]
    end

    subgraph ENGINE ["⚡ TenderFlow Automation Core"]
        O["<b>Orchestration Engine</b><br/>AI Prompt Stacks • Purpose Dictionary • A4 Layout System • Quota Tracker"]
    end

    subgraph OUTPUTS ["📑 Synchronized Document Generation"]
        D1["📜 <b>Vigyapti (NIT)</b><br/>Public Tender Notice"]
        D2["📄 <b>Quotation (L1)</b><br/>Primary Firm Letterhead"]
        D3["📑 <b>Quotations (L2/L3)</b><br/>Alternate Competing Quotes"]
        D4["📋 <b>Supply Order</b><br/>Work Award Sanction"]
        D5["🧾 <b>Firm Tax Bill</b><br/>GST & Bank Invoice"]
    end

    subgraph EXPORT ["🖨️ Precision Output"]
        P["<b>A4 Print-Ready PDF with Margins & Signatures</b>"]
    end

    CP -->|Auto-Detect & Background AI Analyze| A
    G -->|1-Click Analyze| A
    A -->|1-Click Auto-Import| O
    G -->|Direct Import| O
    M --> O
    O --> D1
    O --> D2
    O --> D3
    O --> D4
    O --> D5
    D1 & D2 & D3 & D4 & D5 --> P
Loading

🚀 Key Features

⚡ Inline AI Analysis & Job Queue Drawer

  • Zero New Tabs: Run deep AI analysis directly in-place on tender cards with live state transitions.
  • Floating Background Worker: Bottom-right Job Queue drawer tracks queued, running, completed, and failed tasks with an animated progress bar.
  • "Analyze All" Batch Processor: 1-Click batch enqueuing of all unanalyzed page tenders for background processing.

🤖 24/7 Autonomous Server Auto-Scanner

  • Zero-Touch Tender Monitoring: Vercel Cron runs every 30 mins from Mumbai (bom1) serverless nodes.
  • Targeted Profiles: Configure custom scan rules by State, City, Department, Ministry, and Category.
  • Automated Background AI Analysis: Discovered bids are pre-analyzed with ATC extraction and saved to your database automatically.

🧠 AI Tender Deep-Analysis Modal

  • Instantly parses and decodes complex government tenders into structured, digestible intelligence.
  • Extracts Buyer Terms (ATC): Searchable Buyer-Added Bid Specific Terms & Conditions.
  • Key Insights: Exact EMD amounts, EPBG, technical item specs, turnover/experience criteria, and mandatory checklist documents.

📊 Real-Time AI Quota HUD & Tracker

  • Floating Live HUD: Visual pill showing real-time daily requests remaining & tokens used.
  • UTC Reset Countdown: Exact countdown timer to midnight UTC quota resets.
  • Usage Logs & Alerts: Feature-by-feature breakdown (Drafts, Transliteration, Analysis) with automated threshold warning states.

🌐 GeM Live Tender Explorer & Auto-Import

  • Live real-time discovery of active tenders directly from India's official GeM Portal (bidplus.gem.gov.in).
  • Multi-vector search: Bid/RA Number, Category, Ministry, State/City, and BOQ budget ranges.
  • 1-Click Import: Auto-populates line items, quantities, and deadlines into the tender drafting suite.

🏛️ 1-Click Multi-Document Generation

  • Generate Vigyapti, Quotations (Main & Alternate Rates), Supply Orders, and Firm Bills in one synchronized step.
  • Eliminates duplicate manual entries, mismatched dates, and calculation mistakes.
  • Instant document versioning snapshot engine with rollback support.

⚡ QuickCustomizer™ Floating Drawer

  • Interactive floating side-drawer for live in-document customizations.
  • 1-Click Clause Injection: Strict Govt Tone, 1-Yr Warranty, 7-Day Urgent Delivery, 30-Day Inspection Payment & ISO Standards.
  • Per-Clause AI Micro-Regenerator: Inline rephrasing with custom prompt instructions.

🔍 Smart Product Autocomplete Portal

  • High-performance floating portal autocomplete for rapid item entry.
  • Instant search across English, Hindi, and Raw vendor catalog names.
  • Auto-fills product descriptions, units, rates, and GST tax slabs with 1-click.

🎨 Precision A4 Letterhead Engine

  • Dynamic background letterhead integration with contain, cover, and stretch fit modes.
  • Print-safe margin boundaries, live safe-zone guides, and overflow detection.
  • Drag-and-drop firm digital signatures and official seals.

⚡ Local-First + Cloud-Ready Hybrid

  • 100% Offline Capable: Instant client-side IndexedDB database.
  • Cloud Sync: Real-time Firestore synchronization with namespace isolation.
  • PWA support with service worker asset caching.

🤖 24/7 Autonomous Server-Side Auto-Scanner

Set up custom surveillance profiles to monitor and parse government bids around the clock:

flowchart LR
    CRON["⏰ <b>Vercel Cron Daemon</b><br/>Every 30 Mins (Mumbai Node)"] --> SCAN["⚙️ <b>serverTenderScanner</b><br/>Executes Active Profiles"]
    SCAN --> GEM["🌐 <b>GeM Portal Search</b><br/>Location & Department Bridge"]
    GEM --> DEDUP["🔍 <b>Deduplication Engine</b><br/>Filters Already-Saved Tenders"]
    DEDUP --> AI["🧠 <b>Background AI Deep Analysis</b><br/>Extracts ATC, Specs & EMD"]
    AI --> STORE["💾 <b>Saved / Starred Database</b><br/>Ready for 1-Click Drafting"]
Loading
  • Custom Monitoring Profiles: Define targeted parameters (e.g., State: MADHYA PRADESH, City: INDORE, Department: MUNICIPAL CORPORATION, Days: 30).
  • Automatic Background AI Ingestion: Discovered tenders are immediately analyzed by the Multi-LLM engine without requiring user intervention.
  • Autonomous Execution Logs: Track scan duration, total tenders found, new unique bids discovered, and AI analysis success metrics in real time.

🧠 AI Tender Deep Analysis, Inline Worker & Executive PDF Export

Transform dense 50-page government tender documents into actionable intelligence and print-ready executive briefing reports within seconds:

flowchart LR
    DOC["📑 <b>Raw Tender / GeM Bid</b><br/>PDF & Portal Data"] --> QUEUE["🤖 <b>Background AI Job Queue</b><br/>Sequential Worker & 'Analyze All'"]
    QUEUE --> LLM["⚡ <b>Deep Analysis Engine</b><br/>Multi-Prompt Intelligence"]
    LLM --> T1["📋 <b>Buyer Added Terms (ATC)</b><br/>Extracted Legal Clauses"]
    LLM --> T2["⚙️ <b>Item Specifications</b><br/>Quantities & Detailed Specs"]
    LLM --> T3["💰 <b>Financial Terms</b><br/>EMD, EPBG & Calculated Budget"]
    LLM --> T4["📜 <b>Compliance Checklist</b><br/>Turnover, Experience & Mandatory Docs"]
    
    T1 & T2 & T3 & T4 --> MODAL["⚡ <b>Inline Intelligence Modal</b><br/>Zero Context Switch / Same Page"]
    MODAL --> PDF["📄 <b>Multi-Page Executive PDF Report</b><br/>Intelligent ATC Pagination Engine"]
    MODAL --> IMP["📥 <b>1-Click Import to Draft</b>"]
Loading
  • Inline AI Analysis (No New Tab): Click to analyze any tender in-place. Button states dynamically switch (Analyzing with AI...View AI Insights), and extracted specs & ATC render directly on the card.
  • Floating Background Job Queue (AiJobQueueDrawer): Bottom-right floating drawer tracks real-time progress across queued bids, with minimizable floating pill state (⚡ AI Worker: 1 running (3 queued)).
  • 1-Click "Analyze All" Batch Processor: Enqueue all unanalyzed tenders on the current page into the background queue with a single click.
  • Dedicated Full-Screen Analysis Suite (/tenders/open/analysis): Dedicated landing page featuring interactive tabbed views for Overview, ATC Clause search, Specifications, Financials, Eligibility, and Mandatory Document checklists.
  • Intelligent Executive PDF Generator (gemAnalysisPdfService): Generates print-ready multi-page briefing reports with smart ATC height balancing across pages (Page 1 summary + Page 2/3 seamless continuation).
  • Smart Budget Estimator: Automatically derives estimated tender valuation from 1% EMD figures when undisclosed by the buyer department.
  • Direct Import to Document Generator: One click transfers all parsed specifications, line items, and requirements directly into the tender drafting suite.

📊 Real-Time AI Quota HUD & Usage Tracking

Never hit unexpected rate limits during urgent bid submissions:

flowchart LR
    CALL["🤖 <b>AI API Invocation</b><br/>Drafting • Transliteration • Analysis"] --> TRACK["⚙️ <b>aiUsageService</b><br/>Token & Request Counter"]
    TRACK --> PILL["🟢 <b>Floating Quota HUD</b><br/>Live remaining requests • Token count • UTC Reset timer"]
    TRACK --> DASH["📊 <b>Settings Dashboard</b><br/>Feature-by-feature breakdown • Audit logs • Warning thresholds"]
Loading
  • Live Floating Pill: Sits unobtrusively on the screen with real-time request counts and color-coded health indicators (GreenAmber at 80% → Red at 95%).
  • Pre-Configured Provider Quotas: Native tracking for Google Gemini (1,500 req/day), Groq (14,400 req/day), OpenAI, and NVIDIA NIM.
  • Feature Analytics: Detailed usage logs broken down by feature (Document Drafting, Transliteration, GeM Analysis, Phrase Packs, Location Search).
  • Live Health Diagnostics: Dedicated /api/ai/health endpoint for instant provider status checks.

🌐 GeM Open Tender Explorer

Search, filter, and import active government bids in real time without leaving TenderFlow:

flowchart LR
    GEM["🌐 <b>GeM Portal</b><br/>bidplus.gem.gov.in"] --> SCRAPE["⚙️ <b>gemScraperService</b><br/>Session & Token Bridge"]
    SCRAPE --> FILTERS["🔍 <b>Filter & Search</b><br/>Bid ID • Category • Ministry • BOQ"]
    FILTERS --> CARDS["📑 <b>Live Tender Cards</b><br/>Quantities • Deadlines • PDF Links"]
    CARDS -->|1-Click Import| SUITE["📝 <b>TenderFlow Suite</b><br/>Bilingual Drafts • Multi-Firm Quotes • Tax Bills"]
Loading
  • Live Bid PDF & Corrigendum Links: Directly access official bid documents and corrigendum addendums.
  • Auto-Populate Specs: Imports product specifications, quantities, and submission dates instantly.
  • 👉 Read Detailed GeM Explorer Documentation ➔

📋 Document Pipeline

flowchart LR
    A["📝 Input Specs"] --> B["⚙️ Core Orchestrator"]
    B --> C["📜 1. Vigyapti / NIT"]
    B --> D["📄 2. Main Quotation L1"]
    B --> E["📑 3. Alternate Quotes L2/L3"]
    B --> F["📋 4. Supply Order"]
    B --> G["🧾 5. GST Tax Bill"]
    
    C & D & E & F & G --> H["🖨️ A4 Print-Safe PDF"]
Loading
Document Type Official Hindi Title Letterhead Applied? Description
vigyapti निविदा सूचना (NIT) ❌ Plain (Public) Official public procurement notice detailing line items, earnest money, and deadlines
quotation_main मुख्य कोटेशन (L1) ✅ Yes (Branded) Lowest-rate compliant bid generated on selected primary firm's letterhead
quotation_alt_1 वैकल्पिक कोटेशन 1 (L2) ✅ Yes (Branded) Alternate quotation on secondary firm's letterhead for price comparison
quotation_alt_2 वैकल्पिक कोटेशन 2 (L3) ✅ Yes (Branded) Third competitive rate quote for statutory departmental compliance
supply_aadesh आपूर्ति आदेश / कार्यादेश ✅ Yes (Branded) Official supply award sanction letter with contractual conditions
firm_bill फर्म टैक्स बिल ✅ Yes (Branded) Complete GST tax invoice with bank details, IFSC, and HSN breakdown

🏛️ Architecture & Tech Stack

graph TB
    subgraph UI ["🖥️ PRESENTATION LAYER"]
        P1["Next.js 15 App Router"]
        P2["Tailwind CSS + Lucide Icons"]
        P3["GeM Open Tenders Explorer (/tenders/open)"]
        P4["AiJobQueueDrawer (Floating Background Worker)"]
        P5["AutoScannerModal (Profile & Cron Manager)"]
        P6["Full-Screen Analysis Suite (/tenders/open/analysis)"]
        P7["TenderAIAnalysisModal (Deep ATC Parser)"]
        P8["AIQuotaPill & SyncStatusPill (Live HUDs)"]
        P9["TipTap WYSIWYG Rich Editor"]
        P10["QuickCustomizer™ Floating Drawer"]
        P11["Live A4 Canvas & Layout Engine"]
    end

    subgraph SERVICES ["⚙️ BUSINESS SERVICE LAYER"]
        S1["<b>serverTenderScanner</b><br/>24/7 Cron Daemon & Profile Scanner"]
        S2["<b>gemScraperService</b><br/>GeM Session, CSRF & Solr Client"]
        S3["<b>gemAnalysisService</b><br/>Background Autonomous Deep Analysis"]
        S4["<b>gemAnalysisPdfService</b><br/>Multi-Page Executive PDF Engine"]
        S5["<b>aiUsageService</b><br/>Daily Quota, Token Tracking & Alerts"]
        S6["<b>documentService</b><br/>Generation & Version Snapshots"]
        S7["<b>aiDraftService</b><br/>Prompt Stacks & LLM Orchestration"]
        S8["<b>layoutEngine</b><br/>A4 Margins, Bleeds & Letterhead"]
        S9["<b>mappingService</b><br/>4-Variant Dictionaries & Transliteration"]
        S10["<b>governmentTemplates</b><br/>Standardized Legal Layouts"]
    end

    subgraph AI_LAYER ["🤖 MULTI-LLM AI ENGINE"]
        A1["Google Gemini 1.5/2.0"]
        A2["Groq Llama 3"]
        A3["OpenAI GPT-4o"]
        A4["NVIDIA NIM"]
        A5["Deep Analysis API (/api/gem/analyze)"]
        A6["Vercel Cron (/api/cron/scan-tenders)"]
        A7["Micro-Regenerator & Health Diagnostics"]
    end

    subgraph STORAGE ["🗄️ DUAL-ENGINE STORAGE LAYER"]
        DB1["<b>Client-Side IndexedDB</b><br/>Local-First • Instant • 100% Offline"]
        DB2["<b>Firebase Firestore</b><br/>Multi-Device Cloud Sync & Backup"]
    end

    UI --> SERVICES
    SERVICES <--> AI_LAYER
    SERVICES <--> STORAGE
Loading

🧠 Bilingual & AI Intelligence

TenderFlow bridges standard English commercial terminology with formal Hindi administrative procurement standards.

1. Purpose Library Engine

Transforms simple categories into legally sound administrative purpose statements:

flowchart LR
    C["Category: <b>fire_fighting</b>"] --> E["⚡ Purpose Mapping Engine"]
    E --> H1["🇮🇳 <b>Hindi:</b> 'अग्निशमन एवं आपातकालीन जल आपूर्ति कार्य हेतु आवश्यक सामग्री'"]
    E --> H2["🇬🇧 <b>English:</b> 'Materials required for fire fighting and emergency water supply'"]
Loading

2. 4-Tier Alternate Translation Variations

Every line item is equipped with 4 distinct length and styling options for document customization:

  • Full Title: Complete formal specification.
  • Alt 1 (Medium): Balanced, standard quotation title.
  • Alt 2 (Short): Concise, high-density table format.
  • Alt 3 & 4 (Combined): Title seamlessly combined with product description paragraphs.

3. Automated Transliteration Cache

English line items are automatically translated/transliterated and cached in IndexedDB for instantaneous future queries:

flowchart LR
    IN["Input: 'Fire Hose Nozzle 63mm'"] --> AI["🤖 Multi-LLM Transliteration"]
    AI --> OUT["Output: 'अग्निशमन होज नोज़ल 63 मि.मी.'"]
    OUT --> CACHE["💾 Saved to Master Dictionary"]
Loading

📂 Documentation Center

All technical documentation is organized inside the docs/ directory:

flowchart LR
    DOCS["📂 <b>docs/ Hub</b>"]
    
    DOCS --> ARC["🏛️ <b>architecture/</b><br/>System design, roadmap & UI evolution"]
    DOCS --> AI["🤖 <b>ai/</b><br/>Multi-LLM prompts & bilingual dictionaries"]
    DOCS --> STO["🗄️ <b>storage/</b><br/>Firebase Firestore & IndexedDB setup"]
    DOCS --> GUI["📖 <b>guides/</b><br/>User manual & quick reference cards"]
    DOCS --> FIX["🛠️ <b>fixes-and-history/</b><br/>Changelogs, patch notes & bug fixes"]
Loading
Section Description Link
🏛️ Architecture System topology, roadmap, before/after comparison Explore ➔
🤖 AI & Transliteration Multi-LLM configuration, prompt engineering & dictionaries Explore ➔
🗄️ Storage & Cloud IndexedDB offline layer & Firestore cloud sync setup Explore ➔
📖 Guides & Manuals Comprehensive user manual, quick references & onboarding Explore ➔
🛠️ Fixes & Changelogs Implementation status, layout fixes & patch history Explore ➔

👉 View Complete Documentation Directory ➔


⚡ Quickstart Guide

📋 Prerequisites

  • Node.js: v18.17.0 or higher
  • Package Manager: npm, yarn, pnpm, or bun

🛠️ Installation & Setup

  1. Clone the repository:

    git clone https://github.com/your-username/tenderflow-ai.git
    cd tenderflow-ai
  2. Install dependencies:

    npm install
  3. Configure Environment:

    cp .env.example .env.local

    Configure your preferred AI provider and storage backend in .env.local:

    # AI Provider (gemini, openai, groq, nvidia, mock)
    NEXT_PUBLIC_AI_PROVIDER=gemini
    NEXT_PUBLIC_AI_API_KEY=your_api_key_here
    NEXT_PUBLIC_AI_MODEL=gemini-1.5-flash
    
    # Storage Mode (indexeddb or firestore)
    NEXT_PUBLIC_DATA_BACKEND=indexeddb
  4. Launch Development Server:

    npm run dev

    Navigate to http://localhost:3000.


🤝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repository
  2. Create your branch (git checkout -b feature/awesome-feature)
  3. Commit your changes (git commit -m 'feat: Add awesome feature')
  4. Push to the branch (git push origin feature/awesome-feature)
  5. Open a Pull Request

📄 License

This software is distributed under proprietary licensing. See LICENSE for details.

Crafted with ❤️ by the Magraa Powered by Next.js, TypeScript & Advanced AI.

About

Next-Gen Autonomous Government Tender & Procurement Automation Suite. One-click multi-document drafting, precision A4 letterheads, bilingual Hindi/English AI engine, and offline-first dual storage.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages