7.5 KiB
7.5 KiB
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— обёртка headerFooter.astro— footer с ссылкамиFooterLinkColumn.astro— колонка ссылокFooterInfo.astro— информация о компании
Base
Button.astro— кнопка с вариантамиLink.astro— ссылка с prefetchModal.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_* — админ
Правила
- SolidJS компоненты —
.tsxрасширение - Astro компоненты —
.astroрасширение - Запросы к PB — через authService
- Типизация в types/globalInterfaces.ts
- Не использовать any без крайней необходимости
- Tailwind CSS v4
- Картинки — в astro:assets
Особенности
- SSR mode с @astrojs/node
- Sitemap автоматически @astrojs/sitemap
- prefetching страниц
- Session via cookies
- Аутент<EFBFBD><EFBFBD>фикация через PocketBase