# Quaeriva Documentation

Quaeriva is a lightweight PHP 8 / MySQL question-and-answer and discussion engine built for shared hosting. No Composer, no npm, no build step, no queue, no cron. You upload files and complete a form.

This documentation describes **behaviour that is implemented today**. Anything not described here is not a feature yet.

## Where to start

| I want to… | Read |
|---|---|
| Put Quaeriva on a server | [Installation](01-getting-started/INSTALLATION.md) |
| Know what to configure first | [First run](01-getting-started/FIRST-RUN.md) |
| Move to a newer release | [Upgrade](01-getting-started/UPGRADE.md) |
| Protect my data | [Backup and restore](01-getting-started/BACKUP-RESTORE.md) |
| Run the site day to day | [Admin overview](02-administration/ADMIN-OVERVIEW.md) |
| Change how it looks | [Themes overview](04-themes/THEMES-OVERVIEW.md) |
| Write a plugin | [Plugins](05-extensions/PLUGINS.md) · [Hooks reference](05-extensions/HOOKS-REFERENCE.md) |
| Call it from another program | [API v1](06-api/API-V1.md) |
| Understand how it works inside | [Architecture](07-internals/ARCHITECTURE.md) |
| Fix something that broke | [Troubleshooting](08-operations/TROUBLESHOOTING.md) |

## Contents

**01 — Getting started**
[Installation](01-getting-started/INSTALLATION.md) ·
[First run](01-getting-started/FIRST-RUN.md) ·
[Upgrade](01-getting-started/UPGRADE.md) ·
[Backup and restore](01-getting-started/BACKUP-RESTORE.md)

**02 — Administration**
[Admin overview](02-administration/ADMIN-OVERVIEW.md) ·
[Questions and answers](02-administration/QUESTIONS-ANSWERS.md) ·
[Topics and discussions](02-administration/TOPICS-DISCUSSIONS.md) ·
[Users and roles](02-administration/USERS-ROLES.md) ·
[Moderation](02-administration/MODERATION.md) ·
[Categories and tags](02-administration/CATEGORIES-TAGS.md) ·
[Menus and widgets](02-administration/MENUS-WIDGETS.md) ·
[Ads and custom code](02-administration/ADS-CUSTOM-CODE.md) ·
[Editorial seed content](02-administration/EDITORIAL-SEED.md)

**03 — Configuration**
[Site settings](03-configuration/SITE-SETTINGS.md) ·
[SMTP and email](03-configuration/SMTP-EMAIL.md) ·
[Telegram](03-configuration/TELEGRAM.md) ·
[Languages and RTL](03-configuration/LANGUAGES-RTL.md) ·
[SEO](03-configuration/SEO.md) ·
[Security](03-configuration/SECURITY.md) ·
[Anti-spam](03-configuration/ANTI-SPAM.md)

**04 — Themes**
[Overview](04-themes/THEMES-OVERVIEW.md) ·
[Appearance tokens](04-themes/APPEARANCE-TOKENS.md) ·
[Template overrides](04-themes/TEMPLATE-OVERRIDES.md) ·
[Building a theme](04-themes/BUILDING-A-THEME.md) ·
[Theme packages](04-themes/THEME-PACKAGES.md) ·
[Theme design brief](04-themes/THEME-DESIGN-BRIEF.md)

**05 — Extensions**
[Plugins](05-extensions/PLUGINS.md) ·
[Hooks reference](05-extensions/HOOKS-REFERENCE.md) ·
[Plugin settings](05-extensions/PLUGIN-SETTINGS.md) ·
[Plugin migrations](05-extensions/PLUGIN-MIGRATIONS.md)

**06 — API**
[API v1](06-api/API-V1.md) ·
[Auth tokens](06-api/AUTH-TOKENS.md) ·
[Error codes](06-api/ERROR-CODES.md)

**07 — Internals**
[Architecture](07-internals/ARCHITECTURE.md) ·
[Request lifecycle](07-internals/REQUEST-LIFECYCLE.md) ·
[Routing](07-internals/ROUTING.md) ·
[Database schema](07-internals/DATABASE-SCHEMA.md) ·
[SEO pipeline](07-internals/SEO-PIPELINE.md) ·
[Sitemap pipeline](07-internals/SITEMAP-PIPELINE.md) ·
[Theme resolution](07-internals/THEME-RESOLUTION.md) ·
[Editor and Markdown](07-internals/EDITOR-MARKDOWN.md) ·
[Hooks and events](07-internals/HOOKS-EVENTS.md) ·
[Notifications flow](07-internals/NOTIFICATIONS-FLOW.md)

**08 — Operations**
[Shared hosting](08-operations/SHARED-HOSTING.md) ·
[cPanel deployment](08-operations/CPANEL-DEPLOYMENT.md) ·
[Subdirectory install](08-operations/SUBDIRECTORY-INSTALL.md) ·
[Diagnostics](08-operations/DIAGNOSTICS.md) ·
[Code inspection](08-operations/CODE-INSPECTION.md) ·
[Logging](08-operations/LOGGING.md) ·
[Troubleshooting](08-operations/TROUBLESHOOTING.md) ·
[Release checklist](08-operations/RELEASE-CHECKLIST.md)

**09 — Recipes**
[SMTP on cPanel](09-recipes/SMTP-CPANEL.md) ·
[SMTP STARTTLS 587](09-recipes/SMTP-STARTTLS-587.md) ·
[SMTP SSL 465](09-recipes/SMTP-SSL-465.md) ·
[Telegram bot setup](09-recipes/TELEGRAM-BOT-SETUP.md) ·
[Move domain](09-recipes/MOVE-DOMAIN.md) ·
[Recover admin access](09-recipes/RECOVER-ADMIN-ACCESS.md)

**Reference**
[Settings keys](reference/SETTINGS-KEYS.md) ·
[Database tables](reference/DATABASE-TABLES.md) ·
[Routes](reference/ROUTES.md) ·
[Permissions](reference/PERMISSIONS.md) ·
[Hooks](reference/HOOKS.md) ·
[Theme manifest](reference/THEME-MANIFEST.md)

**Development**
[Local development](LOCAL-DEVELOPMENT.md)

## Conventions used everywhere

- **The admin path is configurable.** Documentation writes it as `/admin`, but the operator may set anything (`/w-admin` is common). Never hard-code `/admin` in code, links or templates — use the admin URL helper.
- **The base path is configurable.** Quaeriva runs at `/`, `/ask`, or any subdirectory without editing templates. URLs in this documentation are relative to the installation root.
- **Arabic (RTL) and English (LTR) are both first-class.** Any new user-facing string needs a key in both `resources/lang/ar.php` and `resources/lang/en.php`.
- **User content is stored as Markdown**, never as arbitrary HTML, and rendered to safe HTML on the server.
