npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nestjs-ai/document-reader-pdf

v0.0.2

Published

PDF.js document reader for NestJS AI

Readme

NestJS AI

A TypeScript/NestJS port of Spring AI — bringing the same powerful AI abstraction layer to the Node.js ecosystem.

Last synced Spring AI commit: da8db657 (Remove Anthropic IT that no longer makes sense)

Overview

NestJS AI is a comprehensive TypeScript port of the Spring AI project, reimagined for the NestJS/Node.js ecosystem. It provides a unified abstraction layer for integrating Large Language Models (LLMs), vector stores, document readers, and RAG pipelines into NestJS applications.

The project faithfully mirrors Spring AI's module structure and API design while leveraging TypeScript idioms, RxJS reactive streams, and NestJS dependency injection.

Key Features

  • Model Abstraction — Unified ChatModel and EmbeddingModel interfaces across providers
  • Multi-Provider Support — OpenAI, Google GenAI (Gemini), Hugging Face Transformers
  • Tool Calling — Structured function/tool calling orchestration
  • RAG Pipeline — End-to-end Retrieval Augmented Generation with vector stores
  • Chat Memory — In-memory and Redis-backed conversation history
  • Document Readers — PDF, Markdown, HTML (Cheerio), Apache Tika
  • Vector Stores — Abstract interface with Redis implementation
  • Observability — OpenTelemetry tracing and metrics
  • Prompt Templating — StringTemplate-based prompt rendering
  • NestJS Integration — Modules, decorators, and DI support

Tech Stack

| Category | Technology | |---|---| | Language | TypeScript 6.x (strict mode) | | Runtime | Node.js >= 20 | | Framework | NestJS 11.x | | Package Manager | pnpm 10.x | | Build | Turborepo + tsc | | Test | Vitest 4.x + TestContainers | | Lint/Format | Biomejs 2.x | | Reactive | RxJS 7.x | | Validation | Zod 4.x |

Porting Progress

Spring AI module porting status to NestJS AI. (~520 source files, ~180 test files ported across 22 packages)

| Category | Spring AI Module | nestjs-ai Package | Progress | |---|---|---|---| | Core | spring-ai-model | @nestjs-ai/model | 100% | | | spring-ai-client-chat | @nestjs-ai/client-chat | 100% | | | spring-ai-commons | @nestjs-ai/commons | 100% | | | spring-ai-retry | @nestjs-ai/retry | 100% | | | spring-ai-template-st | @nestjs-ai/template-st | 100% | | | spring-ai-observation | @nestjs-ai/observation | 100% | | | spring-ai-test | @nestjs-ai/testing | 100% | | Model Providers | spring-ai-openai | @nestjs-ai/model-openai | 100% | | | spring-ai-openai-sdk | @nestjs-ai/model-openai-sdk | 100% | | | spring-ai-google-genai | @nestjs-ai/model-google-genai | 100% | | | spring-ai-transformers | @nestjs-ai/model-transformers | 100% | | | spring-ai-anthropic | — | 0% | | | spring-ai-azure-openai | — | 0% | | | spring-ai-bedrock | — | 0% | | | spring-ai-mistral-ai | — | 0% | | | spring-ai-ollama | — | 0% | | RAG & Vector Stores | spring-ai-rag | @nestjs-ai/rag | 100% | | | spring-ai-vector-store | @nestjs-ai/vector-store | 100% | | | spring-ai-redis-store | @nestjs-ai/vector-store-redis | 100% | | | spring-ai-advisors-vector-store | @nestjs-ai/advisors-vector-store | 100% | | | spring-ai-pgvector-store | — | 0% | | | spring-ai-chroma-store | — | 0% | | | spring-ai-pinecone-store | — | 0% | | | spring-ai-milvus-store | — | 0% | | Document Readers | spring-ai-pdf-document-reader | @nestjs-ai/document-reader-pdf | 100% | | | spring-ai-markdown-document-reader | @nestjs-ai/document-reader-markdown | 100% | | | spring-ai-tika-document-reader | @nestjs-ai/document-reader-tika | 100% | | | (cheerio - NestJS specific) | @nestjs-ai/document-reader-cheerio | 100% | | Memory | spring-ai-model-chat-memory-redis | @nestjs-ai/model-chat-memory-repository-redis | 100% | | | spring-ai-model-chat-memory-jdbc | — | 0% | | | spring-ai-model-chat-memory-cassandra | — | 0% | | Platform | spring-ai-autoconfigure | @nestjs-ai/platform | 100% | | | spring-ai-mcp | @nestjs-ai/mcp-common | 10% | | | spring-ai-jsdbc | @nestjs-ai/jsdbc | 30% |

Project Structure

nestjs-ai/
├── packages/
│   ├── model/                    # Core chat/embedding abstractions
│   ├── client-chat/              # High-level client API & advisors
│   ├── commons/                  # Shared utilities & tokens
│   ├── platform/                 # NestJS module integration
│   ├── rag/                      # RAG pipeline
│   ├── vector-store/             # Vector store abstractions
│   ├── observation/              # OpenTelemetry integration
│   ├── retry/                    # Retry utilities
│   ├── template-st/             # Prompt templating
│   ├── testing/                  # Test utilities
│   ├── jsdbc/                    # JDBC integration layer
│   ├── models/
│   │   ├── openai/               # OpenAI provider
│   │   ├── google-genai/         # Google GenAI provider
│   │   └── transformers/         # Hugging Face local embeddings
│   ├── mcp/
│   │   └── common/               # Model Context Protocol
│   ├── vector-stores/
│   │   └── redis-store/          # Redis vector store
│   ├── memory/
│   │   └── repository/
│   │       └── model-chat-memory-repository-redis/
│   ├── document-readers/
│   │   ├── pdf-reader/           # PDF.js reader
│   │   ├── markdown-reader/      # Markdown reader
│   │   ├── cheerio-reader/       # HTML/web scraping
│   │   └── tika-reader/          # Apache Tika reader
│   └── advisors/
│       └── advisors-vector-store/
├── docs/                         # Antora documentation site
└── turbo.json                    # Turborepo configuration

Getting Started

Prerequisites

  • Node.js >= 20.0.0
  • pnpm >= 10.0.0

Installation

pnpm install

Build

pnpm build

Test

pnpm test

Lint & Format

pnpm lint
pnpm format