Files
TenerifeProp/docs/SITEMAP.md
TenerifeProp Dev f4b82c8502 feat: add persistent sessions, sitemap docs, and expanded seed data
## Security
- Sessions now stored in SQLite database instead of memory
- Sessions table persists across server restarts
- Auto-cleanup of expired sessions on startup

## Documentation
- Created docs/SITEMAP.md with site navigation map
- Documented user flows and data binding
- Listed all routes and their purposes

## Issue #9 Progress
- Seed data expanded from 3 to 12 properties
- Added English translations (title_en, description_en)
- All major Tenerife cities represented
- Various property types: urban, agricultural, houses, apartments

## Database
- Added title_en, description_en, short_description_en columns
- Deleted old database to reseed with new data
2026-04-05 00:15:48 +01:00

202 lines
6.1 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.
# TenerifeProp - Карта сайта
## Структура страниц
### Публичные страницы
```
/ # Главная страница (Landing)
├── #hero # Главный баннер
├── #advantages # Преимущества
├── #catalog # Каталог недвижимости
├── #services # Услуги
├── #testimonials # Отзывы
├── #faq # Вопросы-ответы
└── #contact # Контакты
/property/:slug # Страница объекта недвижимости
├── #gallery # Галерея изображений
├── #details # Детали объекта
├── #utilities # Коммуникации
├── #location # Карта
└── #contact-form # Форма запроса
/admin # Админ-панель (требует авторизации)
├── /dashboard # Dashboard - статистика
├── /properties # Управление объектами
│ ├── /list # Список
│ └── /new # Новый объект
├── /leads # Управление заявками
├── /testimonials # Управление отзывами
├── /faq # Управление FAQ
├── /services # Управление услугами
└── /settings # Настройки сайта
```
## Навигация
### Главное меню (Navbar)
- **Inicio** → `/#hero`
- **Catálogo** → `/#catalog`
- **Servicios** → `/#services`
- **Testimonios** → `/#testimonials`
- **Contacto** → `/#contact`
### Языковой переключатель
- **ES** (Испанский) - по умолчанию
- **RU** (Русский)
- **EN** (Английский)
### Footer меню
- **Aviso Legal** → `/legal`
- **Política de Privacidad** → `/privacy`
- **Política de Cookies** → `/cookies`
## Пользовательский воркфлоу
### Покупатель (Client Journey)
```
1. Главная страница
2. Просмотр каталога → Фильтры (тип, цена, город)
3. Выбор объекта → Карточка объекта
4. Просмотр деталий (фото, характеристики, карта)
5. Отправка заявки (форма контакта)
6. Получение подтверждения → Ожидание звонка
```
### Администратор (Admin Journey)
```
1. Вход в админку → /admin
2. Dashboard → Статистика, графики
3. Управление объектами
├── Добавление нового объекта
├── Редактирование объекта
└── Изменение статуса (active/sold/reserved)
4. Управление заявками
├── Просмотр новых заявок
├── Изменение статуса (new/contaced/closed)
└── Добавление заметок
5. Управление контентом
├── Отзывы → Модерация
├── FAQ → Редактирование
└── Услуги → Обновление
```
## Связность данных (Data Binding)
### Связи между сущностями
```
Property
├── id (UUID)
├── slug (URL-friendly)
├── city → Фильтр по городам
├── type → Фильтр по типу
└── leads → Заявки с property_id
Lead
├── id (UUID)
├── property_id → Связь с Property
└── status → Статус обработки
Testimonial
├── id (UUID)
├── property_id → Связь с Property (опционально)
└── is_approved → Модерация
FAQ
├── id (UUID)
├── category → Группировка
└── order_num → Порядок отображения
Service
├── id (UUID)
├── order_num → Порядок отображения
└── is_active → Активность
```
## API Endpoints связности
### Получение объекта по slug
```http
GET /api/properties/:slug?lang=es
```
### Получение похожих объектов
```http
GET /api/properties?type=urban&city=Adeje&limit=3
```
### Создание заявки для объекта
```http
POST /api/leads
{
"name": "John Doe",
"email": "john@example.com",
"phone": "+34 600 123 456",
"property_id": "prop-001",
"message": "Interested in this property"
}
```
## Роутинг
### Public Routes
| Route | File | Description |
|-------|------|-------------|
| `/` | `public/index.html` | Landing page |
| `/property/:slug` | `public/property.html` | Property details |
| `/admin` | `public/admin.html` | Admin panel SPA |
| `/admin/*` | `public/admin.html` | Admin SPA routes |
### API Routes
| Prefix | Access | Description |
|--------|--------|-------------|
| `/api/auth/*` | Public | Authentication |
| `/api/properties/*` | Public | Properties catalog |
| `/api/leads` | Public POST only | Create lead |
| `/api/testimonials` | Public | Testimonials |
| `/api/faq` | Public | FAQ |
| `/api/services` | Public | Services |
| `/api/settings` | Public | Site settings |
| `/api/admin/*` | Admin only | Admin operations |
## Статусы и переходы
### Property Status
```
active → reserved → sold
↓ ↓
inactive inactive
```
### Lead Status
```
new → contacted → qualified → negotiating → closed
↓ ↓
lost lost
```
## Кэширование
### Static Files
- HTML: no-cache (SPA)
- CSS/JS: cache with version
- Images: long-term cache
### API Responses
- Properties: 5 min cache
- Settings: 1 hour cache
- FAQ/Services: 10 min cache
- Leads: no cache