<?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: Ray Forever</title>
    <description>The latest articles on DEV Community by Ray Forever (@raiyanu).</description>
    <link>https://dev.to/raiyanu</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%2F3708844%2F75cb57c0-a6bc-472a-8869-b5df5a052722.png</url>
      <title>DEV Community: Ray Forever</title>
      <link>https://dev.to/raiyanu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raiyanu"/>
    <language>en</language>
    <item>
      <title>Building a TypeScript SDK for Secure Direct Uploads to AWS S3 and ImageKit</title>
      <dc:creator>Ray Forever</dc:creator>
      <pubDate>Mon, 03 Aug 2026 08:30:30 +0000</pubDate>
      <link>https://dev.to/raiyanu/building-a-typescript-sdk-for-secure-direct-uploads-to-aws-s3-and-imagekit-2hbk</link>
      <guid>https://dev.to/raiyanu/building-a-typescript-sdk-for-secure-direct-uploads-to-aws-s3-and-imagekit-2hbk</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Handling file uploads in web applications often involves a trade-off between security, performance, and developer experience. A new open-source TypeScript SDK, &lt;strong&gt;Upload SDK&lt;/strong&gt;, addresses these concerns by enabling secure direct uploads from the browser to cloud storage providers such as AWS S3 and ImageKit.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The SDK shifts the responsibility of file transfer away from the application server. The workflow is as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; The Node.js server validates the upload request.&lt;/li&gt;
&lt;li&gt; The server generates a short-lived, signed upload target.&lt;/li&gt;
&lt;li&gt; The browser uploads the file directly to the storage provider using the signed details.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach ensures that the application server never needs to stream or proxy the actual file data, reducing bandwidth usage and server load.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration and Usage
&lt;/h2&gt;

&lt;p&gt;Developers define named upload types (e.g., &lt;code&gt;avatar&lt;/code&gt;, &lt;code&gt;invoice&lt;/code&gt;) to manage different file categories. Each type includes configuration rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Allowed MIME types and file extensions&lt;/li&gt;
&lt;li&gt;  Maximum file size&lt;/li&gt;
&lt;li&gt;  Expiry time for the upload request&lt;/li&gt;
&lt;li&gt;  Storage destination and key prefix&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To initiate an upload, the browser sends the asset name and file metadata to the server. The server then calls &lt;code&gt;prepareUpload()&lt;/code&gt;, which validates the request, generates a collision-resistant storage key, and returns signed multipart POST details to the client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multiple Storage Profiles
&lt;/h2&gt;

&lt;p&gt;The SDK supports multiple storage profiles within the same application. For instance, developers can configure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  One S3 bucket for public files&lt;/li&gt;
&lt;li&gt;  Another S3 bucket for private documents&lt;/li&gt;
&lt;li&gt;  ImageKit for image-specific storage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This configuration maintains a consistent upload flow across different providers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security with Signed Policies
&lt;/h2&gt;

&lt;p&gt;For Amazon S3, the SDK includes security constraints directly in the signed POST policy. This policy can enforce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  File size limits&lt;/li&gt;
&lt;li&gt;  Content type validation&lt;/li&gt;
&lt;li&gt;  Specific storage keys&lt;/li&gt;
&lt;li&gt;  Expiration times&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These restrictions are enforced by S3 during the upload process, adding an additional layer of security.&lt;/p&gt;

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

&lt;p&gt;The project is open for feedback on its current API and for suggestions regarding which storage providers to support next.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>awss3</category>
      <category>fileupload</category>
      <category>imagekit</category>
    </item>
    <item>
      <title>Xberg v1: A High-Performance Content Intelligence Framework</title>
      <dc:creator>Ray Forever</dc:creator>
      <pubDate>Mon, 03 Aug 2026 07:53:35 +0000</pubDate>
      <link>https://dev.to/raiyanu/xberg-v1-a-high-performance-content-intelligence-framework-4pkf</link>
      <guid>https://dev.to/raiyanu/xberg-v1-a-high-performance-content-intelligence-framework-4pkf</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Xberg v1 has been released as the successor to Kreuzberg, representing a significant evolution in content intelligence processing. The framework handles a wide range of input types including documents (101 formats), code and data (367 types), audio/video transcription, and URLs with static or JavaScript-rendered content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance and Architecture
&lt;/h2&gt;

&lt;p&gt;Xberg is engineered as a high-performance engine with substantial improvements over its predecessor. For PDF and image processing, it handles native PDFs with high performance and accuracy, and includes multiple OCR engines that match the quality of leading Python libraries such as docling, PaddleOCR, and RapidOCR, while offering better performance and stability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Technical Changes
&lt;/h2&gt;

