Итерация 1: каркас Slim 4 приложения

- Slim 4 + php-di контейнер с маршрутизацией
- Docker Compose: app (PHP 8.3-FPM) + web (nginx) + db (MariaDB)
- Phinx миграция: таблица users (uuid, username, password_hash)
- Auth: login/logout с сессиями
- Setup: создание первого пользователя
- Dashboard с layout (Bootstrap 5.3)
- CLI: bin/console, bin/run-scan-worker.php
- Smoke test: scripts/check.sh
- README.md, PLAN.md
This commit is contained in:
2026-05-26 07:26:55 +08:00
commit e7732f5cee
31 changed files with 8790 additions and 0 deletions
@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateUsers extends AbstractMigration
{
public function change(): void
{
$table = $this->table('users', ['id' => false, 'primary_key' => ['id']]);
$table
->addColumn('id', 'uuid', ['null' => false])
->addColumn('username', 'string', ['limit' => 255, 'null' => false])
->addColumn('password_hash', 'string', ['limit' => 255, 'null' => false])
->addColumn('created_at', 'datetime', ['null' => false, 'default' => 'CURRENT_TIMESTAMP'])
->addColumn('updated_at', 'datetime', ['null' => false, 'default' => 'CURRENT_TIMESTAMP'])
->addIndex(['username'], ['unique' => true])
->create();
}
}