A comprehensive Documentation Intelligence System that transforms scattered documentation into an intelligent, searchable knowledge base. DocFoundry discovers, ingests, normalizes, indexes, and serves documentation from multiple sources including websites, repositories, feeds, and local files.
Key Value Propositions:
- π― Unified Knowledge Access: Centralize documentation from multiple sources into a single searchable interface
- π§ Intelligent Search: Combine full-text search with semantic understanding for precise results
- π Developer-First: Seamless integration with VS Code, Chrome, and development workflows
- π Analytics-Driven: Comprehensive observability and search analytics for continuous improvement
- π Production-Ready: Scalable architecture supporting both SQLite and PostgreSQL backends
- π Intelligent Search: Full-text search with FTS5, semantic search with embeddings, and hybrid search modes
- π Multi-Source Ingestion: HTML crawling, Markdown processing, feed ingestion, and repository scanning
- π― Smart Chunking: Advanced document chunking with context preservation and metadata extraction
- π Analytics & Monitoring: Comprehensive observability with OpenTelemetry, performance metrics, and search analytics
- π Developer Integrations: VS Code extension, Chrome extension, and MCP server support
- π Data Lineage Tracking: Complete audit trail of document processing with version tracking and change detection
- β‘ Incremental Processing: Efficient content updates with hash-based change detection and selective reprocessing
- π Enhanced Security: Rate limiting, input validation, CORS protection, and security headers
- π― Performance Gates: Automated performance monitoring with configurable thresholds and alerts
- π Documentation Site: MkDocs-powered human-readable documentation (
mkdocs.yml,docs/) - βοΈ Source Registry: Configurable crawl rules and source definitions (
sources/*.yaml) - π Processing Pipelines: Modular ingestion pipelines for various content types (
pipelines/) - ποΈ Indexing Engine: Flexible indexing with SQLite FTS5 or PostgreSQL + pgvector (
indexer/) - π RAG API: FastAPI-based REST API with search, document retrieval, and capture endpoints (
server/) - π οΈ Development Tools: VS Code extension for in-editor search and Chrome extension for content capture
- π Automation: Comprehensive Makefile with development and deployment tasks
- π Shared Services: Data models, incremental processing, and lineage tracking (
services/shared/) - π Lineage API: RESTful endpoints for data lineage management and audit trails (
services/api/) - π οΈ Migration Tools: Database migration helpers and data consistency utilities (
scripts/)
- SQLite + FTS5: Lightweight local development with full-text search
- PostgreSQL + pgvector: Production-ready with vector similarity search and advanced analytics
- Seamless Migration: Built-in migration tools and unified adapter interface
Minimum Requirements:
- Python 3.11 or higher
- 4GB RAM (8GB recommended for production)
- 2GB available disk space
- Git for version control
Optional Dependencies:
- Docker and Docker Compose for containerized deployment
- PostgreSQL 14+ with pgvector extension for production deployments
- Redis for caching (future enhancement)
- Node.js 18+ for browser extension development
# Clone the repository
git clone https://github.com/AvaPrime/docfoundry.git
cd docfoundry
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Build the initial index from the docs/ folder
python indexer/build_index.py
# Start the API server
uvicorn server.rag_api:app --reload --port 8001
# Optional: Preview documentation site
mkdocs serve -a 127.0.0.1:8000DocFoundry includes a comprehensive Makefile for common tasks:
# Show all available commands
make help
# Complete setup with development dependencies
make setup
# Run the full workflow: crawl, index, and start API
make all
# Start the API server
make api
# Build documentation
make docs
# Run tests
make testCreate or edit source configuration files in sources/:
# sources/example.yaml
id: example-docs
name: Example Documentation
base_url: https://example.com/docs
start_urls:
- https://example.com/docs/getting-started
allow_patterns:
- "/docs/.*"
deny_patterns:
- "/docs/internal/.*"
max_depth: 3
delay: 1.0# Crawl HTML content to Markdown
python pipelines/html_ingest.py sources/example.yaml
# Process feeds (RSS/Atom)
python pipelines/feed_ingest.py sources/blog.yaml
# Ingest repository content
python pipelines/repo_ingest.py sources/github-repo.yaml# Rebuild the search index
python indexer/build_index.py
# Or use make command
make index# Basic search
curl -X POST http://localhost:8001/search \
-H 'Content-Type: application/json' \
-d '{"q": "authentication setup", "limit": 10}'
# Advanced search with filters
curl -X POST http://localhost:8001/search \
-H 'Content-Type: application/json' \
-d '{
"q": "API configuration",
"limit": 5,
"source_filter": "example-docs",
"search_type": "hybrid"
}'
# Get document content
curl "http://localhost:8001/doc?path=docs/vendors/example/setup.md"
# Capture web page
curl -X POST http://localhost:8001/capture \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com/article", "title": "Important Article"}'
# Data Lineage API
# Get lineage summary
curl "http://localhost:8001/lineage/summary"
# Find documents needing reprocessing
curl "http://localhost:8001/lineage/reprocessing-candidates?chunker_version=2.0"
# Get document lineage history
curl "http://localhost:8001/lineage/document/123"
# Trigger reprocessing
curl -X POST "http://localhost:8001/lineage/reprocess/123" \
-H 'Content-Type: application/json' \
-d '{"force": false}'
# Performance monitoring
curl "http://localhost:8001/performance/health"- VS Code Extension: Use
Ctrl+Shift+Pβ "DocFoundry: Search Docs" for in-editor search - Chrome Extension: Click the toolbar icon to save pages to
docs/research/ - MCP Server: Connect compatible MCP clients for agent-based document access
# Database Configuration
DATABASE_URL=sqlite:///./docfoundry.db # or postgresql://...
DATABASE_TYPE=sqlite # or postgres
# API Configuration
API_HOST=0.0.0.0
API_PORT=8001
API_LOG_LEVEL=info
# Search Configuration
SEARCH_LIMIT_DEFAULT=10
SEARCH_LIMIT_MAX=100
# Crawling Configuration
CRAWL_DELAY_DEFAULT=1.0
CRAWL_MAX_DEPTH=5
CRAWL_RESPECT_ROBOTS=true
# Observability
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=docfoundry
ENABLE_METRICS=true
# Security Configuration
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60
CORS_ORIGINS=http://localhost:3000,http://localhost:8000
SECURE_HEADERS=true
# Performance Gates
PERFORMANCE_THRESHOLD_RESPONSE_TIME=2000
PERFORMANCE_THRESHOLD_ERROR_RATE=0.05
PERFORMANCE_MONITORING_ENABLED=true
# Lineage Tracking
LINEAGE_RETENTION_DAYS=90
INCREMENTAL_PROCESSING=true
CONTENT_HASH_ALGORITHM=sha256# No additional setup required
# Database file created automatically# Install PostgreSQL and pgvector extension
# Create database
createdb docfoundry
# Set environment variable
export DATABASE_URL="postgresql://user:password@localhost/docfoundry"
export DATABASE_TYPE="postgres"
# Run migrations
python -c "from server.postgres_adapter import PostgresAdapter; PostgresAdapter().create_tables()"# Build the image
docker build -t docfoundry .
# Run with SQLite
docker run -p 8001:8001 -v $(pwd)/data:/app/data docfoundry
# Run with PostgreSQL
docker run -p 8001:8001 \
-e DATABASE_URL="postgresql://user:pass@host/db" \
-e DATABASE_TYPE="postgres" \
docfoundry- Reverse Proxy: Use nginx or similar for SSL termination and load balancing
- Process Management: Use systemd, supervisor, or container orchestration
- Monitoring: Enable OpenTelemetry for observability
- Backup: Regular database backups, especially for PostgreSQL
- Security: Configure proper authentication and rate limiting
- Multi-source content ingestion (HTML, feeds, repositories)
- Hybrid search with semantic and keyword matching
- RESTful API with comprehensive endpoints
- VS Code and Chrome browser extensions
- SQLite and PostgreSQL support with pgvector
- OpenTelemetry observability integration
- MCP server protocol support
- Data lineage tracking with complete audit trails
- Incremental processing with hash-based change detection
- Enhanced security with rate limiting and input validation
- Performance monitoring with automated gates and alerts
- Production-ready deployment with Docker Compose
- Database migrations with Alembic integration
- Advanced Workflow Orchestration: Temporal integration for complex pipelines
- Enhanced AI Integration: LLM-powered content summarization and tagging
- Enterprise Features: RBAC, advanced audit logging, and compliance tools
- Performance Optimizations: Distributed indexing and Redis caching layers
- Content Intelligence: Automatic content categorization and relationship mapping
- API Enhancements: GraphQL support and webhook integrations
- Advanced Analytics: Search behavior analysis and content recommendation engine
- Multi-tenant Support: Organization-based data isolation and access control
We welcome contributions from the community! DocFoundry is built with collaboration in mind, and we appreciate all forms of contribution including code, documentation, bug reports, and feature suggestions.
Before Contributing:
- Read our Code of Conduct
- Check existing issues and discussions
- Review our project roadmap to understand current priorities
# 1. Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/docfoundry.git
cd docfoundry
# 2. Set up development environment
make setup # Installs dev dependencies and pre-commit hooks
# 3. Verify installation
make test # Run test suite
make lint # Check code quality
# 4. Start development server
make dev # Starts API with auto-reloadCode Quality Standards:
- Python Style: Follow PEP 8, enforced by
blackandflake8 - Type Safety: Add type hints for all new functions and classes
- Documentation: Include comprehensive docstrings following Google style
- Testing: Maintain >90% test coverage for new code
- Security: Follow OWASP guidelines, no hardcoded secrets
Commit Guidelines:
- Use conventional commits:
feat:,fix:,docs:,test:,refactor: - Keep commits atomic and well-described
- Reference issues in commit messages:
fixes #123
π Bug Reports
- Use the bug report template
- Include reproduction steps, expected vs actual behavior
- Provide system information and logs when relevant
β¨ Feature Requests
- Use the feature request template
- Explain the use case and expected benefits
- Consider implementation complexity and maintenance burden
π Documentation
- Improve existing documentation clarity and accuracy
- Add examples and tutorials for common use cases
- Translate documentation to other languages
π§ Code Contributions
- Start with "good first issue" labeled items
- Discuss major changes in issues before implementation
- Follow the pull request template requirements
-
Create Feature Branch
git checkout -b feature/descriptive-name
-
Implement Changes
- Write code following our standards
- Add comprehensive tests
- Update documentation as needed
-
Quality Checks
make test # Run full test suite make lint # Check code quality make docs # Verify documentation builds
-
Submit Pull Request
- Use the provided PR template
- Link related issues
- Request review from maintainers
-
Review Process
- Address reviewer feedback promptly
- Keep PR scope focused and manageable
- Ensure CI/CD checks pass
Contributors are recognized in:
- CHANGELOG.md for each release
- GitHub contributors page
- Special mentions for significant contributions
For questions about contributing, join our GitHub Discussions or reach out to the maintainers.
This project is licensed under the MIT License - see the LICENSE file for details.
Installation Problems
# Python version issues
python --version # Should be 3.11+
# Virtual environment activation
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
# Dependency conflicts
pip install --upgrade pip
pip install -r requirements.txt --force-reinstallDatabase Issues
# SQLite permissions
chmod 664 docfoundry.db
chmod 775 $(dirname docfoundry.db)
# PostgreSQL connection
psql $DATABASE_URL -c "SELECT version();"
# Reset database
rm docfoundry.db # SQLite only
python indexer/build_index.pyAPI Server Problems
# Port already in use
lsof -i :8001 # Find process using port
kill -9 <PID> # Kill process
# Check server logs
uvicorn server.rag_api:app --log-level debug
# Test API health
curl http://localhost:8001/healthSearch Issues
# Rebuild search index
python indexer/build_index.py --force
# Check index statistics
curl http://localhost:8001/stats
# Verify source configuration
python -c "from sources.loader import load_sources; print(load_sources())"For Large Datasets:
- Use PostgreSQL with pgvector for production
- Enable database connection pooling
- Configure appropriate chunk sizes in source configs
- Monitor memory usage during indexing
Search Performance:
- Use specific source filters when possible
- Limit result counts for broad queries
- Consider semantic search for conceptual queries
- Use full-text search for exact term matching
If you encounter issues not covered here:
- Check the FAQ section
- Search existing issues
- Create a new issue with detailed information
- Join our community discussions for real-time help
- π Full Documentation: DocFoundry Docs (coming soon)
- π― Quick Start Guide: See Quick Start section above
- π§ API Reference: Available at
/docsendpoint when server is running - π Examples: Check the
examples/directory for usage patterns
- π¬ GitHub Discussions: Join conversations
- Q&A for usage questions
- Feature discussions and feedback
- Show and tell your implementations
- π Issue Tracker: Report bugs
- π§ Email Support: support@docfoundry.dev (for security issues)
- Community Support: Best effort, typically within 24-48 hours
- Bug Reports: Acknowledged within 48 hours, fix timeline depends on severity
- Security Issues: Acknowledged within 24 hours, patches prioritized
Help others by:
- Answering questions in discussions
- Improving documentation
- Sharing usage examples and tutorials
- Reporting and helping fix bugs
- Built with FastAPI for the REST API
- Powered by pgvector for vector similarity search
- Uses OpenTelemetry for observability
- Inspired by the need for intelligent documentation management
DocFoundry - Transform your documentation into an intelligent, searchable knowledge base. π