Files
interview-demo-code/docs/features/_TEMPLATE.md
Nikita Kiselev d621baae45 docs: add docs/features scaffold for feature documentation
Introduce docs/features/ with an index (conventions + feature registry),
a per-feature template, and a filled cart example. Reference the structure
from the root CLAUDE.md so context can be restored per feature on demand.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 13:33:37 +03:00

39 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# <Название фичи>
> Скопируй этот файл в `docs/features/<feature-slug>/CLAUDE.md` и заполни секции.
> Удали подсказки в кавычках после заполнения. Не оставляй пустых «TODO».
## Назначение
> 13 предложения: какую задачу решает фича и для кого (SPA-покупатель / админ / системное).
## Точки входа
> `action` из карт маршрутов и где они объявлены. Таблица:
| action | Метод | Где объявлен |
|-----------------|-------------------|-------------------------------------------|
| `exampleAction` | `Handler::method` | `src/routes.php` или `bastion/routes.php` |
## Ключевые файлы по слоям
> Путь от корня репозитория. Только то, что реально относится к фиче.
- **Handler:** `module/.../src/Handlers/XxxHandler.php` — валидация, вызов сервиса, `JsonResponse`.
- **Service:** `module/.../src/Services/XxxService.php` — бизнес-логика.
- **Model / данные:** `module/.../src/Models/Xxx.php` или таблицы БД.
- **Фронтенд:** `frontend/spa/...` или `frontend/admin/...` (store, view, компоненты).
- **Регистрация в DI:** `src/ServiceProviders/...` (если есть нестандартная привязка).
## Поток данных
> Кратко: запрос → слои → ответ. Можно списком шагов или стрелками.
## Связанные фичи
> Ссылки на соседние папки: `[checkout](../checkout/CLAUDE.md)`.
## Нюансы и подводные камни
> Неочевидное: ограничения PHP 7.4, особенности OpenCart-реестра, кэш, edge-cases, известные баги.