Add rental system: listings, bookings, payments, payouts, reviews
Full rental marketplace with 6 categories (apartment, house, car, motorcycle, bicycle, ebike). Booking workflow: create → confirm → pay → active → complete → payout. Landlord dashboard, admin moderation, availability calendar, Stripe Connect payouts. 14 QA bugs found and fixed including validator schemas, API response types, HTTP methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
93
отчеты/список-файлов.md
Normal file
93
отчеты/список-файлов.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# Полный список файлов — Админ-панель, Модерация, Монетизация
|
||||
|
||||
## Новые серверные файлы (16)
|
||||
|
||||
```
|
||||
server/src/middleware/requireRole.ts — RBAC middleware
|
||||
server/src/middleware/checkBanned.ts — Проверка бана
|
||||
server/src/utils/moderation.ts — Кэш конфига + keyword check
|
||||
server/src/routes/admin/index.ts — Агрегатор админ-роутов
|
||||
server/src/routes/admin/stats.ts — Аналитика дашборда
|
||||
server/src/routes/admin/users.ts — Управление юзерами
|
||||
server/src/routes/admin/listings.ts — Управление листингами
|
||||
server/src/routes/admin/reports.ts — Управление жалобами
|
||||
server/src/routes/admin/moderation.ts — Очередь модерации
|
||||
server/src/routes/admin/payments.ts — Платежи и выручка
|
||||
server/src/routes/admin/settings.ts — Настройки платформы
|
||||
server/src/routes/report.ts — Создание жалобы (юзер)
|
||||
server/src/routes/subscription.ts — Подписки
|
||||
server/src/routes/promotion.ts — Продвижение листингов
|
||||
server/src/validators/admin.ts — Zod-схемы для админки
|
||||
server/src/validators/report.ts — Zod-схема жалобы
|
||||
```
|
||||
|
||||
## Новые клиентские файлы (13)
|
||||
|
||||
```
|
||||
client/src/components/layout/RequireRole.tsx — Route guard по роли
|
||||
client/src/components/layout/AdminLayout.tsx — Sidebar-layout админки
|
||||
client/src/components/ui/StatCard.tsx — Карточка метрики
|
||||
client/src/components/ui/DataTable.tsx — Таблица с пагинацией
|
||||
client/src/components/ReportModal.tsx — Модалка жалобы
|
||||
client/src/pages/admin/AdminDashboardPage.tsx — Дашборд
|
||||
client/src/pages/admin/AdminUsersPage.tsx — Юзеры
|
||||
client/src/pages/admin/AdminUserDetailPage.tsx — Детали юзера
|
||||
client/src/pages/admin/AdminListingsPage.tsx — Листинги
|
||||
client/src/pages/admin/AdminReportsPage.tsx — Жалобы
|
||||
client/src/pages/admin/AdminModerationPage.tsx — Очередь модерации
|
||||
client/src/pages/admin/AdminPaymentsPage.tsx — Платежи
|
||||
client/src/pages/admin/AdminSettingsPage.tsx — Настройки
|
||||
```
|
||||
|
||||
## Модифицированные файлы (13)
|
||||
|
||||
```
|
||||
server/prisma/schema.prisma — 8 enum + 6 моделей + расширение 3 моделей
|
||||
server/prisma/seed.ts — PlatformConfig + роли + cleanup
|
||||
server/src/index.ts — 4 новых route group
|
||||
server/src/middleware/auth.ts — userRole в Request
|
||||
server/src/routes/auth.ts — role в select + isBanned check
|
||||
server/src/routes/listing.ts — autoApprove + keywords + isFeatured
|
||||
server/src/routes/payment.ts — динамический listingFee
|
||||
server/src/routes/offer.ts — commission при accept
|
||||
client/src/types/index.ts — role + новые типы
|
||||
client/src/context/AuthContext.tsx — isAdmin/isModerator/isSuperAdmin
|
||||
client/src/router.tsx — /admin/* routes
|
||||
client/src/components/layout/Header.tsx — ссылка Admin
|
||||
client/src/pages/ProductDetailPage.tsx — ReportModal
|
||||
client/src/pages/NotificationsPage.tsx — новые notification types
|
||||
```
|
||||
|
||||
## Итого
|
||||
|
||||
- **29 новых файлов**
|
||||
- **13+1 изменённых файлов**
|
||||
- **43 файла** затронуто
|
||||
|
||||
## Структура папки admin routes
|
||||
|
||||
```
|
||||
server/src/routes/admin/
|
||||
├── index.ts — authenticate + mount sub-routers
|
||||
├── stats.ts — GET /stats, /stats/revenue, /stats/users, /stats/listings
|
||||
├── users.ts — GET/PATCH/POST users, ban, unban, role
|
||||
├── listings.ts — GET listings, approve, reject, delete, feature
|
||||
├── reports.ts — GET/PATCH reports
|
||||
├── moderation.ts — GET queue, GET logs
|
||||
├── payments.ts — GET payments, GET revenue
|
||||
└── settings.ts — GET/PATCH settings
|
||||
```
|
||||
|
||||
## Структура папки admin pages
|
||||
|
||||
```
|
||||
client/src/pages/admin/
|
||||
├── AdminDashboardPage.tsx
|
||||
├── AdminUsersPage.tsx
|
||||
├── AdminUserDetailPage.tsx
|
||||
├── AdminListingsPage.tsx
|
||||
├── AdminReportsPage.tsx
|
||||
├── AdminModerationPage.tsx
|
||||
├── AdminPaymentsPage.tsx
|
||||
└── AdminSettingsPage.tsx
|
||||
```
|
||||
Reference in New Issue
Block a user