> ## Documentation Index
> Fetch the complete documentation index at: https://stratanote.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Settings & Administration

> Configure StrataNote imports and exports, media library, user roles, language, and local synchronization from the admin settings panel.

The **Settings Panel** is available to users with the **Admin** role for system-wide configuration, and to all users for basic repository export operations.

***

## 1. Settings Panel Overview

The settings interface is organized into several tabs. All system texts, logs, and dialog warnings support localization (which can be changed on the "General" tab).

<Card title="Screenshot: Settings Panel Interface" icon="sliders" iconType="solid" color="#8b5cf6">
  **Interface Preview:** The settings modal split into tabs: General, Import & Upload, Users, Media Library, Synchronization, and About. The active General tab displays a language selection dropdown.
  **Key elements:** Sidebar tabs and the language toggle.
</Card>

***

## 2. Data Import & Export

StrataNote is optimized to handle large knowledge bases (Vaults) containing hundreds of megabytes of files.

### Chunked Upload

When uploading a large vault in a `.zip` archive (over 300 MB), the system automatically splits the file into 5 MB chunks.

* **Benefit:** Prevents connection timeouts and `HTTP 413: Payload Too Large` errors.
* **Import Modes:**
  1. *Merge* — Adds new files and directories, updates modified ones, and preserves other files on the server.
  2. *Overwrite* — Completely deletes the active vault on the server before extracting the new ZIP archive.

<Card title="Screenshot: Import Tab with Upload Progress" icon="cloud-arrow-up" iconType="solid" color="#8b5cf6">
  **Interface Preview:** ZIP archive upload screen showing a Progress Bar with percentage tracking and status phases (e.g., `Uploading: 84%... Extracting & Indexing...`).
</Card>

### Exporting Vault

In the export dialog, you can select exactly what to package into the zip archive:

* Only markdown text files (`.md`).
* Only media files and attachments (`assets/`).
* Full backup (Text + Media).
* **Archive Name:** Automatically generated with a data-type prefix and a Moscow time (MSK, UTC+3) timestamp — e.g., `obsidian-vault-export-2026-07-16_23-50.zip`.

***

## 3. Media & Attachment Management

In the **"Media"** settings tab, administrators can clean up disk space by removing unused files:

* **Orphaned Files Scanner:** An automated scanner reads all notes. Files in the `assets/` directory that are not referenced in any markdown documents are flagged as **"Not Used"** and can be filtered using the **"Orphaned"** filter toggle.
* **Bulk Deletion:** Select multiple orphaned files using checkboxes and delete them permanently from the server disk with one click.
* **Format Groups:** Images, videos, audios (.mp3), archives (.zip), and PDFs are grouped into categories, with unrecognized files placed in **"Other"**.

<Card title="Screenshot: Media Library with Filters" icon="images" iconType="solid" color="#8b5cf6">
  **Interface Preview:** Media assets grid. The "Orphaned" filter is selected. Unused images show a red "Not Used" badge, some cards are checked, and the "Delete Selected (3)" button is active.
</Card>

***

## 4. Local Synchronization (MCP Sync Agent)

To edit files locally using your favorite desktop editor (Obsidian, VS Code, Logseq, etc.), StrataNote provides a background synchronization utility called **\_sync\_mcp**.

### Step 1: Generate API Access Token

1. In the StrataNote Settings panel, select the **"Synchronization"** (Sync) tab.
2. Click **"Generate API Token"** and copy the generated JWT string.

### Step 2: Configure the Local Agent

1. In your project workspace directory on your PC, find the `_sync_mcp/config.template.json` file.
2. Duplicate it and rename the copy to `_sync_mcp/config.json` (this file is ignored in Git and will not leak public credentials).
3. Open it in an editor and configure the fields:
   ```json theme={null}
   {
     "STRATANOTE_SERVER_URL": "http://localhost:3001",
     "STRATANOTE_API_TOKEN": "YOUR_COPIED_JWT_TOKEN",
     "LOCAL_VAULT_PATH": "D:/Obsidian/MyPersonalVault"
   }
   ```
4. Set `LOCAL_VAULT_PATH` to the absolute path of your local notes folder.

### Step 3: Run the Agent

* When you launch the project locally using `npm run dev` in `_app/` (or via `start.bat` on Windows), the system automatically checks dependency states and starts the synchronization agent in the background.
* The local directory watcher (Chokidar) monitors changes and waits 5 seconds (debouncing to prevent partial file writes) before syncing modified files to the server.
* The agent manages synchronization states using `.sync_state.json` which tracks file hashes during successful synchronization operations.

***

## 5. User Management & Access Control

Administrators control who has access to the workspace via the **"Users"** tab:

### Role Permissions

* **Owner:** Full system-wide access including modifying configuration variables, deleting databases, and changing owner-level attributes.
* **Admin:** Manage configuration settings, view and recover notes from the Trash Bin, moderate user comments, and activate/approve new accounts.
* **Editor:** Can read and edit documents, upload/delete media files, and link notes. Cannot access the Admin Panel settings.
* **Viewer:** Read-only access to files, note connections, and rendering layouts.

### User Activation & Approval

When a new user registers a StrataNote account:

1. The account is set to **"Inactive"** by default.
2. In the **Users** tab, administrators will see a pending activation request.
3. Click the **"Approve"** (Activate) button and assign the appropriate user role (e.g., `Editor`) to grant access.

