Add project Bible and consolidate documentation

- Create bible/ as single source of truth (architecture, API, frontend, installation, usage, security, roadmap)
- Verify and fix Bible against actual source code (API methods, endpoints, data flow)
- Trim README.md and CLAUDE.md to minimal stubs pointing to the Bible
- Remove duplicate claude.md (lowercase)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-02-20 14:11:57 +03:00
parent 4d608c016d
commit c97d49e762
10 changed files with 812 additions and 378 deletions

87
bible/installation.md Normal file
View File

@@ -0,0 +1,87 @@
# Installation
## Option 1 — Docker (Recommended)
```bash
docker pull git.mchus.pro/mchus/turborfq:latest
docker run -d \
--name turborfq \
-p 8080:8080 \
-e DB_HOST=your-mariadb-host \
-e DB_PORT=3306 \
git.mchus.pro/mchus/turborfq:latest
```
Open http://localhost:8080 in your browser.
### Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `DB_HOST` | `localhost` | MariaDB server address |
| `DB_PORT` | `3306` | MariaDB server port |
| `DB_CHARSET` | `utf8mb4` | Connection charset |
> When running in Docker, use the host machine's IP or `host.docker.internal` instead of `localhost` for `DB_HOST`.
---
## Option 2 — Manual
### Prerequisites
- PHP 8.1+ with extensions: `pdo_mysql`, `mbstring`, `xml`
- Composer (global installation recommended)
- Access to a MariaDB server
Install PHP and tools (Debian/Ubuntu):
```bash
sudo apt update
sudo apt install php php-cli php-mbstring php-xml php-mysql unzip git
```
Install Composer globally:
```bash
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"
```
### Steps
1. Clone the repository:
```bash
git clone https://git.mchus.pro/mchus/turborfq.git turborfq
cd turborfq
```
2. Install PHP dependencies:
```bash
composer install
```
3. Start the development server:
```bash
php -S localhost:8080 -t public
```
Open http://localhost:8080 in your browser.
> The PHP built-in server is for **development only**. For production use Nginx or Apache with `public/` as document root and `index.php` as the front controller.
---
## Troubleshooting
| Symptom | Likely cause | Fix |
|---------|-------------|-----|
| Blank page / PHP errors | `display_errors` off | Enable in `php.ini` or check `docker logs turborfq` |
| 401 "Not authenticated" | Session cookie missing | Ensure browser accepts cookies; re-login |
| Cannot connect to MariaDB | Wrong host/port/credentials | Verify `DB_HOST`, `DB_PORT`; test with `mysql` client |
| CSV import errors | Malformed CSV or type mismatch | Check column types; review per-row errors in response |