=== Docurest AI Assistant ===
Contributors: docurest
Tags: ai, chatbot, assistant, saas, docurest
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add an AI-powered chat assistant to your WordPress site using Docurest. Paste your widget snippet and you are done.

== Description ==

**Docurest AI Assistant** lets you embed an AI-powered document assistant on your WordPress site in under a minute.

1. Create your widget in the [Docurest Dashboard](https://docurest.com) — upload documents, configure the AI, and customise the look and feel.
2. Copy the widget snippet from the dashboard.
3. Install this plugin, paste the snippet, and save.

The chat assistant will appear on your site and answer your visitors' questions based on the documents you uploaded to Docurest.

= Features =

* One-click installation — paste the snippet and you are done.
* No coding required.
* Display on all pages, homepage only, posts only, or pages only.
* Test Connection button to verify everything works.
* Fully compatible with any WordPress theme.

= Third-Party Service =

This plugin relies on **[Docurest](https://docurest.com)**, an external SaaS service, to provide the AI assistant functionality.

When activated with a valid widget snippet, this plugin:

1. **Loads a JavaScript file** from Docurest servers (`folderai-widget.js`) that renders the chat widget on your site.
2. **Sends chat messages** entered by your visitors to the Docurest API for AI-powered responses.
3. **Sends the widget key** (embedded in your snippet) to identify your widget configuration.
4. **Sends your site domain** for origin validation.

**No personal data is collected or tracked beyond core service functionality.**

* Service: [https://docurest.com](https://docurest.com)
* Terms of Service: [https://docurest.com/terms](https://docurest.com/terms)
* Privacy Policy: [https://docurest.com/privacy](https://docurest.com/privacy)

== Installation ==

1. Download the plugin ZIP file.
2. In your WordPress admin, go to **Plugins → Add New → Upload Plugin**.
3. Upload the ZIP file and click **Install Now**.
4. Click **Activate**.
5. Go to **Settings → Docurest AI Assistant**.
6. Paste your widget snippet from the [Docurest Dashboard](https://docurest.com) (Websites → your domain → Embed Code).
7. Click **Save Settings**.
8. Optionally click **Test Connection** to verify everything is working.
9. Visit your site — the AI assistant widget will appear!

= Alternative: Install from WordPress Plugin Directory =

1. In your WordPress admin, go to **Plugins → Add New**.
2. Search for **Docurest AI Assistant**.
3. Click **Install Now** and then **Activate**.
4. Follow steps 5–9 above.

== Frequently Asked Questions ==

= Where do I get the widget snippet? =

Sign up or log in at [docurest.com](https://docurest.com). Go to your dashboard, add a website domain, create a widget, and copy the embed snippet.

= Do I need a Docurest account? =

Yes. The plugin connects to the Docurest service. You need an account to create widgets and upload documents for the AI to learn from.

= Is this plugin free? =

The plugin itself is free and open-source (GPLv2). The Docurest service may have free and paid tiers — check [docurest.com](https://docurest.com) for pricing details.

= What data is sent to Docurest? =

The widget key (to identify your widget), chat messages (to generate AI responses), and your site domain (for origin validation). No personal tracking occurs beyond service functionality.

= Why does the plugin load a remote JavaScript file? =

The AI assistant widget is rendered by JavaScript hosted on Docurest servers. This is how the widget receives updates and communicates with the Docurest AI backend. The remote script is loaded only when a valid widget snippet is configured.

= Can I show the widget only on certain pages? =

Yes. In Settings → Docurest AI Assistant, you can choose to display the widget on all pages, homepage only, posts only, or pages only.

= Does the plugin work with my theme? =

Yes. The widget floats as an overlay and does not interfere with your theme layout.

== Screenshots ==

1. The settings page where you paste your Docurest widget snippet.
2. The AI assistant widget on the frontend of a WordPress site.

== Changelog ==

= 1.0.0 =
* Initial release.
* Paste-and-go widget snippet integration.
* Test Connection verification.
* Display mode options (all pages, homepage, posts, pages).

== Upgrade Notice ==

= 1.0.0 =
Initial release.