<Card title="Screenshot: User Accounts & Roles Grid" icon="users" iconType="solid" color="#8b5cf6">
  **Interface Preview:** A list of registered user accounts with checkboxes, role selectors (dropdowns), account status badges (Green for Active, Grey for Inactive), and action buttons.
</Card>

***

## 6. Note Trash Bin & Recovery

To prevent accidental data loss, notes deleted in StrataNote (whether deleted from the web app, local workspace editors via the Sync watcher, or API commands) are not erased immediately.

### How the Trash Bin Works

1. When a note is deleted, its text contents, filename, directory paths, and full revision history are packed and archived in the SQLite database `trash` table.
2. In the **"Trash"** (Корзина) tab of the settings panel, admins can view all archived documents.
3. The dashboard displays:
   * File path and filename.
   * Date and time of deletion.
   * **Deleted By:** The entity that deleted the file (e.g., username `admin`, note owner, or `External System` if deleted from a local editor monitored by the Chokidar watcher).

### Actions

* **Restore Note:** Clicking "Restore" recreates the file on disk (including missing parent directories), creates a fresh entry in the document database, and imports its entire historical edit log back to the version history panel.
* **Purge Selected:** Permanently erases specific files from the database.
* **Empty Trash:** Wipes all files from the trash table to free up database storage.

<Card title="Screenshot: Trash Bin Control Dashboard" icon="trash-can" iconType="solid" color="#8b5cf6">
  **Interface Preview:** A data table listing deleted notes, showing paths like `/projects/todo.md`, deletion timestamps, deletion source details, and green "Restore" / red "Purge" action buttons.
</Card>

***

## 7. System Information & Updates

Keep track of your current deployment and look for new feature versions on the **"System"** (О системе) tab.

### GitHub Update Checker

* The server includes an automated background worker that queries the public GitHub Releases API of the StrataNote repository.
* To prevent exceeding GitHub's public API limits, request results are cached in the server memory for **1 hour**.
* **Visual Update Notifications:**
  * **Admin Panel:** Displays current version (e.g., `1.13.5`), latest version available on GitHub (e.g., `1.13.6`), and a **"Check Updates"** button.
  * **Sidebar:** A pulsing indicator badge appears next to the version tag in the sidebar footer when an update is found.
  * **About Screen:** Displays a banner letting users know a new release is available with direct links to the release notes.

***

## 8. Note Templates (Note Templates Setup)

The **"Templates"** tab (available to users with **Owner**, **Admin**, and **Editor** roles) allows you to manage pre-defined templates for creating notes, configure system-wide variables, and insert templates into documents.

### Account Directory Isolation & Safety

* **Path Structure:** Each user's templates are isolated in the filesystem under `Templates/<username>/` to prevent name conflicts.
* **Access Control:** Non-admin users can view, edit, or comment on templates only inside their own personal directory. The backend blocks attempts to reach other users' directories through direct URL hashes or API requests, returns `403 Forbidden`, and routes the client back to a safe view.

### Automatic I18n Templates Seeding

When a user logs in for the first time, the server automatically generates 4 default templates (`Daily Note.md`, `Meeting Notes.md`, `Book Summary.md`, `Project Plan.md`). The template texts and names are automatically localized based on the system's default language (configured by the Superadministrator).

### Placeholders & Date/Time Configurations

* **Datetime Preset Configurations:** Customize your date and time formats on the tab using tokens like `YYYY`, `MM`, `DD`, `HH`, `mm`, `ss`.
* **Dynamic Placeholders:** When a template is inserted, the system automatically translates the following placeholders:
  * `{{title}}` - Replaced with the current note's filename.
  * `{{date}}` - Current date formatted using your custom date preset.
  * `{{time}}` - Current time formatted using your custom time preset.
  * `{{datetime}}` - Current date and time formatted.
  * `{{author}}` - Username of the current user.
  * `{{folder}}` - Name of the parent directory of the note.

### Templates Editor & Insertion

* **Editor Mode:** You can create or edit template files using CodeMirror directly from the settings panel. An informative purple top-bar warns you that you are modifying a template rather than a standard note.
* **In-Editor Insertion:** Click the **"Insert Template"** button in the editor toolbar, select your template, and it will be inserted directly at your cursor position.

<Card title="Screenshot: Note Templates Setup Dashboard" icon="cubes" iconType="solid" color="#8b5cf6">
  **Interface Preview:** Note templates configuration tab showing custom date format selector fields, and a list of available templates with "Edit" and "Delete" actions.
</Card>

***

## 9. Appearance & Theme Management (Внешний вид)

The **"Appearance"** (Внешний вид) tab is accessible to **all user roles** (`Admin`, `Editor`, `Viewer`), allowing personalized visual themes.

### Available Themes

* **Dark Purple (Default):** Classic Obsidian-inspired deep dark purple design.
* **Soft Light Purple (Светлая лаванда):** Low-strain soft lavender light theme (`#f6f4fa`) optimized for daytime reading.
* **Clean Light (Чистая светлая):** Minimalist slate light theme in Notion/GitHub style.
* **Nord Dark (Северный графит):** Soft Scandinavian graphite dark scheme.

### Quick Theme Switcher

Click the **Sun / Moon** icon in the sidebar footer to quickly toggle between light and dark modes in a single click.

### Per-User Preference Storage

Theme selections are saved per user in browser storage (`stratanote_theme_<username>`). Different users sharing a computer maintain independent themes. The authentication screen always defaults to the signature **Dark Purple** theme.
