astro_minivan/.opencode/skills/minivan/SKILL.md
2026-05-06 23:16:07 +05:00

208 lines
No EOL
7.5 KiB
Markdown
Raw 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.

# minivan
Проект: minivan-berlin.de — сервис аренды автомобилей (Minivan) в Берлине.
Стек: Astro (SSR) + SolidJS + PocketBase + Tailwind CSS v4.
## Коллекции PocketBase
- `users` — пользователи
- `cars` — автомобили
- `bookings` — бронирования
- `reviews` — отзывы
- `posts` — статьи блога
- `faq_items` — FAQ вопросы
- `slider_cars` — автомобили для слайдера
- `site_settings` — настройки сайта
- `t_navbar` — пункты верхнего меню
- `b_navbar` — пункты нижнего меню (Footer)
- `t_top_header` — баннер в шапке
- `pages` — мета-данные страниц
- `preise_services` — услуги и цены
- `preise_cta` — CTA секции цен
- `comments` — комментарии блога
## Структура проекта
```
frontend/
├── src/
│ ├── pages/
│ │ ├── api/
│ │ │ ├── auth/ # Авторизация
│ │ │ │ ├── login.ts
│ │ │ │ ├── register.ts
│ │ │ │ ├── logout.ts
│ │ │ │ ├── check-auth.ts
│ │ │ │ └── google/
│ │ │ ├── contact.ts
│ │ │ ├── reviews/
│ │ │ └── send-booking.ts
│ │ ├── index.astro # Главная
│ │ ├── kontakt.astro # Контакты
│ │ ├── preise.astro # Цены
│ │ ├── impressum.astro # Impressum
│ │ ├── datenschutz.astro # Privacy
│ │ ├── agb.astro # Terms
│ │ ├── stornierung.astro # Cancellation
│ │ ├── zahlungsarten.astro # Payment
│ │ ├── bewertungen.astro # Reviews
│ │ ├── partner.astro # Partner
│ │ ├── karriere.astro # Careers
│ │ ├── hilfe.astro # FAQ/Help
│ │ ├── premium-flotte.astro # Premium fleet
│ │ ├── vip-services.astro # VIP services
│ │ ├── ueber-uns.astro # About
│ │ ├── action.astro # Special offer
│ │ ├── blog/
│ │ │ ├── [slug].astro
│ │ │ ├── [...page].astro
│ │ │ └── tags/
│ │ │ └── [tag].astro
│ │ └── auth/
│ │ ├── login.astro
│ │ ├── register.astro
│ │ ├── verify-email.astro
│ │ ├── forgot-password.astro
│ │ └── reset-password.astro
│ ├── components/
│ │ ├── layouts/
│ │ │ ├── header/
│ │ │ │ ├── Header.astro
│ │ │ │ ├── TopHeader.astro
│ │ │ │ ├── SiteHeader.astro
│ │ │ │ ├── Logo.astro
│ │ │ │ └── UserAvatar.astro
│ │ │ └── footer/
│ │ │ ├── Footer.astro
│ │ │ ├── FooterInfo.astro
│ │ │ └── FooterLinkColumn.astro
│ │ ├── base/
│ │ │ ├── Button.astro
│ │ │ ├── Link.astro
│ │ │ ├── Modal.astro
│ │ │ └── Breadcrumbs.astro
│ │ ├── home/
│ │ │ ├── hero/
│ │ │ └── howIt/
│ │ ├── blog/
│ │ ├── reviews/
│ │ ├── premium/
│ │ ├── preise/
│ │ ├── services/
│ │ ├── partner/
│ │ ├── career/
│ │ └── contacts/
│ ├── lib/
│ │ ├── authService.ts
│ │ ├── emailService.ts
│ │ └── pocketbase.js
│ ├── types/
│ │ ├── globalInterfaces.ts
│ │ └── types.ts
│ ├── constants/
│ ├── layouts/
│ │ └── Layout.astro
│ └── env.d.ts
├── public/
│ ├── robots.txt
│ └── favicon.ico
├── astro.config.mjs
└── package.json
```
## Страницы
| URL | Файл | Описание |
|-----|------|----------|
| `/` | `index.astro` | Главная |
| `/kontakt` | `kontakt.astro` | Контакты |
| `/preise` | `preise.astro` | Цены |
| `/bewertungen` | `bewertungen.astro` | Отзывы |
| `/partner` | `partner.astro` | Партнёры |
| `/karriere` | `karriere.astro` | Вакансии |
| `/hilfe` | `hilfe.astro` | FAQ |
| `/premium-flotte` | `premium-flotte.astro` | Премиум флот |
| `/vip-services` | `vip-services.astro` | VIP услуги |
| `/ueber-uns` | `ueber-uns.astro` | О нас |
| `/action` | `action.astro` | Акция |
| `/blog` | `blog/[...page].astro` | Блог |
| `/blog/[slug]` | `blog/[slug].astro` | Статья |
| `/auth/login` | `auth/login.astro` | Вход |
| `/auth/register` | `auth/register.astro` | Регистрация |
| `/impressum` | `impressum.astro` | Impressum |
| `/datenschutz` | `datenschutz.astro` | Privacy |
| `/agb` | `agb.astro` | Terms |
| `/stornierung` | `stornierung.astro` | Cancellation |
| `/zahlungsarten` | `zahlungsarten.astro` | Payment methods |
## Компоненты
### Layout
- `Header.astro` — основной header с навигацией
- `TopHeader.astro` — верхняя панель с контактами
- `SiteHeader.astro` — обёртка header
- `Footer.astro` — footer с ссылками
- `FooterLinkColumn.astro` — колонка ссылок
- `FooterInfo.astro` — информация о компании
### Base
- `Button.astro` — кнопка с вариантами
- `Link.astro` — ссылка с prefetch
- `Modal.astro` — модальное окно
- `Breadcrumbs.astro` — хлебные крошки
## Навигация
- **Верхнее меню** (Header): `t_navbar` — первые 5 пунктов (order 1-5)
- **Нижнее меню** (Footer): `b_navbar` — группировка по order: 1-3, 4-6, 7-10, 11-13
## Типы
Все типы в `frontend/src/types/globalInterfaces.ts`:
- User
- Car
- Booking
- Review
- Post
- SiteSettings
## API-эндпоинты
- `/api/auth/login` — вход
- `/api/auth/register` — регистрация
- `/api/auth/logout` — выход
- `/api/auth/check-auth` — проверка авторизации
- `/api/auth/google/*` — Google OAuth
- `/api/contact` — контактная форма
- `/api/reviews` — отзывы (GET/POST/DELETE)
- `/api/send-booking` — бронирование
- `/api/files-proxy/*` — прокси файлов
## Переменные окружения
```
PB PocketBase URL=https://minivan-berlin.de
MAIL_* — почта
SMTP_* — SMTP
SENDER_* — отправитель
ADMIN_* — админ
```
## Правила
1. SolidJS компоненты — `.tsx` расширение
2. Astro компоненты — `.astro` расширение
3. Запросы к PB — через authService
4. Типизация в types/globalInterfaces.ts
5. Не использовать any без крайней необходимости
6. Tailwind CSS v4
7. Картинки — в astro:assets
## Особенности
- SSR mode с @astrojs/node
- Sitemap автоматически @astrojs/sitemap
- prefetching страниц
- Session via cookies
- Аутент<D0BD><D182>фикация через PocketBase