Loading repository data…
Loading repository data…
Edge-Explorer / repository
Documind is an intelligent desktop assistant that allows users to upload documents (PDF, DOCX, TXT) and ask natural language questions about their contents. It leverages local LLMs via Ollama, integrates advanced OCR for scanned files, and uses semantic indexing with LangChain + FAISS to deliver fast, context-aware answers.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Documind-AI is an enterprise-grade, privacy-first document intelligence platform that enables users to upload documents (PDF, DOCX, TXT), process them with advanced OCR, and query their contents using natural language. Built with production-ready architecture featuring LangChain, FAISS vector stores, and Ollama LLMs, wrapped in a premium mobile-first interface.
GitHub Repository 👈 Explore the complete source code.
Documind-AI redefines document interaction by transforming static files into conversational knowledge bases. Designed for professionals, researchers, and knowledge workers who need instant, contextual access to information buried within their document collections—all while maintaining complete privacy through local processing.
Seamlessly switch between local language models (Llama3, Mistral, Gemma) directly from the mobile interface. No cloud dependencies—all inference happens on your machine.
Production-grade OCR pipeline using Tesseract for scanned PDFs and complex document layouts. Supports:
FAISS-powered vector similarity search retrieves the most relevant document sections for each query, ensuring precise, context-aware answers with source attribution.
Zero cloud dependencies for document processing and AI inference. Your documents never leave your local environment:
Modern React Native UI featuring:
Complete transparency with document-level source tracking. Every AI response includes references to the specific documents used, maintaining academic rigor and trustworthiness.
Critical: Configure Ollama for network access to enable Docker communication.
# Pull your preferred language model
ollama pull llama3
# Enable network access (choose one method):
# Method 1: Via Ollama Settings UI
# Navigate to Settings → Enable "Expose Ollama to network"
# Method 2: Via environment variable
export OLLAMA_HOST=0.0.0.0
# Then restart the Ollama service
Available Models:
llama3 - Meta's Llama 3 (Recommended)mistral - Mistral 7Bgemma - Google's Gemma 2B/7B# Clone the repository
git clone https://github.com/Edge-Explorer/DOCUMIND-AI.git
cd DOCUMIND-AI
# Launch all services (backend + PostgreSQL)
docker-compose up --build
# Backend accessible at http://localhost:5000
# Database schema automatically initialized
The Docker setup includes:
# Install Python dependencies
pip install -r requirements.txt
# Configure environment variables
cp .env.example .env
# Edit .env with your configuration:
# - DATABASE_URL=postgresql://user:password@localhost:5432/documind
# - SECRET_KEY=your-secret-key-here
# - OLLAMA_BASE_URL=http://localhost:11434
# Initialize database schema
python setup_db.py
# Start Flask development server
python app.py
# Navigate to frontend directory
cd documind-frontend
# Install dependencies
npm install
# Configure API endpoint
# Edit src/api/config.ts and set:
# - API_BASE_URL to your local IP (e.g., http://192.168.1.100:5000)
# - For Docker setup, use your computer's local network IP
# Start Expo development server
npx expo start
# Scan QR code with Expo Go app on your mobile device
Finding Your Local IP:
ipconfig (look for IPv4 Address)ifconfig or ip addr showDOCUMIND-AI/
├── app.py # Flask application entry point
├── models.py # SQLAlchemy database models
├── database.py # Database connection and session management
├── ollama_llm.py # Ollama API integration and LLM wrapper
├── setup_db.py # Database initialization script
├── docker-compose.yml # Docker orchestration configuration
├── Dockerfile # Backend container definition
├── requirements.txt # Python dependencies
│
├── routes/ # API endpoint blueprints
│ ├── auth.py # Authentication endpoints (register, login)
│ ├── documents.py # Document upload and management
│ ├── chat.py # Q&A conversation endpoints
│ └── models.py # Model selection and management
│
├── ingest/ # Document processing pipeline
│ ├── processor.py # Multi-format document parser
│ └── indexer.py # FAISS vector store management
│
├── qa/ # Question-answering logic
│ ├── retriever.py # Semantic search and context retrieval
│ └── chain.py # LangChain orchestration
│
├── migrations/ # Database migration scripts
│ └── alembic/ # Alembic migration versions
│
└── documind-frontend/ # React Native mobile application
├── src/
│ ├── components/ # Reusable UI components
│ ├── screens/ # Main app screens
│ ├── api/ # API client configuration
│ └── services/ # Business logic and state management
├── assets/ # Images, fonts, and icons
└── app.json # Expo configuration
Create a .env file in the root directory:
# Database Configuration
DATABASE_URL=postgresql://user:password@localhost:5432/documind
# Security
SECRET_KEY=your-secret-key-here
JWT_SECRET_KEY=your-jwt-secret-here
# Ollama Configuration
OLLAMA_BASE_URL=http://localhost:11434
DEFAULT_MODEL=llama3
# Application Settings
UPLOAD_FOLDER=./documents
VECTOR_STORE_PATH=./vector_stores
The docker-compose.yml file orchestrates two services:
services:
db:
image: postgres:15
environment:
POSTGRES_DB: documind
POSTGRES_USER: documind
POSTGRES_PASSWORD: documind123
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
backend:
build: .
ports:
- "5000:5000"
environment:
DATABASE_URL: postgresql://documind:documind123@db:5432/documind
OLLAMA_BASE_URL: http://host.docker.internal:11434
depends_on:
- db
Register User
POST /api/auth/register
Content-Type: application/json
{
"username": "john_doe",
"email": "john@example.com",
"password": "secure_password"
}
Login
POST /api/auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "secure_password"
}
Response:
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"user": {
"id": 1,
"username": "john_doe",
"email": "john@example.com"
}
}
Upload Document
POST /api/documents/upload
Authorization: Bearer <token>
Content-Type: multipart/form-data
file: <document.pdf>
List Documents
GET /api/documents
Authorization: Bearer <token>
Response:
{
"documents": [
{
"id": 1,
"filename": "research_paper.pdf",
"upload_date": "2024-01-20T10:30:00Z",
"file_type": "pdf",
"page_count": 25
}
]
}
Ask Question
POST /api/chat/ask
Authorization: Bearer <token>
Content-Type: application/json
{
"question": "What are the main findings of the research?",
"model": "llama3"
}
Response:
{
"answer": "The research findings indicate...",
"sources": [
{
"document": "research_paper.pdf",
"page": 5,
"relevance_score": 0.89
}
]
}
# Backend tests
pytest tests/ -v
# Frontend tests
cd documind-frontend
npm test
# Create new migration
alembic revision --autogenerate -m "Add new table"
# Apply migrations
alembic upgrade head
# Rollback migration
alembic downgrade -1
cd documind-frontend
# Configure EAS Build
eas build:configure
# Build Android APK
eas build --platform android --profile production
# Build will be available in Expo dashboard
The FAISS index uses HNSW (Hierarchical Navigable Small World) graphs for efficient similarity search: