Documentation
SmartKMS
An AI-powered knowledge management platform for universities — upload institutional documents and make them instantly searchable and queryable through natural language, entirely on-premise.
What SmartKMS Does
Staff, faculty, and administrators upload institutional documents — policies, guides, research papers, manuals — and the system makes them instantly searchable and queryable in plain language. Instead of digging through shared drives or email threads, a user types a question and gets a direct answer, cited from real documents.
Document Upload & Management
Drag-and-drop upload for PDF, Word, Excel, CSV and images. Every file is auto-tagged by the AI, and the viewer suggests which folder it belongs in based on what's already there. Uploads can be cancelled mid-processing at any time.
In-Browser Document Editing
Word, Excel, PowerPoint, and PDF files open and edit directly in the browser via ONLYOFFICE — no download/re-upload round trip.
AI-Powered Semantic Search
Queries are converted to vectors and matched by meaning, not just keywords — "how do students appeal a grade" finds the right document even without matching words.
Q&A Chat Assistant
Ask questions in plain language and get a direct answer with citations back to the source documents (Retrieval-Augmented Generation).
Multi-College Architecture
Each college's documents are isolated by default; admins can make documents public within a college, global, or shared with specific people.
Sensitive-Content Screening
Every upload is screened for leaked personal information and explicit imagery before approval, without flagging legitimate educational or historical content.
Reapproval Workflow
Uploaders of a rejected document can request reconsideration; admins and staff review requests from a dedicated queue.
Analytics Dashboard
See what topics are searched most, which queries return no good results, and who contributes the most knowledge.
Where to Start
- Setting SmartKMS up for the first time → Installation
- Learning how to use the app day-to-day → User Manual
- Editing Word/Excel/PowerPoint/PDF files in the browser → Document Editing (ONLYOFFICE)
- Environment variables, ports, and login credentials → Configuration
- How the system is built, page by page → Architecture
- Something isn't working → Troubleshooting
- What changed and when → Changelog
Technology Stack
| Layer | Technology | Purpose |
|---|---|---|
| Backend API | FastAPI (Python 3.11+) | REST API, async request handling |
| Package Management | uv | Environment + dependency management; uv.lock pins identical versions locally and in Docker |
| Database | PostgreSQL 16 + pgvector | Stores all data + AI vector embeddings |
| Database Migrations | Alembic | Async schema migrations |
| File Storage | MinIO (Docker) | Stores uploaded files |
| Document Editing | ONLYOFFICE Document Server (Docker) | In-browser editing for Word/Excel/PowerPoint/PDF |
| AI — Chat & Summaries | Ollama · qwen2.5:3b | Generates answers and document summaries |
| AI — Search Embeddings | Ollama · nomic-embed-text | Converts text to vectors for semantic search |
| AI — Vision | Ollama · llava | OCR and image-based content screening (nudity/gore) |
| AI — Nudity Pre-Check | NudeNet (separate Docker microservice) | Deterministic bounding-box nudity classifier, runs alongside the vision-model screen; isolated in its own container (nudenet_service/) for AGPL licensing and called over HTTP |
| Frontend | Vanilla JS + HTML + CSS | Web UI served directly by FastAPI |
| Authentication | JWT + httpOnly refresh cookie | Secure stateless sessions |