<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Haradhan Sharma</title>
    <description>The latest articles on DEV Community by Haradhan Sharma (@haradhansharma).</description>
    <link>https://dev.to/haradhansharma</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F814072%2Ff8e5d26d-3267-4adb-835d-293b18f63c38.png</url>
      <title>DEV Community: Haradhan Sharma</title>
      <link>https://dev.to/haradhansharma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/haradhansharma"/>
    <language>en</language>
    <item>
      <title>Modernizing Industrial Apparel Manufacturing: End-to-End Supply Chain Architecture with IIoT and AI</title>
      <dc:creator>Haradhan Sharma</dc:creator>
      <pubDate>Fri, 18 Sep 2026 15:23:09 +0000</pubDate>
      <link>https://dev.to/haradhansharma/modernizing-industrial-apparel-manufacturing-end-to-end-supply-chain-architecture-with-iiot-and-ai-1o38</link>
      <guid>https://dev.to/haradhansharma/modernizing-industrial-apparel-manufacturing-end-to-end-supply-chain-architecture-with-iiot-and-ai-1o38</guid>
      <description>&lt;p&gt;Fabric represents &lt;strong&gt;65% of the total FOB cost&lt;/strong&gt; of an export garment. Yet even in large-scale composite factories, critical operational data remains trapped in disconnected spreadsheets, manual chalkboards, and WhatsApp threads.&lt;/p&gt;

&lt;p&gt;When managing high-volume apparel manufacturing—where a single buyer order spans 100,000 units across 6 colorways, 5 sizes, and 4 fabric blends—a two-day delay in yarn delivery or a dye-lot shade mismatch directly causes six-figure air-freight penalties.&lt;/p&gt;

&lt;p&gt;Drawing from over a decade of factory leadership as &lt;strong&gt;Manager of Production Planning &amp;amp; Coordination (PPC) and Operations MIS at Fakir Knitwears Ltd.&lt;/strong&gt;, this guide presents an authentic, end-to-end engineering blueprint for industrial apparel manufacturing. We show how integrating &lt;strong&gt;Industrial IoT (IIoT)&lt;/strong&gt; edge sensors and &lt;strong&gt;sovereign AI agents&lt;/strong&gt; across the process flow eliminates profit leaks and guarantees on-time export delivery.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Buyer Order Sheet &amp;amp; Tech Pack → Automated Merchandising BOM
&lt;/h2&gt;

&lt;p&gt;The traditional apparel merchandising workflow is inherently error-prone: a merchandiser spends 48 to 72 hours manually transcribing multi-page PDF buyer tech packs into Excel spreadsheets to calculate yarn counts, trim yields, and marker consumption.&lt;/p&gt;

&lt;p&gt;A miscalculated fabric consumption formula:&lt;br&gt;
$$\text{Consumption (kg/doz)} = \frac{\text{Length (cm)} \times \text{Width (cm)} \times \text{GSM}}{10,000} + \text{Wastage Allowance}$$&lt;/p&gt;

&lt;p&gt;Or an unrecorded wash shrinkage factor leads to severe raw material shortages midway through cutting.&lt;/p&gt;

&lt;h3&gt;
  
  
  The AI Solution:
&lt;/h3&gt;

&lt;p&gt;We deploy local, vision-enabled LLM agents (running on sovereign private infrastructure) that ingest buyer PDF tech packs directly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extracts structured size-color specification sheets, measurement spec tables, and bill of materials (BOM) in sub-3 minutes.&lt;/li&gt;
&lt;li&gt;Automatically cross-references historical shrinkage curves (lengthwise vs. widthwise) for specific knit structures (Single Jersey, 2-Thread Fleece, Interlock, Rib).&lt;/li&gt;
&lt;li&gt;Generates dynamic consumption sheets with automated variance thresholds, notifying the chief merchandiser of discrepancies before purchase orders are issued.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Yarn Procurement &amp;amp; Circular Knitting Machine Telemetry (IIoT)
&lt;/h2&gt;

&lt;p&gt;Yarn procurement typically demands a 25 to 40-day lead time. Once yarn arrives at the factory, knitting floor visibility is traditionally poor: gray fabric production is logged manually on paper at shift handovers. Machine downtime, needle breakages, and unrecorded Lycra tension drops go undetected.&lt;/p&gt;

&lt;h3&gt;
  
  
  The IIoT Edge Telemetry Engine:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Edge Hardware:&lt;/strong&gt; ESP32 / Industrial Raspberry Pi microcontrollers connected to circular knitting machine control boards via RS-485 / Modbus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol:&lt;/strong&gt; Telemetry published over lightweight MQTT topics (&lt;code&gt;factory/knitting/machine-12/telemetry&lt;/code&gt;) tracking RPM, operating hours, and stop-cause codes (needle break, yarn break, oil level, Lycra feeder fault).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scale Integration:&lt;/strong&gt; Gray fabric rolls are weighed on floor digital scales connected directly to the central database via MQTT. The system validates actual gray roll weight against theoretical weight (stitch length × needle count × yarn count) in real time.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Dyehouse Recipe Automation &amp;amp; Spectrophotometer Quality Loops
&lt;/h2&gt;

&lt;p&gt;Dyeing is the single highest-risk stage in composite textiles. Batch-to-batch shade variations ($\Delta E &amp;gt; 0.8$), uncalibrated liquor ratios, and stenter temperature fluctuations cause expensive re-dyeing, fabric degradation, and buyer rejections.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Integrated Automation Loop:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Automated chemical dispensing PLCs stream exact dyestuff weight, salt/soda dosing, and bath temperature curves to a central PostgreSQL/TimescaleDB time-series engine.&lt;/li&gt;
&lt;li&gt;Post-dyeing fabric swatches are measured under digital spectrophotometers. The system compares reflectance curves against buyer-approved lab dip standards (CIE $L^&lt;em&gt;a^*b^&lt;/em&gt;$ coordinates).&lt;/li&gt;
&lt;li&gt;If $\Delta E$ exceeds tolerance, the system flags the batch before stenter finishing, recalculating topping recipes automatically.&lt;/li&gt;
&lt;li&gt;Stenter sensors log fabric overfeed percentages, chamber temperatures, and moisture content to ensure finished fabric precisely matches target GSM and width specifications.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Central Fabric Store &amp;amp; WMS: Strict Shade-Lot Segregation
&lt;/h2&gt;

&lt;p&gt;The primary cause of apparel export rejections at retail stores is &lt;strong&gt;two-tone shade variation&lt;/strong&gt;—where front and back panels or sleeves stitched into the same garment exhibit slight color divergence under store lighting.&lt;/p&gt;

&lt;p&gt;This happens when rolls from differing dye lots (Batch A vs. Batch B) are mixed during spreading on the cutting table.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Lot-Gated WMS Rule:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Every fabric roll is digitally fingerprinted upon unloading from the stenter with an RFID/QR-code barcode containing: Roll Number, Dye Lot ID, Roll Weight, Shrinkage Group, and Shade Band (A/B/C/D).&lt;/li&gt;
&lt;li&gt;Strict FIFO (First-In, First-Out) and shade-lot segregation are enforced in the warehouse database.&lt;/li&gt;
&lt;li&gt;Cutting room terminals cannot scan or issue fabric from mismatched dye lots into the same cut order, mathematically eliminating two-tone garments at the root.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Cutting Room: Algorithmic Cut-Order Planning &amp;amp; End-Bit Savings
&lt;/h2&gt;

&lt;p&gt;In apparel manufacturing, fabric represents 60% to 70% of total garment FOB cost. In a 100,000-piece export order, a mere 1.5% reduction in fabric wastage puts $18,000 to $25,000 directly back into factory EBITDA.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Algorithmic Cutting Table:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Modern dynamic cut-order planning algorithms group fabric rolls by exact shrinkage percentage, matching them with CAD marker lays.&lt;/li&gt;
&lt;li&gt;Automated marker nesting optimizes fabric marker efficiency to &amp;gt;88% on single jersey and &amp;gt;85% on fleece.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End-bit roll tracking:&lt;/strong&gt; When spreading rolls leave 2 to 5-yard end-bits, the system catalogs them in the database for small-part cutting (collars, cuffs, pocket bags) rather than discarding them into waste bins.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Sewing Floor: Real-Time SMV Line Balancing vs. Evening Surprises
&lt;/h2&gt;

&lt;p&gt;In traditional factories, line supervisors write hourly production outputs on chalkboards. Plant managers only discover that a 40-operator line missed its daily target by 300 pieces during the 7:00 PM shift handover.&lt;/p&gt;

&lt;p&gt;By then, 8 hours of productive machine time are lost, and the Time &amp;amp; Action (TNA) calendar is broken.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Real-Time IIoT Balancing Architecture:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Low-cost operator tablets or digital bundle ticketing stations log completions at key operations (collar attachment, sleeve setting, side seam).&lt;/li&gt;
&lt;li&gt;The system tracks operator cycle time against Standard Minute Value (SMV) pitch time.&lt;/li&gt;
&lt;li&gt;When an operation's pitch time deviates by more than 15% from line cycle time, automated alerts fire to the floor industrial engineer in sub-12 minutes, allowing immediate line rebalancing and needle adjustments.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Finishing, Packing &amp;amp; Pre-Shipment AQL 2.5 Inspection
&lt;/h2&gt;

&lt;p&gt;The final defense against buyer chargebacks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Carton-by-carton digital barcode verification reconciles packed garment quantities and size-ratio assortments directly against the buyer's purchase order.&lt;/li&gt;
&lt;li&gt;Pre-shipment AQL 2.5 inspection modules capture digital defect logs (stains, skips, measurements) with high-resolution tablet photos.&lt;/li&gt;
&lt;li&gt;Generates automated packing lists and export commercial documentation with 100% data integrity, ensuring 99.4%+ On-Time In-Full (OTIF) shipment performance.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  8. Event-Driven System Architecture (The Tech Stack)
&lt;/h2&gt;

&lt;p&gt;Modern industrial automation does not require multi-hundred-thousand-dollar proprietary enterprise software licenses. It requires resilient, low-latency async engineering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Edge Ingestion:&lt;/strong&gt; Lightweight MQTT brokers (EMQX / Mosquitto) over an isolated factory floor VLAN handling thousands of sensor messages per second.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Async Core:&lt;/strong&gt; High-performance Python backend (FastAPI / Celery) processing event queues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage Engine:&lt;/strong&gt; PostgreSQL with TimescaleDB extension for high-frequency IoT telemetry alongside relational tables for ERP BOMs and inventory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local AI Ingestion:&lt;/strong&gt; Self-hosted vision-enabled LLMs (vLLM / Ollama) parsing buyer tech packs without sending confidential client designs to external third-party cloud APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Interfaces:&lt;/strong&gt; Fast, clean web dashboards built on modern responsive interfaces for shop-floor tablet kiosks and executive command centers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary: Hard Factory Numbers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Manufacturing Stage&lt;/th&gt;
&lt;th&gt;Traditional Failure Point&lt;/th&gt;
&lt;th&gt;IIoT &amp;amp; AI Automated Solution&lt;/th&gt;
&lt;th&gt;Direct Financial Impact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tech Pack &amp;amp; Merchandising&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;48-hour manual transcription in Excel&lt;/td&gt;
&lt;td&gt;Vision LLM agent extracts BOM &amp;amp; consumption&lt;/td&gt;
&lt;td&gt;3-minute turnaround, zero math errors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Knitting &amp;amp; Gray Fabric&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Paper machine logs &amp;amp; unrecorded downtime&lt;/td&gt;
&lt;td&gt;MQTT edge sensors logging RPM &amp;amp; digital scale roll weight&lt;/td&gt;
&lt;td&gt;100% gray fabric weight reconciliation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dyeing &amp;amp; Finishing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Batch Delta-E shade variations&lt;/td&gt;
&lt;td&gt;Spectrophotometer loop &amp;amp; stenter temperature telemetry&lt;/td&gt;
&lt;td&gt;40% reduction in re-dyeing expenses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fabric Warehouse (WMS)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mixed dye lots causing two-tone garments&lt;/td&gt;
&lt;td&gt;Barcode roll-level lot gating &amp;amp; strict FIFO&lt;/td&gt;
&lt;td&gt;Zero mixed-lot export rejections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cutting Room&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2-5 yard end-bit waste &amp;amp; manual markers&lt;/td&gt;
&lt;td&gt;Dynamic cut-order planning &amp;amp; CAD marker optimization&lt;/td&gt;
&lt;td&gt;1.8% to 3.2% raw fabric savings ($20k+ / order)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sewing Lines&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Bottlenecks discovered at evening handover&lt;/td&gt;
&lt;td&gt;Real-time SMV pitch tracking &amp;amp; operator tablet stations&lt;/td&gt;
&lt;td&gt;Bottleneck alerts in &amp;lt;15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Finishing &amp;amp; Packing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Carton size-ratio packing mismatch&lt;/td&gt;
&lt;td&gt;Barcode carton reconciliation &amp;amp; digital AQL 2.5 logs&lt;/td&gt;
&lt;td&gt;99.4% On-Time In-Full (OTIF) rating&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://hrdnsh.com/blog/industrial-garments-iiot-supply-chain-ai/" rel="noopener noreferrer"&gt;https://hrdnsh.com/blog/industrial-garments-iiot-supply-chain-ai/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>manufacturing</category>
      <category>iot</category>
      <category>python</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Building Production-Grade Private RAG Systems: The Complete Architectural Blueprint</title>
      <dc:creator>Haradhan Sharma</dc:creator>
      <pubDate>Thu, 17 Sep 2026 10:28:50 +0000</pubDate>
      <link>https://dev.to/haradhansharma/building-production-grade-private-rag-systems-the-complete-architectural-blueprint-5d82</link>
      <guid>https://dev.to/haradhansharma/building-production-grade-private-rag-systems-the-complete-architectural-blueprint-5d82</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://hrdnsh.com/blog/building-private-rag-systems/" rel="noopener noreferrer"&gt;hrdnsh.com&lt;/a&gt; by &lt;a href="https://hrdnsh.com" rel="noopener noreferrer"&gt;Haradhan Sharma&lt;/a&gt;, Senior Enterprise Operations Leader &amp;amp; Chief Architect.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Retrieval-Augmented Generation (RAG) is the most practical, cost-effective enterprise AI architecture in existence. Instead of fine-tuning multi-billion parameter foundation models or paying massive SaaS subscriptions, RAG dynamically retrieves internal company records at query time and grounds the LLM in verified facts.&lt;/p&gt;

&lt;p&gt;When properly architected, RAG boosts factual accuracy from ~60% (raw foundation LLM) to over &lt;strong&gt;95%&lt;/strong&gt;, while reducing hallucinations to near zero.&lt;/p&gt;

&lt;p&gt;Here is the complete engineering blueprint for building an enterprise-grade, private RAG system.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. System Architecture Overview
&lt;/h2&gt;

&lt;p&gt;A production RAG infrastructure consists of 5 tightly integrated layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Raw Documents (PDF, DB, Docs)]
       │
       ▼
1. Document Ingestion (Semantic Chunking: 250-500 tokens, 15% overlap)
       │
       ▼
2. Vector Embedding Engine (BGE-Large / text-embedding-3-small)
       │
       ▼
3. Vector Storage &amp;amp; Relational Index (PostgreSQL + pgvector HNSW)
       │
       ▼
4. Hybrid Retrieval &amp;amp; Re-ranking (Dense Vector + BM25 Sparse + Cross-Encoder)
       │
       ▼
5. Private LLM Inference (vLLM / Ollama: LLaMA 3.3, Mistral) ──► Grounded Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. Ingestion &amp;amp; Semantic Chunking
&lt;/h2&gt;

&lt;p&gt;Raw enterprise documents are messy: PDFs contain recurring running headers, footers, and complex multi-column tables.&lt;/p&gt;

&lt;h3&gt;
  
  
  Golden Rules of Enterprise Chunking:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never use fixed character chunking blindly:&lt;/strong&gt; Chunking strictly by character count breaks sentences midway and fragments contextual logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Target Token Range:&lt;/strong&gt; The optimal sweet spot is &lt;strong&gt;250 to 500 tokens&lt;/strong&gt; per chunk with a &lt;strong&gt;10% to 15% overlap&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured vs Unstructured:&lt;/strong&gt; For legal agreements and policy PDFs, use &lt;code&gt;RecursiveCharacterTextSplitter&lt;/code&gt;. For industrial tabular records (ERP reports, BOM lists), extract data into Markdown tables before embedding to maintain column-row semantic affinity.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. Embedding &amp;amp; Vector Storage with PostgreSQL
&lt;/h2&gt;

&lt;p&gt;Store your embeddings natively inside PostgreSQL using the &lt;code&gt;pgvector&lt;/code&gt; extension. This guarantees that document metadata, user access permissions (Row-Level Security), and vector indexes reside inside a single transactional boundary.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Create extension and documents table&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;EXTENSION&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;enterprise_knowledge&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="n"&gt;BIGSERIAL&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;document_title&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;chunk_index&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;metadata&lt;/span&gt; &lt;span class="n"&gt;JSONB&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;'{}'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;embedding&lt;/span&gt; &lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1536&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;-- Matches standard embedding dimensions&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- Build high-speed HNSW index for sub-5ms cosine retrieval&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;enterprise_knowledge&lt;/span&gt; 
&lt;span class="k"&gt;USING&lt;/span&gt; &lt;span class="n"&gt;hnsw&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;embedding&lt;/span&gt; &lt;span class="n"&gt;vector_cosine_ops&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ef_construction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Advanced Retrieval: Hybrid Search &amp;amp; Re-ranking
&lt;/h2&gt;

