Restructure: System/Classes/ for core classes, Http/Database/View/Console for specific handlers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e761ce9287
commit
d148eecac5
15
.claude/settings.json
Normal file
15
.claude/settings.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Edit(/home/isaevea/http2/Bicycle/**)",
|
||||
"Write(/home/isaevea/http2/Bicycle/**)",
|
||||
"Read(/home/isaevea/http2/Bicycle/**)",
|
||||
"Bash(git:*)",
|
||||
"Bash(php:*)",
|
||||
"Bash(composer:*)",
|
||||
"mcp__gitea__*",
|
||||
"Bash(gitea-mcp --help)"
|
||||
]
|
||||
},
|
||||
"enabledMcpjsonServers": ["gitea"]
|
||||
}
|
||||
10
.idea/.gitignore
generated
vendored
Normal file
10
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Ignored default folder with query files
|
||||
/queries/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
8
.idea/Bicycle.iml
generated
Normal file
8
.idea/Bicycle.iml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Bicycle.iml" filepath="$PROJECT_DIR$/.idea/Bicycle.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
19
.idea/php.xml
generated
Normal file
19
.idea/php.xml
generated
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
18
CLAUDE.md
18
CLAUDE.md
@ -10,15 +10,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
Фреймворк строится по принципу **MVC + Service Container**:
|
||||
|
||||
- `System/Core/` — ядро: Application, загрузка конфига, бутстрап
|
||||
- `System/Http/` — Request, Response, обработка HTTP-цикла
|
||||
- `System/Router/` — маршрутизация (регистрация роутов, диспатчинг)
|
||||
- `System/Container/` — DI-контейнер (bind/make/singleton)
|
||||
- `System/Middleware/` — цепочка middleware (Pipeline)
|
||||
- `System/View/` — шаблонизатор
|
||||
- `System/Classes/` — основные классы: Application, Router, Container, Middleware, Request, Response и др.
|
||||
- `System/Http/` — обработчики HTTP-статусов (404, 503 и т.д.)
|
||||
- `System/Database/` — QueryBuilder / ORM
|
||||
- `System/View/` — шаблонизатор
|
||||
- `System/Console/` — CLI-команды
|
||||
- `System/Exceptions/` — обработчики ошибок
|
||||
- `config/` — конфигурационные файлы (.php массивы)
|
||||
- `index.php` — точка входа
|
||||
- `bin/bicycle` — CLI-точка входа
|
||||
@ -32,7 +28,7 @@ composer install
|
||||
|
||||
### Запуск встроенного сервера
|
||||
```bash
|
||||
php -S localhost:8000 -t public
|
||||
php -S localhost:8000
|
||||
```
|
||||
|
||||
### Запуск тестов
|
||||
@ -44,8 +40,8 @@ php -S localhost:8000 -t public
|
||||
|
||||
### Линтер / статический анализ
|
||||
```bash
|
||||
./vendor/bin/phpcs --standard=PSR12 src/
|
||||
./vendor/bin/phpstan analyse src --level=5
|
||||
./vendor/bin/phpcs --standard=PSR12 System/
|
||||
./vendor/bin/phpstan analyse System/ --level=5
|
||||
```
|
||||
|
||||
### CLI фреймворка
|
||||
@ -58,4 +54,4 @@ php bin/bicycle <command>
|
||||
- PHP 8.1+, строгая типизация (`declare(strict_types=1)`)
|
||||
- Стандарт кода — PSR-12
|
||||
- Пространство имён корня: `Bicycle\`
|
||||
- Автозагрузка через Composer PSR-4: `"Bicycle\\": "src/"`
|
||||
- Автозагрузка через Composer PSR-4: `"Bicycle\\": "System/Classes/"`
|
||||
@ -7,5 +7,5 @@ define('BASE_PATH', dirname(__DIR__));
|
||||
|
||||
require_once BASE_PATH . '/vendor/autoload.php';
|
||||
|
||||
$app = new \Bicycle\Core\Application(BASE_PATH);
|
||||
$app = new \Bicycle\Application(BASE_PATH);
|
||||
$app->runConsole($argv);
|
||||
|
||||
@ -12,7 +12,11 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Bicycle\\": "System/"
|
||||
"Bicycle\\": "System/Classes/",
|
||||
"Bicycle\\Http\\": "System/Http/",
|
||||
"Bicycle\\Database\\": "System/Database/",
|
||||
"Bicycle\\View\\": "System/View/",
|
||||
"Bicycle\\Console\\": "System/Console/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
||||
@ -6,5 +6,5 @@ define('BASE_PATH', __DIR__);
|
||||
|
||||
require_once BASE_PATH . '/vendor/autoload.php';
|
||||
|
||||
$app = new \Bicycle\Core\Application(BASE_PATH);
|
||||
$app = new \Bicycle\Application(BASE_PATH);
|
||||
$app->run();
|
||||
|
||||
44
ЗАМЕТКИ.md
Normal file
44
ЗАМЕТКИ.md
Normal file
@ -0,0 +1,44 @@
|
||||
# Заметки по Claude Code
|
||||
|
||||
## Скилы (Skills)
|
||||
Вызываются командой `/название` прямо в чате с Claude Code.
|
||||
|
||||
| Команда | Что делает |
|
||||
|---|---|
|
||||
| `/init` | Создаёт CLAUDE.md — инструкцию для Claude |
|
||||
| `/review` | Ревью pull request |
|
||||
| `/security-review` | Проверка кода на уязвимости |
|
||||
| `/simplify` | Упрощает и улучшает написанный код |
|
||||
| `/loop` | Запускает задачу повторяющимся циклом |
|
||||
|
||||
---
|
||||
|
||||
## Агенты (Agents)
|
||||
Специализированные помощники — Claude может запускать их параллельно.
|
||||
|
||||
- **Explore** — быстро исследует файлы и код проекта
|
||||
- **Plan** — составляет архитектурный план перед разработкой
|
||||
- **general-purpose** — универсальный агент для сложных задач
|
||||
|
||||
---
|
||||
|
||||
## Плагины (MCP — Model Context Protocol)
|
||||
Расширяют возможности Claude — подключают внешние сервисы.
|
||||
|
||||
Уже подключены:
|
||||
- **Gmail** — читать и писать почту
|
||||
- **Google Calendar** — работа с календарём
|
||||
- **Google Drive** — доступ к файлам на диске
|
||||
- **IDE** — интеграция с редактором кода (PhpStorm и др.)
|
||||
|
||||
Можно подключить: GitHub, Slack, Jira, базы данных и многое другое.
|
||||
|
||||
---
|
||||
|
||||
## Важные файлы Claude Code
|
||||
|
||||
| Файл / Папка | Где | Зачем |
|
||||
|---|---|---|
|
||||
| `CLAUDE.md` | корень проекта | инструкция для Claude по проекту |
|
||||
| `~/.claude/` | домашняя папка | глобальная память и настройки |
|
||||
| `.claude/settings.json` | корень проекта | разрешения команд для проекта |
|
||||
Loading…
Reference in New Issue
Block a user