Skip to content
adembilgePublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Cognify PKM

The Intelligent Knowledge Vault β€” AI-powered document management that understands your content.

Python Django Next.js HuggingFace License: MIT


What is Cognify?

Cognify is a full-stack AI-powered Personal Knowledge Management system. Drop in scanned PDFs, images, or plain-text notes and Cognify immediately OCRs the content, summarizes it with a language model, classifies it by topic, and stores a semantic embedding β€” making every document instantly searchable, queryable, and analyzable.

Think of it as a second brain that actually reads your documents.


πŸ“Έ Application

πŸ—‚οΈ Knowledge Vault Dashboard

Track all your documents at a glance. Live status indicators, AI summary counts, system health, and quick-search.

Dashboard


πŸ“Š Knowledge Analytics

Visualize topic evolution, upload trends, and storage growth with interactive Recharts dashboards. Sensitive documents are automatically excluded from all analytics.

Analytics


πŸ’¬ Neural Chat (Global RAG)

Ask questions across your entire vault in natural language. The RAG engine retrieves the most semantically relevant document chunks and generates cited answers using RoBERTa.

AI Chat


βœ‚οΈ PDF Tools

Split, merge, reorder, or remove pages from any PDF β€” completely browser-native, no third-party service.

PDF Tools


πŸ“₯ Document Upload & Processing

Upload files and watch the real-time processing pipeline: OCR β†’ Summarization β†’ Classification β†’ Embedding β†’ COMPLETED.

Uploading


πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Next.js 16 (Frontend)                    β”‚
β”‚  Dashboard Β· Analytics Β· Neural Chat Β· PDF Tools Β· Auth     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚ REST API (JWT)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Django REST Framework (Backend)                 β”‚
β”‚  Documents Β· Collections Β· Notes Β· Users Β· Analytics        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ Task Queue                   β”‚ Query
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Redis + Celery    β”‚      β”‚        SQLite Database         β”‚
β”‚   (Async Workers)   β”‚      β”‚  Metadata Β· Vectors Β· Logs    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ Executes
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    AI Pipeline Engine                       β”‚
β”‚                                                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ OCR Module  β”‚  β”‚  LLM Module  β”‚  β”‚  Embedding Module β”‚ β”‚
β”‚  β”‚  OpenCV +   β”‚  β”‚  DistilBART  β”‚  β”‚  SentenceTransf.  β”‚ β”‚
β”‚  β”‚  Tesseract  β”‚  β”‚  + RoBERTa   β”‚  β”‚  all-MiniLM-L6-v2 β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

✨ Core Feature Set

Feature Description
πŸ” Semantic Search Cosine similarity search using Sentence-BERT embeddings β€” finds meaning, not just keywords
πŸ€– Auto-Summarization DistilBART condenses every document into a clear, concise summary on upload
🏷️ Topic Classification Zero-shot MNLI classifier auto-tags documents across predefined knowledge categories
πŸ’¬ Global RAG Chat Ask questions across your entire vault; RoBERTa generates cited answers from top semantic matches
πŸ“Š Knowledge Analytics Pandas-powered aggregation + Recharts visualizations: topic trends, storage curves, format distributions
βœ‚οΈ PDF Manipulation Native split, merge, reorder, and page deletion with PyPDF
πŸ“ Annotations & Notes Attach personal notes, highlights, and bookmarks to any document or extracted quote
πŸ”’ Sensitive Mode Per-document privacy flag β€” excludes files from analytics, RAG, and discovery
πŸ“¦ Version Control Full document versioning with parent-child lineage tracking
πŸ—‘οΈ Soft Delete & Recovery Trash system with configurable recovery window before permanent deletion
πŸ“ˆ Observability Prometheus metrics integration for task queue latency and worker resource usage

πŸš€ Quick Start

With Docker (Recommended)

# Clone the repository
git clone https://github.com/yourusername/cognify.git
cd cognify

# Build and launch the full stack
docker-compose up --build
Service URL
Web Dashboard http://localhost:3000
REST API http://localhost:8000
API Explorer http://localhost:8000/api/schema/
Prometheus http://localhost:9090

Manual Setup

Backend (Django + Celery)

# 1. Create and activate virtual environment
python -m venv venv
# Windows:
.\venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

# 2. Install dependencies
pip install -r backend/requirements.txt

# 3. Apply database migrations
cd backend
python manage.py migrate

# 4. Create a superuser account (optional)
python manage.py createsuperuser

# 5. Start the Celery background worker (in a separate terminal)
celery -A config worker -l info

# 6. Start the API server
python manage.py runserver

Frontend (Next.js)

cd frontend
npm install
npm run dev

The frontend will be available at http://localhost:3000


πŸ€– AI Models Used

Task Model Library
Text Extraction Tesseract 5.0 + OpenCV pytesseract, cv2
Summarization sshleifer/distilbart-cnn-12-6 transformers
Classification valhalla/distilbart-mnli-12-1 transformers
Semantic Embeddings all-MiniLM-L6-v2 sentence-transformers
Extractive Q&A deepset/roberta-base-squad2 transformers

πŸ“ Project Structure

cognify/
β”œβ”€β”€ ai_pipeline/                  # Stateless AI modules (OCR Β· LLM Β· Embeddings)
β”‚   β”œβ”€β”€ ocr/processor.py          # OpenCV preprocessing + Tesseract extraction
β”‚   └── llm/
β”‚       β”œβ”€β”€ summarizer.py         # DistilBART summarization
β”‚       β”œβ”€β”€ classifier.py         # Zero-shot MNLI classification
β”‚       β”œβ”€β”€ qa.py                 # RoBERTa extractive Q&A
β”‚       └── embedder.py           # SentenceTransformers embeddings
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/                   # Django settings, URL routing, Celery config
β”‚   └── apps/
β”‚       β”œβ”€β”€ documents/            # Core models, views, serializers, tasks, tests
β”‚       └── users/                # JWT authentication endpoints
β”œβ”€β”€ frontend/
β”‚   └── src/app/
β”‚       β”œβ”€β”€ page.tsx              # Landing page
β”‚       β”œβ”€β”€ auth/                 # Login + Signup
β”‚       └── dashboard/            # Main app (docs, analytics, chat, pdf-tools)
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ Images/                   # Application screenshots
β”‚   └── user_capabilities.md      # 100 documented user capabilities
β”œβ”€β”€ docker-compose.yml            # Full-stack orchestration
└── README.md

πŸ§ͺ Running Tests

# Run the full test suite (35 tests)
cd cognify
.\venv\Scripts\python.exe backend\manage.py test \
  apps.documents.tests.test_scenarios \
  apps.documents.tests.test_requirements \
  apps.documents.tests.test_use_cases_fulfillment \
  --noinput

Expected output: Ran 35 tests β€” OK (0 failures)


πŸ”’ Security & Privacy

  • JWT Authentication β€” All API routes require a valid JWT bearer token
  • User Data Isolation β€” Every database query is scoped to the authenticated user; cross-user access returns 404
  • Sensitive Mode β€” Per-document flag that excludes files from global analytics, RAG, and search
  • Soft Delete β€” Trashed documents have a recovery window before permanent deletion
  • Audit Logs β€” Every meaningful action (UPLOAD, QUERY, TRASH, RESTORE, VERSION_NEW) is logged with user and timestamp

πŸ“„ License

This project is licensed under the MIT License β€” see LICENSE for details.


Built with ❀️ by Adem Bilge β€” turning documents into intelligence.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages