Pridané US-015, US-016, US-017, US-018

This commit is contained in:
Ján Malinovský 2025-11-02 16:54:01 +01:00
parent 2690943aa3
commit d45d209620

View File

@ -524,43 +524,43 @@ aby ostatný vedeli, s kým hrajú
### Tasky: ### Tasky:
### Backend ### Backend
⏸️ Prisma schema: Review model (rating 1-5, comment, reviewer, reviewed user) - ⏸️ Prisma schema: Review model (rating 1-5, comment, reviewer, reviewed user)
⏸️ API: POST /api/users/[id]/reviews - ⏸️ API: POST /api/users/[id]/reviews
⏸️ API: GET /api/users/[id]/reviews (zoznam recenzií) - ⏸️ API: GET /api/users/[id]/reviews (zoznam recenzií)
⏸️ Validácia: len pre účastníkov aktivity - ⏸️ Validácia: len pre účastníkov aktivity
⏸️ Validácia: len po dátume aktivity - ⏸️ Validácia: len po dátume aktivity
⏸️ Validácia: jeden review na používateľa na aktivitu - ⏸️ Validácia: jeden review na používateľa na aktivitu
⏸️ Validácia: no spam, min 10 znakov pre comment - ⏸️ Validácia: no spam, min 10 znakov pre comment
⏸️ Výpočet priemerného ratingu (agregácia) - ⏸️ Výpočet priemerného ratingu (agregácia)
⏸️ API: POST /api/reviews/[id]/report (report inappropriate review) - ⏸️ API: POST /api/reviews/[id]/report (report inappropriate review)
###Frontend - Review komponenty ###Frontend - Review komponenty
⏸️ Review modal po skončení aktivity - ⏸️ Review modal po skončení aktivity
⏸️ Star rating komponenta (1-5 hviezd, interactive) - ⏸️ Star rating komponenta (1-5 hviezd, interactive)
⏸️ Text area pre komentár (optional, max 500 znakov) - ⏸️ Text area pre komentár (optional, max 500 znakov)
⏸️ Character counter (500/500) - ⏸️ Character counter (500/500)
⏸️ Anonymous option checkbox (meno skryté) - ⏸️ Anonymous option checkbox (meno skryté)
⏸️ Submit a Cancel tlačidlá - ⏸️ Submit a Cancel tlačidlá
⏸️ Loading state pri odosielaní - ⏸️ Loading state pri odosielaní
### Frontend - Zobrazenie recenzií ### Frontend - Zobrazenie recenzií
⏸️ Zobrazenie priemerného ratingu na profile (stars + číslo) - ⏸️ Zobrazenie priemerného ratingu na profile (stars + číslo)
⏸️ Zoznam recenzií na profile stránke - ⏸️ Zoznam recenzií na profile stránke
⏸️ Review card komponenta (avatar, meno/anonymous, rating, komentár, dátum) - ⏸️ Review card komponenta (avatar, meno/anonymous, rating, komentár, dátum)
⏸️ Pagination pre recenzie (10 per page) - ⏸️ Pagination pre recenzie (10 per page)
⏸️ Report inappropriate review button - ⏸️ Report inappropriate review button
⏸️ "Žiadne recenzie" empty state - ⏸️ "Žiadne recenzie" empty state
⏸️ Responzívny dizajn - ⏸️ Responzívny dizajn
### Notifikácie ### Notifikácie
⏸️ Notifikácia pre používateľa pri novej recenzii - ⏸️ Notifikácia pre používateľa pri novej recenzii
⏸️ Email notifikácia o novom hodnotení (optional) - ⏸️ Email notifikácia o novom hodnotení (optional)
### Výsledné funkcie: ### Výsledné funkcie:
⏸️ Rating systém funguje - ⏸️ Rating systém funguje
⏸️ Reviews na profile - ⏸️ Reviews na profile
⏸️ Priemerný rating sa zobrazuje - ⏸️ Priemerný rating sa zobrazuje
⏸️ Report function - ⏸️ Report function
--- ---
@ -576,48 +576,48 @@ aby sme mohli medzi sebou komunikovať
### Tasky: ### Tasky:
### Backend ### Backend
⏸️ Prisma schema: Message model (activity_id, user_id, content, timestamp) - ⏸️ Prisma schema: Message model (activity_id, user_id, content, timestamp)
⏸️ API: GET /api/activities/[id]/messages (s pagination) - ⏸️ API: GET /api/activities/[id]/messages (s pagination)
⏸️ API: POST /api/activities/[id]/messages - ⏸️ API: POST /api/activities/[id]/messages
⏸️ API: DELETE /api/messages/[id] (delete vlastnej správy) - ⏸️ API: DELETE /api/messages/[id] (delete vlastnej správy)
⏸️ Validácia: len pre prihlásených účastníkov - ⏸️ Validácia: len pre prihlásených účastníkov
⏸️ Validácia: max 500 znakov na správu - ⏸️ Validácia: max 500 znakov na správu
⏸️ Real-time setup (Pusher/Ably konfigurácia alebo polling endpoint) - ⏸️ Real-time setup (Pusher/Ably konfigurácia alebo polling endpoint)
⏸️ Unread message tracking (Message.read field) - ⏸️ Unread message tracking (Message.read field)
⏸️ API: PUT /api/messages/mark-read - ⏸️ API: PUT /api/messages/mark-read
### Frontend - Chat UI ### Frontend - Chat UI
⏸️ Chat UI komponenta (sidebar/panel na detaile aktivity) - ⏸️ Chat UI komponenta (sidebar/panel na detaile aktivity)
⏸️ Toggle button na otvorenie/zatvorenie chatu - ⏸️ Toggle button na otvorenie/zatvorenie chatu
⏸️ Message list (scrollable container) - ⏸️ Message list (scrollable container)
⏸️ Message bubble komponenta (left/right podľa odosielateľa) - ⏸️ Message bubble komponenta (left/right podľa odosielateľa)
⏸️ Zobrazenie mena a fotky odosielateľa - ⏸️ Zobrazenie mena a fotky odosielateľa
⏸️ Timestamp pre každú správu (relatívny čas: "5 min ago") - ⏸️ Timestamp pre každú správu (relatívny čas: "5 min ago")
⏸️ Message input field (textarea s auto-resize) - ⏸️ Message input field (textarea s auto-resize)
⏸️ Send button (disabled ak prázdne) - ⏸️ Send button (disabled ak prázdne)
⏸️ Character counter (500/500) - ⏸️ Character counter (500/500)
### Real-time funkcie ### Real-time funkcie
⏸️ Real-time message receiving (Pusher/Ably integration) - ⏸️ Real-time message receiving (Pusher/Ably integration)
⏸️ Auto-scroll na novú správu (smooth scroll) - ⏸️ Auto-scroll na novú správu (smooth scroll)
⏸️ Unread message badge (počet neprečítaných) - ⏸️ Unread message badge (počet neprečítaných)
⏸️ "Typing..." indikátor (optional) - ⏸️ "Typing..." indikátor (optional)
⏸️ Message delivered/read status (optional) - ⏸️ Message delivered/read status (optional)
### UX vylepšenia ### UX vylepšenia
⏸️ Emoji picker (optional - React Emoji Picker) - ⏸️ Emoji picker (optional - React Emoji Picker)
⏸️ Message delete option (len vlastné správy) - ⏸️ Message delete option (len vlastné správy)
⏸️ "Load more" pre staršie správy (pagination) - ⏸️ "Load more" pre staršie správy (pagination)
⏸️ Empty state ("Začnite konverzáciu...") - ⏸️ Empty state ("Začnite konverzáciu...")
⏸️ Loading skeleton pre načítavanie správ - ⏸️ Loading skeleton pre načítavanie správ
⏸️ Error handling (offline, failed send) - ⏸️ Error handling (offline, failed send)
⏸️ Responzívny dizajn (mobile drawer) - ⏸️ Responzívny dizajn (mobile drawer)
### Výsledné funkcie: ### Výsledné funkcie:
⏸️ Chat funguje - ⏸️ Chat funguje
⏸️ Real-time updates - ⏸️ Real-time updates
⏸️ Len pre účastníkov - ⏸️ Len pre účastníkov
⏸️ Message history - ⏸️ Message history
--- ---
@ -633,79 +633,79 @@ aby som rýchlo našiel odpovede na moje otázky o platforme
### Tasky: ### Tasky:
### Backend - AI Infrastructure ### Backend - AI Infrastructure
⏸️ API: POST /api/ai/support-chat - ⏸️ API: POST /api/ai/support-chat
⏸️ OpenAI Assistants API integration - ⏸️ OpenAI Assistants API integration
⏸️ API rate limiting (10 requests/day pre free users) - ⏸️ API rate limiting (10 requests/day pre free users)
⏸️ Token usage tracking a cost monitoring - ⏸️ Token usage tracking a cost monitoring
⏸️ Error handling a fallback responses - ⏸️ Error handling a fallback responses
⏸️ API: GET /api/ai/chat-history (pre daného používateľa) - ⏸️ API: GET /api/ai/chat-history (pre daného používateľa)
⏸️ API: DELETE /api/ai/chat-history (vymazanie histórie) - ⏸️ API: DELETE /api/ai/chat-history (vymazanie histórie)
### RAG Setup (Retrieval Augmented Generation) ### RAG Setup (Retrieval Augmented Generation)
⏸️ Pinecone/Supabase Vector database setup - ⏸️ Pinecone/Supabase Vector database setup
⏸️ Knowledge base creation (FAQ dokumenty) - ⏸️ Knowledge base creation (FAQ dokumenty)
⏸️ Platform guide embeddings (ako používať features) - ⏸️ Platform guide embeddings (ako používať features)
⏸️ FAQ dokumenty embeddings - ⏸️ FAQ dokumenty embeddings
⏸️ Vector search implementation - ⏸️ Vector search implementation
⏸️ Context injection do AI promptu - ⏸️ Context injection do AI promptu
⏸️ Relevance scoring a filtering - ⏸️ Relevance scoring a filtering
### Context-Aware Features ### Context-Aware Features
⏸️ Current page detection (URL tracking) - ⏸️ Current page detection (URL tracking)
⏸️ User profile info injection (ak prihlásený) - ⏸️ User profile info injection (ak prihlásený)
⏸️ Recent user actions tracking (last 5 actions) - ⏸️ Recent user actions tracking (last 5 actions)
⏸️ Dynamic prompt construction based on context - ⏸️ Dynamic prompt construction based on context
⏸️ Session-based conversation memory - ⏸️ Session-based conversation memory
### Frontend - Chat Widget ### Frontend - Chat Widget
⏸️ Floating chat button (bottom right, sticky) - ⏸️ Floating chat button (bottom right, sticky)
⏸️ Badge notification (nová odpoveď) - ⏸️ Badge notification (nová odpoveď)
⏸️ Chat window komponenta (minimize/maximize/close) - ⏸️ Chat window komponenta (minimize/maximize/close)
⏸️ Chat header s titulom a actions - ⏸️ Chat header s titulom a actions
⏸️ Message list (user + AI bubbles) - ⏸️ Message list (user + AI bubbles)
⏸️ Message input field - ⏸️ Message input field
⏸️ Send button - ⏸️ Send button
⏸️ Loading indicator (typing dots) - ⏸️ Loading indicator (typing dots)
⏸️ Scroll to bottom button - ⏸️ Scroll to bottom button
### Quick Actions ### Quick Actions
⏸️ Quick action buttons: "Ako vytvoriť aktivitu?" - ⏸️ Quick action buttons: "Ako vytvoriť aktivitu?"
⏸️ Quick action buttons: "Ako sa prihlásiť?" - ⏸️ Quick action buttons: "Ako sa prihlásiť?"
⏸️ Quick action buttons: "Ako nájsť aktivity?" - ⏸️ Quick action buttons: "Ako nájsť aktivity?"
⏸️ Quick action buttons: "Ako upraviť profil?" - ⏸️ Quick action buttons: "Ako upraviť profil?"
⏸️ Dynamic suggestions based on page - ⏸️ Dynamic suggestions based on page
### Advanced Features ### Advanced Features
⏸️ Chat history persistence (conversation_id v localStorage) - ⏸️ Chat history persistence (conversation_id v localStorage)
⏸️ "Nová konverzácia" button (reset context) - ⏸️ "Nová konverzácia" button (reset context)
⏸️ Escalation to human support button - ⏸️ Escalation to human support button
⏸️ Human support form (meno, email, správa) - ⏸️ Human support form (meno, email, správa)
⏸️ Multilingual support (SK/EN auto-detection) - ⏸️ Multilingual support (SK/EN auto-detection)
⏸️ Copy response button - ⏸️ Copy response button
⏸️ Thumbs up/down feedback - ⏸️ Thumbs up/down feedback
⏸️ "Bolo to užitočné?" feedback - ⏸️ "Bolo to užitočné?" feedback
### Analytics ### Analytics
⏸️ Common questions tracking (analytics dashboard) - ⏸️ Common questions tracking (analytics dashboard)
⏸️ User satisfaction metrics (feedback aggregation) - ⏸️ User satisfaction metrics (feedback aggregation)
⏸️ Response time monitoring - ⏸️ Response time monitoring
⏸️ Escalation rate tracking - ⏸️ Escalation rate tracking
⏸️ Most helpful answers identification - ⏸️ Most helpful answers identification
### UX Polish ### UX Polish
⏸️ Smooth animations (open/close, messages) - ⏸️ Smooth animations (open/close, messages)
⏸️ Typing indicator when AI is responding - ⏸️ Typing indicator when AI is responding
⏸️ Error states ("Niečo sa pokazilo, skúste znova") - ⏸️ Error states ("Niečo sa pokazilo, skúste znova")
⏸️ Offline detection a warning - ⏸️ Offline detection a warning
⏸️ Mobile responsive design - ⏸️ Mobile responsive design
⏸️ Keyboard shortcuts (ESC to close) - ⏸️ Keyboard shortcuts (ESC to close)
⏸️ Welcome message on first open - ⏸️ Welcome message on first open
### Výsledné funkcie: ### Výsledné funkcie:
⏸️ AI chatbot funguje - ⏸️ AI chatbot funguje
⏸️ RAG s knowledge base - ⏸️ RAG s knowledge base
⏸️ Context-aware answers - ⏸️ Context-aware answers
⏸️ Chat history - ⏸️ Chat history
## US-018: AI Matchmaking pre hráčov ## US-018: AI Matchmaking pre hráčov
@ -720,90 +720,91 @@ aby som hral s ľuďmi na mojej úrovni
### Tasky: ### Tasky:
### Backend - Database & Models ### Backend - Database & Models
⏸️ Prisma schema: MatchScore model (user1_id, user2_id, score, factors) - ⏸️ Prisma schema: MatchScore model (user1_id, user2_id, score, factors)
⏸️ Prisma schema: rozšírenie User (playStyle, preferredTimes, skillLevels) - ⏸️ Prisma schema: rozšírenie User (playStyle, preferredTimes, skillLevels)
⏸️ Database indexes pre rýchle vyhľadávanie - ⏸️ Database indexes pre rýchle vyhľadávanie
⏸️ Cache layer pre match scores (Redis - optional) - ⏸️ Cache layer pre match scores (Redis - optional)
### Compatibility Algorithm ### Compatibility Algorithm
⏸️ Skill level matching algorithm (weight: 25%) - ⏸️ Skill level matching algorithm (weight: 25%)
⏸️ Play style preferences matching (competitive/casual) (weight: 20%) - ⏸️ Play style preferences matching (competitive/casual) (weight: 20%)
⏸️ Age group similarity calculation (weight: 15%) - ⏸️ Age group similarity calculation (weight: 15%)
⏸️ Location proximity (Haversine distance) (weight: 20%) - ⏸️ Location proximity (Haversine distance) (weight: 20%)
⏸️ Schedule compatibility analysis (weight: 10%) - ⏸️ Schedule compatibility analysis (weight: 10%)
⏸️ Past activity ratings correlation (weight: 10%) - ⏸️ Past activity ratings correlation (weight: 10%)
⏸️ Sport preferences overlap - ⏸️ Sport preferences overlap
⏸️ Final score calculation (weighted sum 0-100%) - ⏸️ Final score calculation (weighted sum 0-100%)
### AI Integration ### AI Integration
⏸️ OpenAI embeddings generation pre user profiles - ⏸️ OpenAI embeddings generation pre user profiles
⏸️ Vector similarity search (cosine similarity) - ⏸️ Vector similarity search (cosine similarity)
⏸️ Embedding storage (Pinecone/Supabase Vector) - ⏸️ Embedding storage (Pinecone/Supabase Vector)
⏸️ Batch embedding generation (pre existing users) - ⏸️ Batch embedding generation (pre existing users)
⏸️ Incremental embedding updates (pri zmene profilu) - ⏸️ Incremental embedding updates (pri zmene profilu)
⏸️ API: POST /api/ai/match-users - ⏸️ API: POST /api/ai/match-users
### Backend APIs ### Backend APIs
⏸️ API: GET /api/users/matches (top matches pre používateľa) - ⏸️ API: GET /api/users/matches (top matches pre používateľa)
⏸️ API: GET /api/activities/[id]/suggested-users (pre danú aktivitu) - ⏸️ API: GET /api/activities/[id]/suggested-users (pre danú aktivitu)
⏸️ API: POST /api/matches/[userId]/invite (pozvať matched usera) - ⏸️ API: POST /api/matches/[userId]/invite (pozvať matched usera)
⏸️ Match score caching (24h refresh) - ⏸️ Match score caching (24h refresh)
⏸️ Pagination pre match results - ⏸️ Pagination pre match results
⏸️ Filtering options (min score, max distance) - ⏸️ Filtering options (min score, max distance)
### Frontend - Match Discovery ### Frontend - Match Discovery
⏸️ "Nájdi mi spoluhráča" feature page (/find-partners) - ⏸️ "Nájdi mi spoluhráča" feature page (/find-partners)
⏸️ Match score zobrazenie (1-100% progress bar + badge) - ⏸️ Match score zobrazenie (1-100% progress bar + badge)
⏸️ Match card komponenta (avatar, meno, score, factors) - ⏸️ Match card komponenta (avatar, meno, score, factors)
⏸️ Match explanation tooltip: "Podobná úroveň, blízka lokalita..." - ⏸️ Match explanation tooltip: "Podobná úroveň, blízka lokalita..."
⏸️ "Perfect match" badge (90%+ score) - special styling - ⏸️ "Perfect match" badge (90%+ score) - special styling
⏸️ "Good match" badge (70-89%) - ⏸️ "Good match" badge (70-89%)
⏸️ Skill level indicators (beginner/intermediate/advanced) - ⏸️ Skill level indicators (beginner/intermediate/advanced)
### Frontend - Activity Integration ### Frontend - Activity Integration
⏸️ Suggested users section na activity detail - ⏸️ Suggested users section na activity detail
⏸️ "Odporúčaní spoluhráči" widget (top 3) - ⏸️ "Odporúčaní spoluhráči" widget (top 3)
⏸️ Invite matched user button - ⏸️ Invite matched user button
⏸️ Invite modal (personalizovaná správa) - ⏸️ Invite modal (personalizovaná správa)
⏸️ Toast notifikácia po odoslaní pozvánky - ⏸️ Toast notifikácia po odoslaní pozvánky
### Match Breakdown UI ### Match Breakdown UI
⏸️ Expandable match details (klik na match card) - ⏸️ Expandable match details (klik na match card)
⏸️ Factor breakdown visualization: - ⏸️ Factor breakdown visualization:
- ⏸️ Skill level match (progress bar) - ⏸️ Skill level match (progress bar)
- ⏸️ Location proximity (distance in km) - ⏸️ Location proximity (distance in km)
- ⏸️ Schedule compatibility (calendar icon) - ⏸️ Schedule compatibility (calendar icon)
- ⏸️ Play style match (competitive/casual) - ⏸️ Play style match (competitive/casual)
- ⏸️ Common sports (badge list) - ⏸️ Common sports (badge list)
⏸️ "Prečo sme kompatibilní" text explanation (AI-generated) - ⏸️ "Prečo sme kompatibilní" text explanation (AI-generated)
### Email Digest ### Email Digest
⏸️ Weekly "Best matches" email template - ⏸️ Weekly "Best matches" email template
⏸️ Email service integration (SendGrid/Resend) - ⏸️ Email service integration (SendGrid/Resend)
⏸️ Cron job: weekly match calculation a email send - ⏸️ Cron job: weekly match calculation a email send
⏸️ Top 5 matches v emaili - ⏸️ Top 5 matches v emaili
⏸️ CTA button: "Pozri všetky matched" - ⏸️ CTA button: "Pozri všetky matched"
⏸️ Unsubscribe option - ⏸️ Unsubscribe option
### User Preferences ### User Preferences
⏸️ Match preferences page (/profile/match-preferences) - ⏸️ Match preferences page (/profile/match-preferences)
⏸️ Toggle: enable/disable matchmaking - ⏸️ Toggle: enable/disable matchmaking
⏸️ Max distance slider (5-50 km) - ⏸️ Max distance slider (5-50 km)
⏸️ Preferred age range - ⏸️ Preferred age range
⏸️ Play style preference (competitive/casual/both) - ⏸️ Play style preference (competitive/casual/both)
⏸️ Notification frequency (instant/weekly/never) - ⏸️ Notification frequency (instant/weekly/never)
### Analytics & Optimization ### Analytics & Optimization
⏸️ Match success tracking (koľko invites accepted) - ⏸️ Match success tracking (koľko invites accepted)
⏸️ Algorithm performance monitoring - ⏸️ Algorithm performance monitoring
⏸️ A/B testing framework (different weight combinations) - ⏸️ A/B testing framework (different weight combinations)
⏸️ User feedback collection ("Bol toto dobrý match?") - ⏸️ User feedback collection ("Bol toto dobrý match?")
### Výsledné funkcie: ### Výsledné funkcie:
⏸️ Matchmaking algorithm - ⏸️ Matchmaking algorithm
⏸️ Compatibility scores - ⏸️ Compatibility scores
⏸️ User suggestions - ⏸️ User suggestions
⏸️ Weekly digest - ⏸️ Weekly digest
--- ---