&lt;p&gt;The transition from Kreuzberg v4 to Xberg v1 introduces several major architectural changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pure-Rust PDF backend&lt;/strong&gt; (&lt;code&gt;pdf_oxide&lt;/code&gt;) replaces pdfium, eliminating native pdfium dependencies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layout-aware pipeline&lt;/strong&gt; with ONNX layout detection using PP-DocLayoutV3/RT-DETR and Docling-style predecessor-graph reordering&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-page scanned-page detection&lt;/strong&gt; with selective OCR, plus AcroForm/XFA form field support and outline-based headings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimized OCR and PDF extraction&lt;/strong&gt; with improved memory discipline, pooled model sessions, and streamed conversions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native PaddleOCR backend&lt;/strong&gt; supporting PP-OCRv6 with medium/small/tiny tiers alongside Tesseract&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Inference and Model Support
&lt;/h2&gt;

&lt;p&gt;The framework includes multiple inference paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pure-Rust Candle OCR/VLM stack supporting TrOCR, GLM-OCR, GOT-OCR, DeepSeek-OCR, and PaddleOCR-VL without ONNX Runtime or native Tesseract dependencies&lt;/li&gt;
&lt;li&gt;Secondary inference path via tract enabling ONNX-free execution for in-browser (WASM) and mobile inference&lt;/li&gt;
&lt;li&gt;Named-entity recognition natively in Rust (GLiNER2) extensible to all bindings, including in-browser WASM models with no server round-trip&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Structured Extraction and Retrieval
&lt;/h2&gt;

&lt;p&gt;Xberg provides comprehensive content processing capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structured LLM extraction&lt;/strong&gt; (&lt;code&gt;extract_structured&lt;/code&gt;/&lt;code&gt;split_and_extract&lt;/code&gt;) with rasterization, chunking, citations, caching, and configurable policies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audio and video transcription&lt;/strong&gt; via Whisper ONNX engine supporting .mp3, .wav, .m4a, .mp4, and .webm formats&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval building blocks&lt;/strong&gt; including sparse embeddings (SPLADE), ColBERT late-interaction retrieval, cross-encoder reranking, and dense embeddings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text intelligence&lt;/strong&gt; features including reversible redaction, summarization, translation, VLM image captioning, QR-code detection, document diffing, and page/chunk classification&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Web and Format Support
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;URL and web ingestion&lt;/strong&gt; with sitemap discovery (&lt;code&gt;map_url&lt;/code&gt;) and batched multi-URL crawling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New document formats&lt;/strong&gt; including WordPerfect (.wpd/.wp/.wp5), HEIC/HEIF/AVIF, OpenDocument Presentation (.odp), Quarto/R Markdown, and configurable Jupyter cell rendering&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expanded code intelligence&lt;/strong&gt; with tree-sitter coverage growing from 248 to 367+ languages&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cross-Platform and Bindings
&lt;/h2&gt;

&lt;p&gt;Four new language bindings (Dart/Flutter, Swift, Kotlin/Android, and Zig) bring the total to 15 language bindings over one engine. The framework now includes full mobile support for Flutter, Android, and iOS, with cross-compilation capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark Results
&lt;/h2&gt;

&lt;p&gt;Performance benchmarks for PDF and image processing demonstrate Xberg's capabilities:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Composite Quality (Markdown Pipeline, higher is better):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Xberg (layout): 0.958 (Native PDF), 0.836 (Scanned PDF)&lt;/li&gt;
&lt;li&gt;docling: 0.779 (Native PDF), 0.762 (Scanned PDF)&lt;/li&gt;
&lt;li&gt;mineru: 0.408 (Native PDF), 0.792 (Scanned PDF)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Structure and Layout Fidelity (SF1: tables and reading order, higher is better):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Xberg: 0.949 (Native PDF), 0.531 (Scanned PDF)&lt;/li&gt;
&lt;li&gt;docling: 0.612 (Native PDF), 0.366 (Scanned PDF)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For native PDFs, Xberg leads on quality (0.958 vs 0.837 for the next-best framework) and table/reading-order fidelity (SF1 0.949 vs 0.612 for docling). On scanned PDFs, it ranks first on both quality and raw text fidelity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migration and Support
&lt;/h2&gt;

&lt;p&gt;A migration guide is available for transitioning from Kreuzberg to Xberg. Kreuzberg remains in LTS mode until the end of the year with continued bug fixes and security updates. The full changelog documents all changes, with over 150 bugs fixed during the 1.0 cycle plus security hardening including bounded RTF/PDF allocations, redaction leak fixes, and Excel DDE warnings.&lt;/p&gt;

</description>
      <category>contentintelligence</category>
      <category>rustprogramming</category>
      <category>ocr</category>
      <category>pdfprocessing</category>
    </item>
    <item>
      <title>Testing title</title>
      <dc:creator>Ray Forever</dc:creator>
      <pubDate>Fri, 31 Jul 2026 13:40:57 +0000</pubDate>
      <link>https://dev.to/raiyanu/testing-title-3jed</link>
      <guid>https://dev.to/raiyanu/testing-title-3jed</guid>
      <description>&lt;p&gt;Testing body&lt;/p&gt;

</description>
      <category>testingtags</category>
    </item>
  </channel>
</rss>
