Skip to content

Refactor DocumentManager with Orama integration and new web server - #17

Merged
andrea9293 merged 7 commits into
mainfrom
dev/handle-database
Mar 1, 2026
Merged

Refactor DocumentManager with Orama integration and new web server#17
andrea9293 merged 7 commits into
mainfrom
dev/handle-database

Conversation

@andrea9293

Copy link
Copy Markdown
Owner

This pull request makes substantial improvements to the MCP Documentation Server, focusing on modernizing the architecture, improving documentation, and adding a built-in web interface. The changes replace the legacy JSON and manual indexing system with an embedded Orama vector database, introduce parent-child chunking for better search results, and streamline the environment variable configuration. The documentation (README.md) is overhauled to reflect these updates, and new scripts and dependencies are added to support the web UI and Orama integration.

Major architecture and feature upgrades:

  • Embedded Orama Vector Database: Replaces manual JSON storage and indexing with Orama for both document and chunk storage, enabling hybrid full-text and vector search, automatic migration from legacy formats, and improved performance and scalability. (README.md, src/document-manager.ts, [1] [2] [3]
  • Parent-Child Chunking: Documents are split into large parent chunks for context and small child chunks for precise vector search, allowing search results to include both matched fragments and their broader context. (README.md, README.mdL10-R43)
  • Built-in Web UI: Adds a full-featured web dashboard for document management, semantic and AI-powered search, file uploads, and context exploration, accessible at http://localhost:3080 by default. New scripts are provided to run the UI in development or production. (README.md, package.json, [1] [2] [3]

Documentation and configuration improvements:

  • Comprehensive README Overhaul: Updates the documentation to describe the new architecture, features, workflow, environment variables, and toolset. Includes tables for tools and configuration, usage examples, and details about embedding models and migration. (README.md, [1] [2] [3]
  • Simplified Environment Variables: Refactors configuration to use more intuitive variables, documents all options in tables, and clarifies the workflow for enabling/disabling features such as the web UI and AI-powered search. (README.md, README.mdL56-R219)

Dependency and script updates:

  • Adds Orama and Web UI Dependencies: Introduces @orama/orama, @orama/plugin-data-persistence, express, multer, and related type packages. Removes unused dependencies (glob). (package.json, [1] [2]
  • New Build and Web Scripts: Adds scripts for building and running the web UI and ensures static assets are copied during build. (package.json, package.jsonL19-R22)

These changes collectively modernize the server, enhance usability, and prepare the project for scalable document intelligence and search.

…search

- Removed DocumentIndex and related indexing logic.
- Introduced OramaStore for managing document and chunk databases with persistence.
- Updated DocumentManager methods to utilize OramaStore for adding, retrieving, and deleting documents.
- Implemented migration from legacy JSON files to Orama.
- Added new search capabilities across all documents using hybrid search (full-text + vector).
- Updated server to include a new tool for cross-document search.
- Adjusted types to accommodate Orama DB schema.
- Introduced a new web server module (`web-server.ts`) to handle REST API routes for document management, including CRUD operations and search functionalities.
- Integrated the web server startup in the main server file (`server.ts`), allowing it to run alongside the main application.
- Implemented file upload handling and processing capabilities.
- Added endpoints for listing documents, searching within documents, and managing uploads.
- Added OramaParentDocument and ParentChunkData interfaces to define parent chunk structure.
- Introduced parentsDb in OramaStore to manage parent chunks separately.
- Implemented methods to add and retrieve parent chunks in OramaStore.
- Updated deleteDocument to remove associated parent chunks.
- Modified search results handling in server to support parent-child deduplication and provide full context.
…ts, retrieving web UI URL, and processing uploads
@andrea9293
andrea9293 merged commit c1c3bc2 into main Mar 1, 2026
3 checks passed
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant