Commit Graph

584 Commits

Author SHA1 Message Date
55718ed211 refactor: Extract chat blueprint (Phase 5)
- Create blueprints/chat/ with 9 routes:
  - chat, chat_settings, chat_start, chat_send_message
  - chat_get_history, chat_list_conversations, chat_delete_conversation
  - chat_feedback, chat_analytics
- Register chat blueprint with backward-compatible aliases
- Remove dead code from app.py (-458 lines)
- app.py: 13,058 → 12,600 lines (-3.5%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:54:08 +01:00
0f482cc4aa refactor: Extract messages + notifications blueprint (Phase 4)
- Create blueprints/messages/ with 11 routes:
  - messages_inbox, messages_sent, messages_new, messages_send
  - messages_view, messages_reply, api_unread_count
  - api_notifications, api_notification_mark_read
  - api_notifications_mark_all_read, api_notifications_unread_count
- Register messages blueprint with backward-compatible aliases
- Remove dead code from app.py (-340 lines)
- app.py: 13,398 → 13,058 lines (-2.5%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:47:55 +01:00
ad2262388b refactor: Extract forum blueprint (Phase 3)
- Create blueprints/forum/ with 10 routes:
  - forum_index, forum_new_topic, forum_topic, forum_reply
  - admin_forum, admin_forum_pin, admin_forum_lock
  - admin_forum_delete_topic, admin_forum_delete_reply
  - admin_forum_change_status
- Register forum blueprint with backward-compatible aliases
- Remove dead code from app.py (-422 lines)
- app.py: 13,820 → 13,398 lines (-3.1%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:42:18 +01:00
e06d3b172d docs: Mark Phase 2a as deployed to production
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:34:37 +01:00
0ccb1093b8 docs: Update refactoring status after Phase 2a completion
- Phase 2a marked as complete (DEV ready)
- Updated metrics: 15,577 → 13,820 lines (-11.3%)
- Documented Alias Bridge methodology
- Updated harmonogram

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:30:31 +01:00
cdd050a0ef refactor(phase2a): Cleanup dead code after blueprint migration
Removed 31 _old_ functions from app.py that were migrated to blueprints.

Stats:
- Lines removed: 1,757 (11.3% reduction)
- app.py: 15,577 → 13,820 lines

All endpoints tested and working:
- Public: /, /login, /register, /health, /release-notes
- Protected: /dashboard, /search, /kalendarz/, /chat
- Aliases: url_for('login') = url_for('auth.login')

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:29:31 +01:00
d5adf029aa refactor(phase2a): Extract auth + public blueprints with Alias Bridge
Phase 2a of modular monolith refactoring:

New blueprints:
- blueprints/auth/routes.py (1,040 lines, 20 routes)
  - login, logout, register, verify_2fa, settings_2fa
  - forgot_password, reset_password, verify_email
  - konto_dane, konto_prywatnosc, konto_bezpieczenstwo, konto_blokady
- blueprints/public/routes.py (862 lines, 11 routes)
  - index, company_detail, person_detail, search
  - dashboard, events, new_members, release_notes

Alias Bridge strategy:
- Both url_for('login') and url_for('auth.login') work
- Templates don't require changes (backward compatible)
- Original routes in app.py marked with _old_ prefix (dead code)

Next step: Cleanup dead code from app.py after production verification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:28:18 +01:00
9c39ff06ba docs: Strategia Alias Bridge dla bezpiecznego wdrożenia Fazy 2
Odkrycie: Flask pozwala zarejestrować ten sam URL pod dwoma nazwami
- url_for('login') i url_for('auth.login') mogą współistnieć
- Zero zmian w szablonach podczas wdrożenia blueprintów

Strategia 3 podfaz:
- Faza 2a: Blueprinty + aliasy (niskie ryzyko)
- Faza 2b: Stopniowa migracja szablonów
- Faza 2c: Usunięcie aliasów

Porównanie z Big Bang: 20 vs 125 plików do zmiany naraz

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 06:54:56 +01:00
d6d5fa07f2 docs: Analiza zależności między modułami refaktoryzacji
- Dodano graf zależności (auth + public muszą być razem)
- utils/decorators.py wymaga url_for('auth.login') i url_for('public.index')
- Faza 2 jest krytyczna - blokuje wszystkie kolejne fazy
- Zaktualizowano harmonogram z kolumną zależności

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 06:44:57 +01:00
50a549c3ff docs: Plan refaktoryzacji - Modularny Monolit (10 faz)
- Szczegółowy plan wydzielenia 235 routes do ~25 blueprintów
- Kategoryzacja routes według modułów
- Harmonogram 10 faz (~33h pracy)
- Docelowa struktura katalogów
- Zasady refaktoryzacji i procedury wdrożenia

Cel: Redukcja app.py z 15,570 → ~500 linii

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 06:40:49 +01:00
aea65b0bad docs: Aktualizacja statusu refaktoringu - Faza 1 wdrożona
- Status Fazy 1 zmieniony na "WDROŻONA NA PRODUKCJĘ"
- Dodano datę wdrożenia (2026-01-28)
- Usunięto nieaktualną blokadę wdrożeń
- Zaktualizowano harmonogram z checkboxami statusu

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 06:27:06 +01:00
2158c409a6 fix: Powiadomienia znikają po przeczytaniu
- Lista pokazuje tylko nieprzeczytane (unread_only=true)
- Po kliknięciu powiadomienie znika z animacją
- "Oznacz wszystkie" usuwa wszystkie z listy
- Animacja fadeOut dla płynnego usuwania

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:43:26 +01:00
69c0d7fc72 style: Ładny modal potwierdzenia w release notes
- Modal z ikoną dzwoneczka zamiast natywnego confirm()
- Toast zamiast alert() dla wyników
- Informacja o działaniu powiadomień

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:39:07 +01:00
85cb5f14e0 docs: Release notes v1.21.0 - zmiany z 30 stycznia 2026
- Moje konto: nowa sekcja ustawień
- Forum/B2B: panel moderacji dla admina
- Reset hasła: auto-weryfikacja emaila
- UX: ikonka oka, ładne modale

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:36:24 +01:00
4ac2fd93e4 fix: Usunięto placeholder video "Jak korzystać z NordaGPT" z Akademii
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:35:01 +01:00
e6acc2ec6f feat: Dodano moderację tablicy B2B dla administratora
- Przycisk usuwania ogłoszenia z potwierdzeniem
- Przycisk aktywacji/dezaktywacji ogłoszenia
- Endpointy: /delete, /toggle-active
- Badge "Nieaktywne" dla dezaktywowanych ogłoszeń

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:31:37 +01:00
8bcb339bff style: Ładny modal potwierdzenia zamiast natywnego confirm()
- Niestandardowy modal z ikoną i animacją
- Przycisk Anuluj i Usuń
- Zamykanie przez klik na overlay lub Escape

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:27:49 +01:00
07358199ea feat: Dodano przyciski administracyjne do forum (usuń, przypnij, zablokuj)
- Przycisk usuwania wątku z potwierdzeniem
- Przycisk usuwania odpowiedzi
- Przyciski przypinania/odpinania wątku
- Przyciski blokowania/odblokowywania wątku
- Widoczne tylko dla administratorów

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:24:27 +01:00
1cd37339a9 fix: Poprawiono nazwę "Norda Biznes Partner" na stronie rejestracji
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:01:37 +01:00
1c5b2e705e feat: Dodano toggle widoczności hasła (ikonka 👁️) do formularzy
- login.html: toggle dla pola hasła
- register.html: toggle dla pól hasło i potwierdzenie
- reset_password.html: toggle dla pól hasło i potwierdzenie

Feedback: "Brak podglądu hasła"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:59:56 +01:00
9e37d9de57 fix: Use correct endpoint company_detail_by_slug in konto/dane.html
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:54:19 +01:00
412745c875 feat: Add unified "Moje konto" (My Account) section
New user account management section with:
- /konto - Edit personal data (name, phone)
- /konto/prywatnosc - Privacy settings
- /konto/bezpieczenstwo - Security settings (2FA, password)
- /konto/blokady - User blocks management

Features:
- Consistent sidebar navigation across all pages
- Responsive layout (mobile-friendly)
- Polish UI with clear section names

Replaces scattered /settings/* routes with unified /konto/* structure.
Menu link updated from "Ustawienia" to "Moje konto".

Fixes user feedback issue #6: "Brak edycji profilu"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:52:00 +01:00
7c6379c815 fix: Auto-verify email on password reset
When user resets password, they've proven inbox access by clicking
the reset link. This change auto-verifies their email address,
eliminating the need to separately verify email after reset.

Fixes user feedback issue #2: "Reset hasła nie weryfikuje emaila"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:41:05 +01:00
3b55e14e67 fix: Poprawiona składnia rate limiter (semicolon zamiast przecinka)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:25:24 +01:00
c5b7930cef fix: Zwiększone limity rate limiting dla lepszego UX
Poprzednie limity (5/h) blokowały użytkowników po kilku próbach.
Nowe limity:
- Default: 1000/dzień, 200/h (było 200/dzień, 50/h)
- /register: 50/h + 200/dzień (było 5/h)
- /login: 60/min + 500/h (było 30/min)
- /forgot-password: 20/h (było 5/h)
- /reset-password: 30/h (było 10/h)
- /resend-verification: 15/h (było 5/h)

Feedback od: Łukasz Gilewicz, Arturo, Jarek BIS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:22:54 +01:00
4c728778c6 fix: Naprawiono brak duration_seconds w sesjach użytkowników
Problem: get_or_create_analytics_session() aktualizowało last_activity_at
ale nie duration_seconds, co powodowało że czas sesji zawsze wynosił 0 min.

Rozwiązanie: Dodano obliczanie duration_seconds przy każdym page view.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:00:16 +01:00
0055857df4 feat: Rozbudowa systemu analityki użytkowników
Nowe funkcjonalności:
- GeoIP enrichment (kraj, miasto, region)
- UTM parameters tracking (source, medium, campaign, term, content)
- Bounce rate calculation
- Search queries logging
- Conversion tracking (register, login, contact_click, rsvp)
- Scroll depth tracking (25%, 50%, 75%, 100%)
- JS error tracking (window.onerror)
- Performance metrics (Web Vitals)
- CSV export (sessions, pageviews, searches, conversions)

Nowe tabele SQL:
- search_queries
- conversion_events
- js_errors
- popular_searches_daily
- hourly_activity

Dashboard rozszerzony o nowe sekcje i metryki.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:52:18 +01:00
64583b6ec4 style: Karty firm i tagi zgodne ze źródłem (Sprint 6)
Zmiany:
- Karty firm: border-radius 8px → 0 (ostre rogi)
- Karty firm: border #e0e4eb → #E4E4E4
- Tagi kategorii: niebieski bg → szary (#EDF0F5)
- Tagi kategorii: biały tekst → ciemny (#464646)
- Text primary: #1e293b → #303030
- Text secondary: #64748b → #464646

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:57:56 +01:00
ede9d0957b feat: Landing page - nowy gradient i animacje (Sprint 5)
Zmiany:
- Hero gradient: #1e40af/#2563eb → #1e3050/#2E4872/#4a6999
- Accent color w tekście: #2563eb → #2E4872
- Animacje: hero fadeIn, stats fadeInUp, CTA fadeInUp

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:49:26 +01:00
6e1c46e13c feat: Animacje scroll z IntersectionObserver (Sprint 4)
Dodano system animacji fadeIn przy scrollowaniu:
- CSS keyframes: fadeIn, fadeInLeft, fadeInRight, fadeInUp, scaleIn
- IntersectionObserver w static/js/scroll-animations.js
- Event banner: data-animate="fadeIn"
- Chat banner: data-animate="fadeIn"
- Company cards: data-animate="fadeInUp" z delay stagger
- Search section: data-animate="fadeIn"
- Wsparcie dla prefers-reduced-motion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:43:30 +01:00
b680e3f61c style: Sprint 3 - Chat page + Fluent CSS niebieski primary
Zmiany graficzne:
- chat.html: wszystkie #7c3aed → #2E4872
- chat.html: wszystkie #5b21b6 → #1e3050
- fluent-nordabiz.css: zmienne Fluent na NordaBiz blue
- Sidebar, header, avatary, input focus, send button - niebieski

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:21:19 +01:00
1da42f25ad style: Sprint 2 - Event/Chat banners blue, company cards border
Zmiany graficzne (kontynuacja planu norda-biznes.info):
- Event banner: #f59e0b → #2E4872 (niebieski primary)
- NordaGPT banner: #7c3aed → #2E4872 (niebieski primary)
- Karty firm: usunięcie box-shadow, dodanie border 1px
- Karty firm hover: border-color primary zamiast translateY
- Tagi kategorii: uppercase, biały na primary, letter-spacing
- Przyciski w bannerach: asymetryczny border-radius

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:19:57 +01:00
de46e12b7c style: Sprint 1 - Poppins font, #2E4872 colors, asymmetric buttons
Zmiany graficzne wg planu norda-biznes.info:
- Czcionka: Inter → Poppins
- Primary color: #2563eb → #2E4872
- Background: #f8fafc → #EDF0F5
- Border-radius przycisków: 8px → 12px 4px (asymetryczny)
- Header: usunięcie border-bottom, subtelniejszy cień
- Footer: #1e293b → #2E4872, padding 60px/30px

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:17:27 +01:00
d9f32b7235 docs: Dodanie powiadomień email do release notes v1.20.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:12:11 +01:00
7b0b41bac1 feat: Powiadomienie email o nowej rejestracji użytkownika
- Dodano send_registration_notification() analogicznie do send_error_notification()
- Mail wysyłany na ERROR_NOTIFY_EMAIL przy każdej nowej rejestracji
- Zawiera: imię, email, NIP, nazwa firmy, status członkostwa NORDA
- Link do panelu /admin/users

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:53:29 +01:00
228907ca90 security: Blokada odpowiedzi AI na pytania o PESEL i dane wrażliwe
- Dodano sekcję DANE WRAŻLIWE do system prompt
- AI odmówi odpowiedzi na pytania o PESEL, dowody, paszporty, karty
- Instrukcja: 'Przepraszam, nie mogę podawać informacji o numerach PESEL'
- Zapobiega halucynacjom AI łączącym zamaskowane dane z osobami z bazy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:45:27 +01:00
e92b237fa4 docs: Reorganizacja release notes - sortowanie i wytłuszczanie
- Wszystkie release notes od v1.0.0 do v1.20.0 posortowane od najważniejszych
- Mega ważne funkcje wytłuszczone <strong>
- Dodano sekcję security w szablonie
- Stworzono przewodnik RELEASE_NOTES_GUIDE.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:36:11 +01:00
74995f9b3e docs: Aktualizacja notatek o PWA, Gemini 3 i dwa modele AI
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:31:36 +01:00
615665c4a1 docs: Dodanie PWA i dwóch modeli AI do release notes v1.20.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:30:17 +01:00
411fd0f0fb docs: Dodanie upgrade Gemini 3 do release notes v1.20.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:29:18 +01:00
aa026eecfc docs: Historia zmian v1.20.0 (29 stycznia 2026)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:27:53 +01:00
13dd85142f docs: Notatki z prac 2026-01-29
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:26:56 +01:00
25702a808a fix: Użycie operatora @> dla PostgreSQL ARRAY contains
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:23:27 +01:00
624941114a fix: Poprawka składni SQLAlchemy dla ARRAY contains
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:21:27 +01:00
0db3cbc754 feat(announcements): Obsługa wielu kategorii dla ogłoszeń
- Zmiana formularza z select na checkboxy (wiele kategorii)
- Aktualizacja filtrowania: PostgreSQL ANY() dla tablicy categories
- Zachowanie kompatybilności wstecznej (pole category)
- Aktualizacja szablonów list.html i detail.html dla wielu badge'ów

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:19:51 +01:00
f5050b92cc feat(announcements): Obsługa wielu kategorii dla aktualności
- Dodanie kolumny categories (ARRAY) do tabeli announcements
- Nowe metody: categories_labels, has_category()
- Migracja 029: dodanie kolumny i mapowanie danych
- Zachowanie kompatybilności wstecznej z polem category

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:14:15 +01:00
53e6d14bdd fix(footer): Usunięcie linku 'Nowi członkowie' ze stopki
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:11:42 +01:00
dbf55d02cb feat(announcements): Reorganizacja kategorii aktualności
- Zmiana 'general'/'member_news' na 'internal'/'external'
- Kategorie: Wewnętrzne, Zewnętrzne, Wydarzenie, Okazja biznesowa, Partnerstwo
- Polskie znaki w tytułach i meta description
- "Aktualności Norda Biznes Partner"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:10:39 +01:00
1eb1d26772 fix(ui): Zmiana etykiety 'Od członka' na 'Od firm'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:05:00 +01:00
52abe33dd1 feat(education): Integracja wideo z Platformą Edukacyjną
- Dodano 2 filmy: zajawka 30s i tutorial 2min
- Modal z odtwarzaczem wideo (klik na kartę)
- Badge "Nowe" dla dostępnych materiałów
- Podgląd pierwszej klatki wideo
- Obsługa klawisza Escape do zamknięcia

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:53:15 +01:00