&lt;p&gt;Basic vector similarity search often fails on exact keyword matching (part numbers, invoice serials, specific employee names).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution: Hybrid Search&lt;/strong&gt;&lt;br&gt;
Combine dense semantic search with sparse keyword search (BM25 or PostgreSQL &lt;code&gt;tsvector&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; Retrieve top 20 candidate chunks via vector similarity (&lt;code&gt;&amp;lt;=&amp;gt;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Retrieve top 20 candidate chunks via Full-Text Search (&lt;code&gt;tsvector @@ plainto_tsquery&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 3 (Reciprocal Rank Fusion):&lt;/strong&gt; Merge candidate pools using RRF scoring.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 4 (Cross-Encoder Re-ranking):&lt;/strong&gt; Pass the top 15 candidate chunks through a local re-ranker model (such as &lt;code&gt;bge-reranker-v2-m3&lt;/code&gt;) to calculate precise query-to-context relevance. Pass only the top 3-5 re-ranked chunks to the generator LLM.&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  5. LLM Prompt Guardrails &amp;amp; Hallucination Mitigation
&lt;/h2&gt;

&lt;p&gt;The generator prompt must enforce strict boundaries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a factual enterprise assistant. Answer the user's question ONLY using the provided context chunks below.
If the context does not contain sufficient facts to answer accurately, explicitly state: "I cannot find sufficient documentation in the knowledge base to verify this."
Do not extrapolate, assume, or utilize outside knowledge.

Context Chunks:
{context}

Question:
{question}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set temperature between &lt;code&gt;0.0&lt;/code&gt; and &lt;code&gt;0.2&lt;/code&gt; for factual enterprise tasks.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Continuous Automated Evaluation (Ragas Framework)
&lt;/h2&gt;

&lt;p&gt;Never deploy RAG without quantitative evaluation. Use frameworks like &lt;strong&gt;Ragas&lt;/strong&gt; to track 3 core metrics continuously:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faithfulness:&lt;/strong&gt; Quantifies whether every statement in the generated answer is grounded in the retrieved context (detects hallucinations).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Answer Relevance:&lt;/strong&gt; Quantifies whether the generated response directly addresses the user query.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Precision:&lt;/strong&gt; Quantifies the signal-to-noise ratio of your retrieval pipeline.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Looking to deploy a sovereign, private RAG pipeline or eliminate third-party AI SaaS fees? Explore production architectures at &lt;a href="https://hrdnsh.com/services/agentic-ai-rag-orchestration/" rel="noopener noreferrer"&gt;hrdnsh.com/services/agentic-ai-rag-orchestration/&lt;/a&gt; or get in touch with Haradhan Sharma at &lt;a href="https://hrdnsh.com" rel="noopener noreferrer"&gt;hrdnsh.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>tutorial</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Odoo vs ERPNext: An Honest Architectural Comparison for Manufacturing</title>
      <dc:creator>Haradhan Sharma</dc:creator>
      <pubDate>Thu, 17 Sep 2026 10:28:07 +0000</pubDate>
      <link>https://dev.to/haradhansharma/odoo-vs-erpnext-an-honest-architectural-comparison-for-manufacturing-54h6</link>
      <guid>https://dev.to/haradhansharma/odoo-vs-erpnext-an-honest-architectural-comparison-for-manufacturing-54h6</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://hrdnsh.com/blog/odoo-vs-erpnext-comparison/" rel="noopener noreferrer"&gt;hrdnsh.com&lt;/a&gt; by &lt;a href="https://hrdnsh.com" rel="noopener noreferrer"&gt;Haradhan Sharma&lt;/a&gt;, Senior Enterprise Operations Leader &amp;amp; Chief Architect.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Both &lt;strong&gt;Odoo&lt;/strong&gt; and &lt;strong&gt;ERPNext&lt;/strong&gt; are Python-powered, open-source enterprise resource planning (ERP) platforms. Both can handle manufacturing. However, they make vastly different architectural and commercial trade-offs.&lt;/p&gt;

&lt;p&gt;Having spent 20+ years managing high-volume industrial operations (including 10 years heading Production Planning &amp;amp; Operational MIS for an export apparel manufacturer), here is an honest comparison from the factory floor and the codebase.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Licensing Model &amp;amp; Feature Gating
&lt;/h2&gt;

&lt;p&gt;The fundamental divergence between Odoo and ERPNext lies in their commercial licensing strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Odoo (Open Core Model):&lt;/strong&gt; Odoo operates a dual-license model. The Community Edition is LGPLv3, but critical manufacturing modules—&lt;strong&gt;MRP, Quality Control, Work Centers, Maintenance, Subcontracting, and Barcode/WMS&lt;/strong&gt;—are strictly gated behind the proprietary Enterprise Edition (€24.90 to $30+ per user per month). If you need real manufacturing workflows in Odoo, you are forced into recurring per-seat fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ERPNext (100% Free &amp;amp; Open Source):&lt;/strong&gt; ERPNext is licensed entirely under GNU GPLv3. There is no "Enterprise" tier, no hidden feature locks, and zero per-seat licensing. Every core module—BOM management, multi-level work orders, time-and-action scheduling, subcontracting, and inventory FIFO control—is 100% free and open.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Manufacturing Capabilities Comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Manufacturing Module&lt;/th&gt;
&lt;th&gt;Odoo Community&lt;/th&gt;
&lt;th&gt;Odoo Enterprise&lt;/th&gt;
&lt;th&gt;ERPNext (GPLv3)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-Level Bill of Materials (BOM)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Basic&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full (Native)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Work Orders &amp;amp; Job Cards&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Gated&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full (Native)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Material Requirement Planning (MRP)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Gated&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full (Native)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Quality Inspections (QA/QC)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Gated&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full (Native)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Subcontracting / Job Work&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Gated&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full (Native)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Shop-Floor Capacity Balancing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Gated&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full (Native)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Barcode / WMS Integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Basic&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full (Native)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  3. Customization &amp;amp; Developer Experience
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Odoo:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework:&lt;/strong&gt; Custom Python ORM with PostgreSQL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Modules:&lt;/strong&gt; Powerful but highly opinionated. Upgrading custom modules across major Odoo versions (e.g., v16 to v17 or v18) often requires significant code refactoring due to underlying ORM shifts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No-Code Tooling:&lt;/strong&gt; Odoo Studio is fast for non-developers, but it is proprietary to Odoo Enterprise.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ERPNext:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework:&lt;/strong&gt; Frappe Framework (Python, MariaDB/PostgreSQL, Redis).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture:&lt;/strong&gt; Metadata-driven DocType system. Adding custom fields, child tables, automated server scripts, and custom REST API endpoints can be accomplished directly from the web interface or via lightweight Python hooks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintainability:&lt;/strong&gt; Custom Frappe apps sit completely separate from core code, making upstream ERPNext updates significantly less prone to breakage.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. 3-Year Total Cost of Ownership (20 Users Scale)
&lt;/h2&gt;

&lt;p&gt;Let's examine realistic figures for a mid-sized manufacturing plant with 20 active ERP users (merchandisers, warehouse in-charges, production planners, accountants):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Expense Category&lt;/th&gt;
&lt;th&gt;Odoo Enterprise&lt;/th&gt;
&lt;th&gt;ERPNext (Self-Hosted)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Software Licensing (3 Years)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;€17,928 (~$19,500 USD)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0 USD (100% GPLv3)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dedicated Cloud / Bare Metal Server&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hosted on Odoo.sh ($3,600)&lt;/td&gt;
&lt;td&gt;Linux VPS / Dedicated Server ($2,400)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Implementation &amp;amp; Customization&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$15,000 – $30,000&lt;/td&gt;
&lt;td&gt;$10,000 – $20,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total 3-Year Expenditure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$38,000 – $53,000+ USD&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$12,400 – $22,400 USD&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Net Financial Savings&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Baseline&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;60% Cost Reduction&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  When to Choose Which Platform
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Choose Odoo If:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;You run a mixed business (e.g., e-commerce, retail storefronts, POS, CRM, and digital marketing) where manufacturing is secondary.&lt;/li&gt;
&lt;li&gt;You prefer a sleek, polished out-of-the-box UI and have budget to pay perpetual user license fees.&lt;/li&gt;
&lt;li&gt;You want immediate access to the 30,000+ commercial plugins in the Odoo App Store.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Choose ERPNext If:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Manufacturing &amp;amp; Operations is your core engine&lt;/strong&gt; (apparel, discrete manufacturing, plastics, FMCG).&lt;/li&gt;
&lt;li&gt;You refuse to pay per-user license fees as your factory and warehouse floor staff scales.&lt;/li&gt;
&lt;li&gt;You require deep shop-floor customization, real-time inventory FIFO tracking, and complete code sovereignty.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;Need expert guidance modernizing factory operations or deploying custom ERPNext / Odoo manufacturing modules? Explore technical implementation blueprints at &lt;a href="https://hrdnsh.com/services/industrial-automation-erp/" rel="noopener noreferrer"&gt;hrdnsh.com/services/industrial-automation-erp/&lt;/a&gt; or contact Haradhan Sharma directly at &lt;a href="https://hrdnsh.com" rel="noopener noreferrer"&gt;hrdnsh.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>erp</category>
      <category>opensource</category>
      <category>python</category>
      <category>manufacturing</category>
    </item>
    <item>
      <title>PostgreSQL pgvector vs Pinecone: Enterprise Vector Database Architectural Guide</title>
      <dc:creator>Haradhan Sharma</dc:creator>
      <pubDate>Thu, 17 Sep 2026 10:27:25 +0000</pubDate>
      <link>https://dev.to/haradhansharma/postgresql-pgvector-vs-pinecone-enterprise-vector-database-architectural-guide-5gj8</link>
      <guid>https://dev.to/haradhansharma/postgresql-pgvector-vs-pinecone-enterprise-vector-database-architectural-guide-5gj8</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://hrdnsh.com/blog/pgvector-vs-pinecone-enterprise-rag/" rel="noopener noreferrer"&gt;hrdnsh.com&lt;/a&gt; by &lt;a href="https://hrdnsh.com" rel="noopener noreferrer"&gt;Haradhan Sharma&lt;/a&gt;, Senior Enterprise Operations Leader &amp;amp; Chief Architect.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Choosing the right vector database is the single most critical architectural decision when designing an enterprise Retrieval-Augmented Generation (RAG) system. &lt;/p&gt;

&lt;p&gt;When enterprise engineering teams build internal AI assistants, legal copilots, or shop-floor knowledge bases, they face two divergent paths:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dedicated Vector SaaS (Pinecone, Qdrant Cloud, Weaviate):&lt;/strong&gt; Standalone, specialized search engines optimized exclusively for high-dimensional embeddings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified Relational Store (PostgreSQL with pgvector):&lt;/strong&gt; Extending your existing ACID enterprise database to support vector similarity alongside relational user tables, schemas, and Row-Level Security (RLS).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While dedicated vector databases captured headlines during the initial generative AI wave, production engineering has decisively shifted toward unified PostgreSQL. Here is the architectural and financial breakdown.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Security &amp;amp; Row-Level Security (RLS)
&lt;/h2&gt;

&lt;p&gt;In enterprise software, data access is rarely universal. A financial ledger, board meeting minutes, or confidential HR documents should only be accessible to employees with specific clearance.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Pinecone Challenge:
&lt;/h3&gt;

&lt;p&gt;Pinecone and standalone vector stores lack native relational joins and dynamic access control. To implement access restrictions, engineering teams must either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create separate vector namespaces for every access level (which explodes index management complexity), or&lt;/li&gt;
&lt;li&gt;Retrieve unvetted candidate vectors over the wire and filter them in application memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Filtering vectors in application memory leaks data boundaries, wastes network bandwidth, and increases query latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  The pgvector Advantage:
&lt;/h3&gt;

&lt;p&gt;Because &lt;code&gt;pgvector&lt;/code&gt; runs natively inside PostgreSQL, standard &lt;strong&gt;Row-Level Security (RLS)&lt;/strong&gt; applies directly to vector queries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Secure vector similarity query with RLS enabled&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;document_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;embedding&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&amp;gt;&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;similarity&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;enterprise_documents&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;tenant_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current_setting&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'app.current_tenant'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;clearance_level&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;current_setting&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'app.user_clearance'&lt;/span&gt;&lt;span class="p"&gt;)::&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;embedding&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&amp;gt;&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A single SQL query retrieves semantically relevant text chunks while mathematically preventing unauthorized employees from ever retrieving sensitive vectors.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Transactional Integrity &amp;amp; ACID Guarantees
&lt;/h2&gt;

&lt;p&gt;Enterprise documents evolve constantly: contracts are amended, standard operating procedures (SOPs) are updated, and customer records are deleted.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;With Standalone Stores (Pinecone):&lt;/strong&gt; Synchronizing your primary relational database with an external vector store requires complex dual-write distributed pipelines (Kafka, Celery task queues, Redis pub/sub). If an update fails midway, your vector index experiences synchronization drift—leading to severe LLM hallucinations grounded on obsolete data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;With pgvector:&lt;/strong&gt; Vector embeddings reside in the exact same table as the source text. When a document is updated or deleted, the vector representation is updated atomically within the same ACID transaction. Zero drift, zero ghost vectors.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Total Cost of Ownership (TCO) &amp;amp; Predictability
&lt;/h2&gt;

&lt;p&gt;Enterprise budgets require financial predictability.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost Metric&lt;/th&gt;
&lt;th&gt;Dedicated Vector SaaS (Pinecone)&lt;/th&gt;
&lt;th&gt;PostgreSQL with pgvector&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pricing Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tiered index hours + read/write compute units&lt;/td&gt;
&lt;td&gt;Open-source extension ($0 software license)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Monthly Cost (10M Vectors)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$1,200 – $4,500+ USD / month&lt;/td&gt;
&lt;td&gt;Hosted within existing database instance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Network Egress&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Billed for every embedding payload round-trip&lt;/td&gt;
&lt;td&gt;Zero network egress (Local IPC / intra-VPC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3-Year TCO&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$45,000 – $150,000+ USD&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0 additional licensing (Hardware only)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  4. Performance Benchmarks: HNSW vs. IVFFlat
&lt;/h2&gt;

&lt;p&gt;With modern &lt;code&gt;pgvector&lt;/code&gt; (v0.5.0 and newer), indexing performance rivals specialized C++ vector stores:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HNSW (Hierarchical Navigable Small World):&lt;/strong&gt; Delivers sub-5ms query latency and 99%+ recall without requiring full table scans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Halfvec (16-bit float) &amp;amp; Binary Quantization:&lt;/strong&gt; Reduces vector memory footprint by 50% to 75%, allowing millions of 1536-dimensional embeddings (e.g., OpenAI &lt;code&gt;text-embedding-3-small&lt;/code&gt;) to reside entirely in RAM on standard commodity VPS servers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  When Pinecone Still Makes Sense
&lt;/h2&gt;

&lt;p&gt;Dedicated vector databases remain viable when:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You are indexing over 100 million vectors requiring horizontal sharding across distributed clusters.&lt;/li&gt;
&lt;li&gt;Your organization operates without any in-house database administration and demands a completely serverless black-box API.&lt;/li&gt;
&lt;li&gt;Your vector search requires zero relational metadata, user clearance checks, or transactional joins.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The Verdict
&lt;/h2&gt;

&lt;p&gt;For 95% of enterprise AI applications, legal knowledge bases, and custom manufacturing ERP assistants, &lt;strong&gt;PostgreSQL with pgvector&lt;/strong&gt; is the superior architectural foundation. It guarantees zero data leakage, eliminates SaaS fees, and unifies your relational data with AI embeddings.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Need help deploying or benchmarking Sovereign AI or PostgreSQL pgvector pipelines? Connect with Haradhan Sharma at &lt;a href="https://hrdnsh.com" rel="noopener noreferrer"&gt;hrdnsh.com&lt;/a&gt; or review technical blueprints at &lt;a href="https://hrdnsh.com/services/agentic-ai-rag-orchestration/" rel="noopener noreferrer"&gt;hrdnsh.com/services/agentic-ai-rag-orchestration/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>ai</category>
      <category>database</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Modernizing Garment &amp; Textile Manufacturing with Open-Source ERPNext</title>
      <dc:creator>Haradhan Sharma</dc:creator>
      <pubDate>Thu, 17 Sep 2026 10:27:20 +0000</pubDate>
      <link>https://dev.to/haradhansharma/modernizing-garment-textile-manufacturing-with-open-source-erpnext-186j</link>
      <guid>https://dev.to/haradhansharma/modernizing-garment-textile-manufacturing-with-open-source-erpnext-186j</guid>
      <description>&lt;h1&gt;
  
  
  Modernizing Garment &amp;amp; Textile Manufacturing with Open-Source ERPNext: Lessons from 10 Years on the Factory Floor
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://hrdnsh.com/blog/erpnext-for-garments-manufacturing/" rel="noopener noreferrer"&gt;hrdnsh.com&lt;/a&gt; by &lt;a href="https://hrdnsh.com" rel="noopener noreferrer"&gt;Haradhan Sharma&lt;/a&gt;, Former Manager, Production Planning &amp;amp; Coordination (PPC) at Fakir Knitwears Ltd., Founder &amp;amp; Chief Enterprise Architect.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;In garment manufacturing, profit margins are won or lost on the cutting table, during sewing line balancing, and through fabric consumption control.&lt;/p&gt;

&lt;p&gt;Yet even in 2026, a shocking percentage of multi-million-dollar apparel exporters still run their master production schedules (MPS), material requirement plans (MRP), and cutting orders on fragmented Excel sheets.&lt;/p&gt;

&lt;p&gt;When factories look for enterprise solutions, they often get pitched proprietary behemoths like &lt;strong&gt;SAP Business One&lt;/strong&gt; or &lt;strong&gt;Oracle NetSuite&lt;/strong&gt;—carrying $150,000+ implementation price tags and $100+/user monthly license fees that bleed operating margins.&lt;/p&gt;

&lt;p&gt;Having managed factory floor operations and production planning for over a decade in tier-1 composite knitwear manufacturing, here is why &lt;strong&gt;ERPNext (Open-Source)&lt;/strong&gt; has become the definitive high-ROI alternative for apparel enterprises.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 4 Core Challenges in Garment ERP (And Why Generic ERPs Fail)
&lt;/h2&gt;

&lt;p&gt;Generic enterprise software fails in apparel manufacturing because it treats items as simple single-dimensional SKUs. Apparel is fundamentally matrix-driven:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Complex Size-Color-Style Matrices
&lt;/h3&gt;

&lt;p&gt;A single t-shirt style is not one SKU. It is 1 style × 6 colors × 5 sizes = 30 dynamic variants, each with distinct fabric consumption ratios, marker yields, and thread requirements.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ERPNext Solution:&lt;/strong&gt; Native Multi-Variant Bill of Materials (BOM) that dynamically scales work orders across matrix attributes with zero manual duplicate data entry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Fabric Roll &amp;amp; Lot Traceability
&lt;/h3&gt;

&lt;p&gt;Fabric variance across dye lots can ruin an entire export shipment due to shade variation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ERPNext Solution:&lt;/strong&gt; Batch &amp;amp; Serial tracking from greige fabric knitting through computerized dyeing (e.g., Thies/Fong's), finishing inspection, and roll-wise cutting table allocation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Real-Time Work-in-Progress (WIP) &amp;amp; Sewing Line Balancing
&lt;/h3&gt;

&lt;p&gt;Bottlenecks at buttonholing or collar attaching stall entire sewing lines. If line managers only discover delays during evening shift handovers, delivery schedules are already compromised.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ERPNext Solution:&lt;/strong&gt; Real-time shop floor workstation tracking using barcode/QR scanning at each operation checkpoint (Cutting → Sewing Bundle → Ironing → Final AQL Inspection).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Zero Recurring Licensing Penalties
&lt;/h3&gt;

&lt;p&gt;In an apparel manufacturing plant with 50+ operators, line supervisors, storekeepers, and merchandisers needing system access, per-user SaaS fees ($50–$100/user/month) create massive financial friction.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ERPNext Solution:&lt;/strong&gt; 100% GPLv3 Open Source. Zero per-user license fees. Deploy on a secure Linux VPS with infinite users for under $100/month in hosting.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Implementation Blueprint: 6-Week Roadmap to Go-Live
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Week 1-2: Master Data &amp;amp; Item Variant Setup (BOMs, Work Centers, Routing)
    │
Week 3-4: Inventory &amp;amp; Procurement Automation (PO, GRN, Batch Tracking)
    │
Week 5:   Shop Floor Production &amp;amp; WIP Bundle Tracking
    │
Week 6:   Buyer Compliance, Packing Lists &amp;amp; Automated Invoicing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The Verdict
&lt;/h2&gt;

&lt;p&gt;You do not need half-million-dollar proprietary software to achieve world-class operational visibility in garments and textiles. &lt;/p&gt;

&lt;p&gt;By combining battle-tested factory floor workflows with modern, open-source Frappe/ERPNext architecture, manufacturing leaders can eliminate data silos, reduce fabric wastage by 3–5%, and achieve complete traceability.&lt;/p&gt;




&lt;h3&gt;
  
  
  Want to modernise your manufacturing workflow?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Read the complete technical comparison at &lt;a href="https://hrdnsh.com/blog/erpnext-for-garments-manufacturing/" rel="noopener noreferrer"&gt;hrdnsh.com/blog/erpnext-for-garments-manufacturing/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Explore custom ERP architecture blueprints at &lt;a href="https://hrdnsh.com/services/industrial-automation-erp/" rel="noopener noreferrer"&gt;hrdnsh.com/services/industrial-automation-erp/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Connect directly for advisory at &lt;a href="mailto:me@hrdnsh.com"&gt;me@hrdnsh.com&lt;/a&gt; or &lt;a href="https://hrdnsh.com/consultation/" rel="noopener noreferrer"&gt;hrdnsh.com/consultation/&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>erp</category>
      <category>opensource</category>
      <category>manufacturing</category>
      <category>python</category>
    </item>
    <item>
      <title>Why Forward-Thinking Enterprises are Replacing ChatGPT Enterprise with Sovereign AI in 2026</title>
      <dc:creator>Haradhan Sharma</dc:creator>
      <pubDate>Thu, 03 Sep 2026 11:13:50 +0000</pubDate>
      <link>https://dev.to/haradhansharma/why-forward-thinking-enterprises-are-replacing-chatgpt-enterprise-with-sovereign-ai-in-2026-1fa1</link>
      <guid>https://dev.to/haradhansharma/why-forward-thinking-enterprises-are-replacing-chatgpt-enterprise-with-sovereign-ai-in-2026-1fa1</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://hrdnsh.com/blog/sovereign-ai-vs-chatgpt-enterprise/" rel="noopener noreferrer"&gt;hrdnsh.com&lt;/a&gt; by &lt;a href="https://hrdnsh.com" rel="noopener noreferrer"&gt;Haradhan Sharma&lt;/a&gt;, Senior Enterprise Architect &amp;amp; Sovereign AI Consultant.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Your organization's proprietary data is its most critical competitive asset. Yet in 2026, thousands of companies still route sensitive financial ledgers, legal contracts, proprietary codebases, and customer records through third-party AI APIs.&lt;/p&gt;

&lt;p&gt;While &lt;strong&gt;ChatGPT Enterprise&lt;/strong&gt; offers a quick-start interface, forward-thinking engineering leaders and regulated enterprises are pivoting to &lt;strong&gt;Sovereign AI&lt;/strong&gt;—self-hosted, private intelligence running completely within their own virtual private clouds (VPC) or bare-metal data centers.&lt;/p&gt;

&lt;p&gt;In this guide, we break down the architectural reality, real-world total cost of ownership (TCO), and the exact engineering blueprint to deploy your own private AI infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. SaaS AI vs Sovereign AI: Architectural Comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;ChatGPT Enterprise / Public SaaS&lt;/th&gt;
&lt;th&gt;Sovereign AI (Self-Hosted)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Boundary&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Encrypted in transit, decrypted in third-party memory&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100% on-premise or VPC (Zero data leaves)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pricing Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$60 / user / month (Scales linearly with headcount)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Fixed hardware / compute cost (Infinite users)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Knowledge Grounding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Generic public corpus + vector search&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Private RAG over internal PostgreSQL/pgvector&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model Customization&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Prompt wrappers &amp;amp; superficial fine-tuning&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full weight control, LoRA adapters, model swapping&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vendor Lock-in&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High (OpenAI API dependencies)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Zero (vLLM, Ollama, LLaMA 3, Mistral, DeepSeek)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  2. The Total Cost of Ownership (TCO) Breakdown
&lt;/h2&gt;

&lt;p&gt;Let's look at real-world numbers for a mid-sized organization with &lt;strong&gt;100 knowledge workers&lt;/strong&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario A: ChatGPT Enterprise
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost per seat:&lt;/strong&gt; $60/month&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monthly spend:&lt;/strong&gt; $6,000/month&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3-Year Total Spend:&lt;/strong&gt; &lt;strong&gt;$216,000 USD&lt;/strong&gt; (Ongoing, non-asset expenditure)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Scenario B: Sovereign AI Infrastructure (Dedicated GPU Compute)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Compute:&lt;/strong&gt; 1x Dedicated NVIDIA A100 (80GB) or 2x RTX 4090 Cloud instance (~$2.20/hour spot/reserved = ~$1,600/month)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source Stack:&lt;/strong&gt; vLLM inference engine + PostgreSQL (pgvector) + FastAPI gateway + Open WebUI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-Time Implementation &amp;amp; Hardening:&lt;/strong&gt; ~$8,000 – $15,000&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3-Year Total Spend:&lt;/strong&gt; ~$65,000 – $75,000 USD&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Net Savings:&lt;/strong&gt; &lt;strong&gt;Over $140,000 (65%+ reduction)&lt;/strong&gt; with 100% data ownership.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Production Architecture Blueprint
&lt;/h2&gt;

&lt;p&gt;A production Sovereign AI stack consists of 4 isolated layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Internal Enterprise Users / ERP / CRM ]
                    │ (Authenticated HTTPS / JWT)
                    ▼
       [ FastAPI Reverse Proxy Gateway ]
                    │
         ┌──────────┴──────────┐
         ▼                     ▼
[ PostgreSQL (pgvector) ]   [ vLLM Inference Engine ]
• Document Embeddings       • LLaMA 3.3 70B / Mistral
• Hybrid BM25 + Vector      • Token streaming (sub-50ms TTFT)
• Row-Level Security (RLS)  • Zero external internet access
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Python RAG Orchestration Snippet
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;psycopg&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pgvector.psycopg&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;register_vector&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;httpx&lt;/span&gt;

&lt;span class="c1"&gt;# 1. Connect to private pgvector store
&lt;/span&gt;&lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;psycopg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dbname=enterprise_ai user=admin host=127.0.0.1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;register_vector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;retrieve_grounded_context&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query_embedding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;top_k&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Retrieve private enterprise documentation without external SaaS leaks.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
            SELECT content, 1 - (embedding &amp;lt;=&amp;gt; %s::vector) AS similarity
            FROM company_documents
            WHERE department_access = &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;finance&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;
            ORDER BY embedding &amp;lt;=&amp;gt; %s::vector
            LIMIT %s;
        &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query_embedding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;query_embedding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;top_k&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

        &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchall&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;query_sovereign_llm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Query self-hosted vLLM engine running inside local VPC.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;meta-llama/Llama-3.3-70B-Instruct&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;messages&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Answer strictly using this verified internal context:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;temperature&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;httpx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;AsyncClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;30.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://vllm-cluster:8000/v1/chat/completions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;choices&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. When Does Sovereign AI Make Sense?
&lt;/h2&gt;

&lt;p&gt;Sovereign AI is mandatory if your business operates under:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Regulated Compliance:&lt;/strong&gt; HIPAA, GDPR, SOC 2 Type II, ISO 27001, or defense/ITAR restrictions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proprietary IP:&lt;/strong&gt; Garment manufacturing designs, pharmaceutical formulas, algorithmic trading models, or legal briefs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Volume at Scale:&lt;/strong&gt; When user count exceeds 30 seats, paying SaaS per-seat taxes becomes financially irresponsible.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Conclusion &amp;amp; Next Steps
&lt;/h2&gt;

&lt;p&gt;Sovereign AI is not about rejecting commercial AI models—it is about &lt;strong&gt;data sovereignty, cost containment, and engineering resilience&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you are planning to deploy self-hosted RAG, open-source LLM clusters, or private agent gateways for your enterprise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read the full technical documentation at &lt;a href="https://hrdnsh.com/services/agentic-ai-rag-orchestration/" rel="noopener noreferrer"&gt;hrdnsh.com/services/agentic-ai-rag-orchestration/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Or schedule a strategic advisory discovery session at &lt;a href="https://hrdnsh.com/consultation/" rel="noopener noreferrer"&gt;hrdnsh.com/consultation/&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>python</category>
      <category>architecture</category>
    </item>
    <item>
      <title>How to deploy Python Scripts to bereveal.com</title>
      <dc:creator>Haradhan Sharma</dc:creator>
      <pubDate>Sat, 12 Feb 2022 12:57:49 +0000</pubDate>
      <link>https://dev.to/haradhansharma/how-to-deploy-python-scripts-to-berevealcom-20fe</link>
      <guid>https://dev.to/haradhansharma/how-to-deploy-python-scripts-to-berevealcom-20fe</guid>
      <description>&lt;p&gt;&lt;b&gt;How to deploy Python to bereveal.com.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt; Here is a tutorial on how to deploy a Django project. You can also use other Python frameworks in the same way.&lt;/p&gt;

&lt;p&gt;Currently they have two packages for Python on their site. Buy any one from here.&lt;/p&gt;

&lt;blockquote&gt;
  1. &lt;a href="https://bereveal.com/django-hosting-basic.html" rel="noopener noreferrer"&gt;Django Hosting Basic&lt;/a&gt;&lt;br&gt;

  2. &lt;a href="https://bereveal.com/linux-website-hosting/premier/" rel="noopener noreferrer"&gt;Premier Web hosting plan&lt;/a&gt;&lt;br&gt;
                  3. &lt;a href="https://bereveal.com/linux-website-hosting/value/" rel="noopener noreferrer"&gt;Value Web hosting plan&lt;/a&gt;&lt;br&gt;
                  4. &lt;a href="https://bereveal.com/linux-website-hosting/advanced/" rel="noopener noreferrer"&gt;Advanced Web hosting plan&lt;/a&gt;&lt;br&gt;
                  5. &lt;a href="https://bereveal.com/linux-website-hosting/basic/" rel="noopener noreferrer"&gt;Basic Web hosting plan&lt;/a&gt;&lt;br&gt;
&lt;/blockquote&gt;

&lt;p&gt;Needless to say, all of plans are suitable for Python hosting. But SSH is automatically unlocked when you buy the plan mentioned for Python, but you have to buy SSH separately in other plans.&lt;/p&gt;

&lt;p&gt;SSH remains locked during the trial period. So you have to buy SSH separately during the trial period. You can also buy for a month if you want.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            &amp;lt;p&amp;gt; They says, Following the feedback of web developers, we’ve added a new functionality to the Advanced section of the&amp;amp;nbsp;Control Panel&amp;amp;nbsp;- the Python Settings.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The new Python &lt;span&gt;Settings&lt;/span&gt; will allow you to edit the current Python version and to enable Python-compatible applications for your projects.&lt;/p&gt;

&lt;p&gt;Located right next to PHP Settings, it gives you one-click access to various Python management options.&lt;/p&gt;

&lt;h2&gt;What is Python about?&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.python.org/" rel="noopener noreferrer"&gt;Python&lt;/a&gt; is one of the most important application development languages and has been around for a long time now.&lt;/p&gt;

&lt;p&gt;Its standard library supports many Internet protocols, including JSON, FTP, IMAP, HTML and XML.&lt;/p&gt;

&lt;p&gt;There are different types of Python-based software:&lt;/p&gt;

&lt;p&gt;for web development purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;frameworks such as Django and &lt;a href="http://www.pylonsproject.org/" rel="noopener noreferrer"&gt;Pyramid&lt;/a&gt;; micro-frameworks such as Flask and Bottle;&lt;/li&gt;
&lt;li&gt;advanced content management systems such as Plone and django CMS;&lt;/li&gt;
&lt;li&gt;asynchronous networking libraries like &lt;a href="http://www.tornadoweb.org/en/stable/" rel="noopener noreferrer"&gt;Tornado&lt;/a&gt;, which is perfect for long polling, WebSockets and other applications that require a long-lived connection to each user;&lt;/li&gt;
&lt;li&gt;full-stack frameworks (like web2py) for rapid development of fast and portable web-based, database-driven apps;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;for scientific and numerical computing purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open-source packages like &lt;a href="http://www.scipy.org/" rel="noopener noreferrer"&gt;SciPy&lt;/a&gt;, Matplotlib and NumPy, which are used in mathematics, science and engineering;&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://pandas.pydata.org/" rel="noopener noreferrer"&gt;Pandas&lt;/a&gt; - a BSD-licensed library for high-performance data analysis and modeling;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://ipython.org/" rel="noopener noreferrer"&gt;iPython&lt;/a&gt; - a powerful command shell for easier editing and recording of work sessions that supports interactive data visualization and parallel computing;&lt;/li&gt;
&lt;li&gt;Software Carpentry Course, which teaches the basics of scientific computing and provides open-access teaching materials;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;for software development purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://buildbot.net/" rel="noopener noreferrer"&gt;Buildbot&lt;/a&gt; and Apache Gump, which are used for automating software build, test and release processes;&lt;/li&gt;
&lt;li&gt;Roundup and Trac - issue tracking and project management tools;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;for system administration purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.ansible.com/" rel="noopener noreferrer"&gt;Ansible&lt;/a&gt; - an easy-to-deploy IT automation engine that automates configuration management, application deployment and cloud provisioning;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://saltstack.com/" rel="noopener noreferrer"&gt;Salt&lt;/a&gt; - a powerful open-source platform for IT automation and orchestration;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.openstack.org/" rel="noopener noreferrer"&gt;OpenStack&lt;/a&gt; - a high-performance computing, storage and networking platform;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Python is easy to learn and use, no matter if you're new to programming or an experienced developer.&lt;/p&gt;

&lt;p&gt;It is backed up by a large community, which &lt;a href="https://www.python.org/community/workshops/" rel="noopener noreferrer"&gt;organizes conferences and workshops&lt;/a&gt;, collaborates on code development projects, supports &lt;a href="http://docs.python.org/" rel="noopener noreferrer"&gt;an extensive Python documentation&lt;/a&gt; to help newbies along the way and maintains mailing lists to keep users up to date.&lt;/p&gt;

&lt;h2&gt;How do I use the Python Manager?&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.cloudlogin.co%2Fimgs%2Fpython-settings-control-panel.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.cloudlogin.co%2Fimgs%2Fpython-settings-control-panel.png" alt="" width="683" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the Python Manager section of the Control Panel, you’ll be able to set the Python version for your account.&lt;/p&gt;

&lt;p&gt;You can choose between Python 2.7, Python 3.1 and the latest version - Python 3.5.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.cloudlogin.co%2Fimgs%2Fpython-settings-change-version.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.cloudlogin.co%2Fimgs%2Fpython-settings-change-version.png" alt="" width="668" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;How to install a Python-based CMS on our platform (tutorial)?&lt;/h2&gt;

&lt;p&gt;To give you a better idea of how Python-based applications work on our servers, we’ll show you how to install the Django framework-powered &lt;a href="http://mezzanine.jupo.org/" rel="noopener noreferrer"&gt;Mezzanine CMS&lt;/a&gt; on our platform via SSH.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create a virtual environment&amp;nbsp;(venv) in the root folder of your account, in our case:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/usr/local/python-3.5/bin/virtualenv /home/venv/&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Enter the newly created virtual environment using the following command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;source /home/venv/bin/activate&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Go to the "www"&amp;nbsp;folder of your hosting account:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd /home/www/&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Install the Mezzanine CMS binaries along with the corresponding modules fastcgi support and flup6.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pip install git+https://github.com/NetAngels/django-fastcgi
pip install flup6
pip install mezzanine&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Make sure you disable the “Outgoing Connections” option or the installation of the modules will fail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Set up the Mezzanine project In a selected custom directory, in our case mydjangocms:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mezzanine-project mydjangocms&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Create a domain or subdomain for the newly installed CMS.&lt;/p&gt;

&lt;p&gt;Keep in mind that the Jail host option needs to be deactivated in order for the installed modules to function properly.&lt;/p&gt;

&lt;p&gt;Point your newly created domain or subdomain to the path of your project. In our example, the path is "/www/mydjangocms".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.cloudlogin.co%2Fimgs%2Fpython-settings-tutorial.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.cloudlogin.co%2Fimgs%2Fpython-settings-tutorial.jpg" alt="" width="685" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Go to the newly created Mezzanine CMS folder:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd mydjangocms&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Set up a database for your CMS. In our case, we’ll use the sqlite3 database for the sake of ease (alternatively, you could set up a MySQL/PostgreSQL database by applying the necessary settings to the Python setup file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;python manage.py createdb&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You will see the following message:&lt;/p&gt;

&lt;pre&gt;A site record is required.
Please enter the domain and optional port
in the format 'domain:port'. For example 'localhost:8000' or 'www.example.com'.

&lt;span&gt;Hit enter to use the default (127.0.0.1:8000):

Use the default option for the SQL host. You will then be asked to enter your username, email and password. 
These are the login credentials for the CMS system and not the database. 
&lt;/span&gt;&lt;span&gt;In the end, you can choose if you want to have some demo content inserted.&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Set up an .htaccess file in the folder of your project with the following entries:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.fcgi/$1 [QSA,L]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 10:&lt;/strong&gt; Set up an index.fcgi file in the folder of your project using the following code&amp;nbsp;(it will serve as an entry point for all requests to the CMS).&lt;/p&gt;

&lt;p&gt;Don't forget to replace "&lt;em&gt;mydjangocms&lt;/em&gt;" with the name of your project.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/home/venv/bin/python3.5
# -*- coding: utf-8 -*-
import os
import sys
activate_this = '/home/venv/bin/activate_this.py'
exec(open(activate_this).read(), dict(__file__=activate_this))
cms_path = '/home/www/mydjangocms/'
sys.path.insert(0, cms_path)
os.chdir(cms_path)
# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "mydjangocms.settings"
from django_fastcgi.servers.fastcgi import runfastcgi
from django.core.servers.basehttp import get_internal_wsgi_application
wsgi_application = get_internal_wsgi_application()
runfastcgi(wsgi_application, method="prefork", daemonize="false", minspare=1, maxspare=1, maxchildren=1)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 11:&lt;/strong&gt; You'll need to make the index.fcgi file executable using this command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;chmod +x index.fcgi&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 12:&lt;/strong&gt; Edit the settings file located inside "mydjangocms/local_settings.py" and replace&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ALLOWED_HOSTS = []&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With your actual host name:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ALLOWED_HOSTS = ['mydjangocms.my-best-domain.net']&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step 13:&lt;/strong&gt; Run the following command to collate the static files:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;python manage.py collectstatic&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You are now ready and your site should be up and running.&lt;/p&gt;

&lt;p&gt;In our example, the newly installed Mezzanine CMS will resolve to:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://mydjangocms.my-best-domain.net/" rel="noopener noreferrer"&gt;http://mydjangocms.my-best-domain.net/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel="attachment wp-att-12245 noopener noreferrer" href="https://blog.resellerspanel.com/wp-content/uploads/2016/11/django-cms-mezzanine-insllation-complete.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.resellerspanel.com%2Fwp-content%2Fuploads%2F2016%2F11%2Fdjango-cms-mezzanine-insllation-complete.jpg" alt="Django CMS Mezzanine - insllation complete" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can log into your Mezzanine CMS Admin Panel using the login details set&amp;nbsp;in step 8 above and kickstart&amp;nbsp;a new blog, for example:&lt;/p&gt;

&lt;p&gt;&lt;a rel="attachment wp-att-12247 noopener noreferrer" href="https://blog.resellerspanel.com/wp-content/uploads/2016/11/django-cms-mezzanine-admin-panel.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.resellerspanel.com%2Fwp-content%2Fuploads%2F2016%2F11%2Fdjango-cms-mezzanine-admin-panel.jpg" alt="Django CMS Mezzanine - Admin Panel" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;         

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

</description>
    </item>
  </channel>
</rss>
