Commit Graph

322 Commits

Author SHA1 Message Date
8c9d95cca9 refactor: Update tagline from "Katalog Firm Członkowskich" to "Platforma Networkingu"
Changed branding across the application:
- email_service.py: Updated footers in password reset and welcome emails
- base.html: Updated meta description and footer text
- landing.html: Updated page title

New tagline: "Platforma Networkingu Regionalnej Izby Przedsiębiorców Norda Biznes"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 11:35:58 +01:00
fdeb9ffd19 fix: Polish diacritics and header contrast in email templates
- Added proper Polish characters (ą, ę, ó, ł, ś, ć, ż, ź, ń)
- Improved header contrast with darker gradient and text-shadow
- Added meta charset UTF-8 for proper encoding
- Fixed warning box text color for better readability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 11:15:38 +01:00
c1874b73e6 fix: Change email sender display name to "Norda Biznes Hub"
Previously showed "InPi Notifications" which was confusing.
Now emails will display as "Norda Biznes Hub <noreply@inpi.pl>"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 09:46:26 +01:00
a09203ef55 feat: Add email logging and monitoring system
- Add EmailLog model to database.py for tracking sent emails
- Modify email_service.py to log all sent emails to database
- Track email type (welcome, password_reset, notification)
- Record sender, recipient, subject, status, timestamps
- Supports monitoring email delivery success/failure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 09:26:48 +01:00
749abfa018 fix: Use category_id instead of category relationship in report
- Company.category is a relationship, not a column
- Use Company.category_id for grouping and filtering
- Load category names via separate query to Category table

Fixes 500 error on /raporty/struktura-branzowa

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:30:35 +01:00
14e969bc6d fix: Fix AttributeError in report_categories
- Add .label('category') to SQLAlchemy query for proper Row attribute access
- Change filter_by to filter() for better NULL handling

Fixes 500 error on /raporty/struktura-branzowa

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:29:00 +01:00
2f37267475 feat: Update footer with INPI branding
- Add INPI logo with link to inpi.pl
- Change copyright to INPI as creator
- Update contact email to maciej.pienczyn@inpi.pl
- Add WhatsApp contact link
- Make phone and email clickable (tel:/mailto:)
- Add CSS styles for footer creator section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:23:43 +01:00
4c70a5b5ce refactor: Rebrand "Chat AI" to "NordaGPT" across UI
- Changed all "Chat AI" labels to "NordaGPT" in navigation menus
- Updated dashboard quick links
- NordaGPT is now the official product name for AI assistant

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:20:29 +01:00
fc8e3acb51 fix: Properly render markdown links in chat messages
- Added regex to convert [text](url) markdown links to <a> tags
- Updated raw URL regex with lookbehind/lookahead to avoid duplicate links
- Links now display as clickable text instead of raw markdown syntax

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:18:43 +01:00
978c0714d5 feat: Add detailed rate limits and comparison info to model info modal
- Added RPM (15 req/min), TPM (250k tokens/min) to specs table
- Added Thinking mode status (Full vs Experimental)
- Added green "↑ było X" badges showing improvements
- Updated benefits section with concrete before/after numbers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:16:54 +01:00
c06df1f69a feat: Upgrade NordaGPT to Gemini 2.5 Flash-Lite + add model info modal
- Changed AI model from Gemini 2.0 Flash to Gemini 2.5 Flash-Lite
- Added info button next to model badge in chat header
- Created modal with technical specs and development history timeline
- Benefits: 8x longer responses (65k tokens), 4x daily limit (1000 RPD)
- Model remains FREE (Free Tier)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:09:04 +01:00
c16fe79724 fix: Dodano @csrf.exempt do API endpointów chatu
Endpointy /api/chat/start i /api/chat/{id}/message
wymagały tokenu CSRF, co blokowało żądania z JavaScript.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:55:36 +01:00
17d89e6296 feat: Banner NordaGPT na stronie głównej prowadzi do /chat
Zamiast otwierać modal, kliknięcie w banner NordaGPT
przenosi bezpośrednio do strony /chat z historią rozmów.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:49:31 +01:00
ed5ed1c7e9 fix: Naprawiono błąd JS przy ładowaniu historii konwersacji
Element emptyState może nie istnieć po załadowaniu poprzedniej rozmowy.
Dodano sprawdzenie if (emptyState) przed ustawieniem style.display.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:45:21 +01:00
26e17ba1e3 fix: Naprawiono błąd w API konwersacji (started_at zamiast created_at)
Model AIChatConversation używa started_at, nie created_at.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:42:19 +01:00
80c0b0005c feat: Historia konwersacji NordaGPT z sidebare'em
- Dodano API /api/chat/conversations (lista konwersacji użytkownika)
- Dodano API DELETE /api/chat/<id>/delete (usuwanie konwersacji)
- Przebudowano chat.html z sidebarem historii (styl ChatGPT)
- Sidebar z listą konwersacji, przyciski "Nowa rozmowa" i usuwania
- Responsywny design dla mobile (toggle sidebar)
- Integracja ze stylem NordaGPT (purple gradient header)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:39:36 +01:00
54f5b12d3f fix: Poprawne wyświetlanie kategorii w raporcie stażu
Zmieniono company.category na company.category.name
(category to relacja do obiektu Category, nie string)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:31:59 +01:00
6648cce3f4 fix: Naprawiono błąd 500 w raportach - url_for z company_id
Zmieniono url_for('company_detail', slug=...) na
url_for('company_detail', company_id=...) we wszystkich raportach.

Route company_detail wymaga company_id, nie slug.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:28:09 +01:00
1b6e698d87 feat: Nowa sekcja Raporty w menu głównym
- Dodano link Raporty w menu nawigacyjnym (dla zalogowanych)
- Utworzono 3 raporty generowane w czasie rzeczywistym:
  - Staż członkostwa w Izbie NORDA
  - Pokrycie Social Media (6 platform)
  - Struktura branżowa (kategorie firm)
- Dodano dokumentację strategii monetyzacji 3-tier pricing
- Release notes v1.18.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:25:57 +01:00
3c1e05baf5 feat: Add source info to member_since card
- Changed card color from blue to green (#10b981)
- Added "Źródło: Izba NORDA" text below years count
- Consistent styling with other legal info cards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:06:36 +01:00
8f1a7d6706 feat: Add release notes v1.17.0 for member_since feature
- Data przystąpienia do Izby NORDA (member_since)
- Karta "Członek Izby NORDA od" z datą i stażem w latach
- Import 57 firm z historią od 1997 roku

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 06:59:52 +01:00
3221740502 feat: Dodanie daty przystąpienia do Izby NORDA na profilu firmy
- Nowa kolumna member_since w tabeli companies
- Karta "Członek Izby NORDA od" na profilu firmy (niebieski kolor #3b82f6)
- Wyświetlanie liczby lat w Izbie
- Import 57 dat przystąpienia z pliku Excel od Artura
- Skrypt import_member_since.py do importu dat

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 06:57:00 +01:00
c1e770f806 fix: Rozdzielenie release notes na v1.15.0 (13.01) i v1.16.0 (14.01) 2026-01-14 06:38:48 +01:00
3c5b7f3d72 fix: Polskie znaki i unikalna klasa CSS dla nazw użytkowników w Analytics 2026-01-14 06:30:49 +01:00
95b7aedcf3 fix: Poprawiono wyświetlanie pełnych nazw użytkowników w Analytics (word-wrap) 2026-01-14 06:26:04 +01:00
85231ad299 fix: Zwiększono szerokość kolumny użytkownika w Analytics (280px) 2026-01-14 06:23:50 +01:00
028dfb3f05 fix: Naprawiono ucinanie nazw użytkowników w Analytics 2026-01-14 06:20:30 +01:00
5cc3d291ff fix: Naprawiono błąd dzielenia None w analityce użytkowników 2026-01-14 06:00:07 +01:00
d82dc0caec feat: Add user edit functionality in admin panel
- Add /admin/users/<id>/update endpoint to update name, email, phone
- Add edit button with pencil icon to users table
- Add edit modal with form fields
- Add JavaScript functions for edit modal handling
2026-01-13 21:17:34 +01:00
6b7046bf49 feat: Add user analytics link to admin menu 2026-01-13 19:47:42 +01:00
f3433d28f5 fix: Add CSRF exempt for analytics API endpoints 2026-01-13 19:46:29 +01:00
986fa457cc fix: Correct redirect endpoint in analytics error handler 2026-01-13 19:43:26 +01:00
cddbf11e3b fix: Correct back link endpoint in analytics dashboard 2026-01-13 19:42:32 +01:00
a148d464af feat: Add user analytics panel (/admin/analytics)
- Track user sessions, page views, clicks
- Measure engagement score and session duration
- Device breakdown (desktop/mobile/tablet)
- User rankings by activity
- Popular pages statistics
- Recent sessions feed
- SQL migration for analytics tables
- JavaScript tracker for frontend events

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:40:37 +01:00
847ec1f12f fix: Correct JSON path for SEO audit scores in batch progress
Frontend was reading data.data.seo_score but API returns
data.seo_audit.pagespeed.seo_score. Fixed path to show
actual scores instead of dashes in batch audit progress.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:07:19 +01:00
ab668acf84 fix: Increase SEO audit rate limit from 10/hour to 200/hour
Batch SEO audit was stopping after 10 companies due to
restrictive rate limit. Increased to 200/hour to allow
full batch processing of all companies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:00:53 +01:00
feb57e001b fix: Increase login rate limit from 5/hour to 30/minute - critical fix for user access 2026-01-13 18:52:35 +01:00
153b0489d8 debug: Add permission check logging for AI enrichment 2026-01-13 18:48:01 +01:00
cf31842287 feat: Add web search to AI enrichment
- Search Brave API for company news and web results
- Fetch company website content with BeautifulSoup
- Combine all sources (database, Brave, website) in AI prompt
- Return source usage info in API response
2026-01-13 18:36:52 +01:00
fdbe2d461b fix: Add missing time module import for AI enrichment 2026-01-13 18:32:41 +01:00
be57f1ba04 fix: Remove non-existent Company attributes (keywords, usp, values)
- keywords, usp fields don't exist in Company model
- values -> core_values
2026-01-13 18:30:36 +01:00
a4515aca74 fix: Correct Company model attribute names in AI enrichment endpoint
- services_text -> services relationship or services_offered
- competencies_text -> competencies relationship
- pkd_text -> pkd_description
- certifications field properly handled as relationship
2026-01-13 18:28:48 +01:00
59c50e0267 fix: Handle None values in SEO audit result extraction
Bug: When page fetch fails (SSL error), result['onpage'] is None.
Using dict.get('key', {}) returns None when key exists with None value.

Fix: Use 'or {}' pattern to handle both missing keys and None values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:20:19 +01:00
d722fdb71e feat: Add detailed progress modal for AI enrichment
- New modal with animated progress bar and percentage
- Step-by-step log showing:
  - Initialization
  - Data collection
  - AI prompt preparation
  - Gemini API call
  - Response parsing
  - Results summary (services, USPs, tags, etc.)
- Cancel button with AbortController support
- Success/error states with appropriate icons
- Footer with "Close" and "Refresh page" buttons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:12:04 +01:00
35d53665e3 feat: Add AI enrichment button on company profile
- Add "Wzbogac dane AI" button visible to all users
- Button enabled only for admins and company owners
- New API endpoint POST /api/company/<id>/enrich-ai
- Integrates with Gemini AI to generate:
  - Business summary
  - Services list
  - Target market
  - Unique selling points
  - Company values
  - Certifications
  - Industry tags
- Rate limited to 5 requests/hour per user
- Results saved to CompanyAIInsights table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:07:52 +01:00
a916b297c7 feat: Add progress bar for batch SEO audit
- Progress section with bar and percentage
- Real-time log showing each company being processed
- Score display with color indicators (🟢🟡🔴)
- Cancel button to stop audit mid-process
- Summary at the end with success/failed/skipped counts
- 500ms delay between requests to avoid API overload

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:55:17 +01:00
0d2b26031d fix: Extract all PKD codes from KRS PDF (not just main one)
- Rewrite PKD extraction to find all codes in the section
- Primary regex finds PKD section first, then extracts codes
- Fallback regex for edge cases
- Deduplicate PKD codes (same code may appear in different 'wpis')
- Clean up multi-line descriptions
- LENAP now shows 33 PKD codes (was showing only 1)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:51:31 +01:00
5ded53a2c0 feat: Display all PKD codes on company detail page
- Show all PKD codes from KRS audit (not just main one)
- Primary PKD highlighted with 'GŁÓWNY' badge
- Secondary PKDs listed below with descriptions
- Fallback to CEIDG data if no KRS audit data
- Shows source (eKRS or CEIDG) and total count

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:46:35 +01:00
4e4b3f4ef0 feat: Add sortable columns and PKD display in KRS Audit panel
- All columns now sortable (click header to sort asc/desc)
- PKD codes displayed with primary code highlighted (★)
- Show first 2 PKD codes, click '+N more' for tooltip with all
- Backend returns full PKD codes list instead of just count

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:28:09 +01:00
bd23238c1a fix: Increase rate limit and add missing fields to KRS audit API
- Increase rate limit from 20/hour to 200/hour for batch operations
- Add nip, regon, liczba_udzialow, prokurenci_count to API response

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:16:16 +01:00