Ana Sayfa / Kod ve Scriptler / Knowly - Knowledge Base with Cited Answers PHP

Knowly - Knowledge Base with Cited Answers PHP

PHP ve MySQL ile bir ekip bilgi tabanı oluşturun; kısıtlı koleksiyonlar ve belgelerinize atıf yapan yanıtlar.

  • Yayın tarihi13 Kasım 2026
  • Nerede çalışırNode.js 22
  • VeritabanıMySQL 5.7, MariaDB 10.x
  • Paket içeriği.php, .css, .html, .json, .svg, .sql, JavaScript .js
  • Son güncelleme13 Kasım 2026
  • Canlı demoVar
Knowly - Knowledge Base with Cited Answers PHP

Overview

Knowly is a knowledge base for company handbooks, policies and how-tos. Your team signs in from any device and works on one shared library stored in your MySQL or MariaDB database through the included PHP API. Documents are written in Markdown and grouped into collections; readers search, open a document, move through its table of contents and follow related documents.

When they would rather ask, the assistant answers with numbered citations that open the exact section. In the built-in mode it ranks sections with BM25 keyword scoring and quotes the best sentences word for word, so it cannot invent text, and it says "No supported answer" when nothing covers the question. For written answers, the PHP server calls Claude with citations turned on and tells it to answer only from the sections it is given. The API key stays in api/config.php: the app has no key field, the endpoint needs a signed-in account, and each account has an hourly limit.

Access is enforced on the server. Collections marked Restricted are sent to administrators only: members never receive those documents or answers that cite them, and their saves cannot remove them. Only an administrator can mark a collection Restricted.

Accounts use secure sessions with CSRF protection and rate-limited sign-in. Saves carry a version number, so two people editing at once never overwrite each other: the app re-applies its change on the newer data. A web installer creates the tables and the first administrator.

The frontend is React 19 + TypeScript + Vite; the backend is plain PHP 8 with PDO and curl (no framework, no Composer), so it runs on ordinary shared hosting with cPanel. A Node answer server example is also included.

About the live demo: the demo is a static build of the same app hosted without PHP, so it runs in browser-only mode with a fictional company handbook and local retrieval. Sign-in, accounts, restricted collections and answers from Claude are server features, included in the download and documented step by step.

Limitations: "Team only" is a label every account can read; per-group access needs the data split into tables (guide included). Local retrieval matches words, not meaning. Model usage is billed by your Anthropic account.

Features

Server (PHP + MySQL) - Sign-in with administrator and member roles, password change, accounts - Knowledge base stored in MySQL/MariaDB with versioned saves and automatic merging of concurrent edits - Restricted collections filtered on the server for members, protected from member saves - Answer endpoint for Claude in PHP: citations, refusal handling, timeouts, key in config.php, per-account limit - Rate limits for sign-in; CSRF tokens; HttpOnly session cookie - Web installer and command-line installer; works on shared hosting

Library and documents - Collections with description, owner, visibility and document count - Markdown editor with preview and live outline; tags, category, status - Version history with a change note per edit; view and restore any version - Reader with table of contents, section links, copy link, print layout, Markdown export, related documents

Search - Titles, text and tags with highlighted matches and synonyms - Filters for collection, status and tag - No-results help: fewer words, clear filters, ask the assistant or start a draft

Assistant - Suggested questions, history, clear history - Numbered citations that open the exact section, with source excerpts - Separate states for searching, answered, no supported answer, service unavailable and error - "How this answer was found": key words, synonyms, coverage and threshold - Helpful or not helpful, copy with sources, report a missing source - Include or exclude collections and single documents; drafts and archived documents are never used

Insights - Popular searches and searches with no results - Unanswered questions with the reason - Document views, citations and feedback, CSV export

Data and server - Markdown import with optional front matter; JSON backup with validation - Optional Node answer server example as well, with citations, timeout handling and CORS allow-list - Documented JSON contract, so any language or model provider can be used - Falls back to local retrieval when the server is down

Quality - Light and dark themes, keyboard support, responsive down to 375 px - 14 unit tests and 16 automated API tests against a real MariaDB database - Strict TypeScript, ESLint

Requirements

- PHP 8.1 or newer with pdo_mysql and mbstring (curl for answers from Claude) - MySQL 5.7+ or MariaDB 10.3+ - Any host that runs PHP (shared hosting with cPanel works); HTTPS recommended - Optional: an Anthropic API key for written answers; local retrieval needs nothing - Node.js 22.12+ and npm 10+ only to build the frontend (npm run build:server)

Browser compatibility: Latest Chrome, Edge, Firefox and Safari.