Commit Graph

1998 Commits

Author SHA1 Message Date
3acbc53b87 fix: Health check - INPI, Waterm + 3 random companies
- Always check INPI and Waterm profiles (fixed)
- Add 3 random company profiles each refresh
- Total 5 company profiles tested for better coverage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 04:12:22 +01:00
54b3b94482 feat: Add graphical Health Check dashboard
- Add /admin/health route with visual status indicators
- Create health_dashboard.html with category-based endpoint cards
- Color-coded status: green (OK), yellow (warning), red (error)
- Show response times with color indicators (fast/medium/slow)
- Add HTTP status code legend
- Auto-refresh every 2 minutes
- Add link in admin navigation menu
- Categories: public pages, auth, API, admin panel, company profiles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:56:43 +01:00
23f109db2c fix: Update technology stack with verified versions only
- Verify all software versions via SSH (NORDABIZ-01, R11-REVPROXY-01, Proxmox)
- Remove Redis (not used), Gunicorn (app runs directly via python)
- Add PostgreSQL version dynamic fetch from database
- Add Docker version for R11-REVPROXY-01
- Update all package versions to verified values
- Handle unknown versions (Fortigate) with yellow "nieznana" badge
- Add comment with verification date (2026-01-14)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:48:21 +01:00
38682bf808 fix: Correct admin calendar path in health check (/admin/kalendarz)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:39:03 +01:00
03bd90f33b feat: Add system status dashboard with tech stack visualization
- Add /admin/status route with real-time system metrics (CPU, RAM, disk)
- Add /api/admin/status API endpoint for auto-refresh
- Add technology stack section showing all platform technologies
- Add auto-refresh (5 min) to GeoIP stats in security dashboard
- Add "Status systemu" link to admin navigation menu
- Fix /health/full endpoint list (remove non-existent endpoints)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:35:25 +01:00
8ed3724970 feat: Add extended health check endpoint /health/full
- Checks 14 critical endpoints (public + admin pages)
- Returns JSON with pass/fail status for each endpoint
- HTTP 200 if all OK, HTTP 503 if any failures
- Useful for deployment verification and monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:25:13 +01:00
9fdcee35d0 fix: Fix alert_breakdown sum in security dashboard template
Changed from sum(attribute='value') to values()|sum for dict type

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:23:02 +01:00
6402ff7f0e docs: Update release notes and CLAUDE.md with security features
- Add GeoIP blocking, security panel, and stats to v1.16.0 release notes
- Add comprehensive security mechanisms table to CLAUDE.md
- Document GeoIP configuration and MaxMind setup
- List all 12 security mechanisms with star ratings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:20:32 +01:00
e9e37796c7 feat: Add security mechanisms list and GeoIP stats to admin dashboard
- New 'Mechanisms' tab listing all security features with star ratings (5★=critical)
- New 'GeoIP' tab with blocking statistics (daily/monthly/yearly/total)
- Country breakdown with flags for blocked connections
- Status indicators for each security mechanism

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:16:33 +01:00
341ce29aa9 fix: Use lazy loading for GeoIP config to respect load_dotenv timing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:13:49 +01:00
cb574851cf feat: Add GeoIP blocking for high-risk countries (RU, CN, KP, IR, BY, SY, VE, CU)
- Update security_service.py with BLOCKED_COUNTRIES list
- Add check_geoip() middleware in app.py
- Log blocked attempts with security alerts
- Uses MaxMind GeoLite2-Country database

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 22:11:53 +01:00
1a06b6ab29 feat: Add security dashboard link to admin menu 2026-01-14 21:45:05 +01:00
cfdcfea093 fix: Remove duplicate CSRF input in 2fa_settings.html
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:41:01 +01:00
6ec830fabc fix: CSRF token in 2FA templates
Changed {{ csrf_token() }} to proper hidden input field.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:35:19 +01:00
0dba52e9c4 feat: Add security features - 2FA, audit log, alerting
Security enhancements:
- Two-Factor Authentication (TOTP) for all users
  - Enable/disable 2FA in settings
  - Backup codes for recovery
  - Login flow with 2FA verification
- Audit log for admin actions
  - Track all sensitive operations
  - IP address and user agent logging
- Security alerts system
  - Alert types: brute_force, honeypot_hit, account_locked, geo_blocked
  - Email notifications for high/critical alerts
  - Dashboard for alert management
- Admin security dashboard (/admin/security)
  - View/acknowledge/resolve alerts
  - Unlock locked accounts
  - 2FA status overview

New files:
- security_service.py: Security utilities
- templates/auth/verify_2fa.html
- templates/auth/2fa_settings.html
- templates/auth/2fa_setup.html
- templates/auth/2fa_backup_codes.html
- templates/admin/security_dashboard.html

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:23:27 +01:00
7226e098f6 feat: Honeypot endpoints for malicious bot detection
- Trap URLs: /wp-admin, /phpmyadmin, /.env, /.git/config, etc.
- Log to security.log for fail2ban integration
- Instant 24h ban via fail2ban after 1 hit
2026-01-14 21:13:05 +01:00
10dcbde7a8 feat: Account lockout after 5 failed login attempts
- Lock account for 30 minutes after 5 failed attempts
- Reset counter on successful login
- Log ACCOUNT_LOCKED events to security log
2026-01-14 21:11:33 +01:00
2efad9ba82 feat: Use Redis for rate limiter storage (persistent limits) 2026-01-14 21:08:48 +01:00
b6c58c9312 feat: Add security logger for fail2ban integration
- Security events logged to /var/log/nordabiznes/security.log
- Failed login attempts include IP address
- Format compatible with fail2ban filter
2026-01-14 21:07:09 +01:00
af3ba43c89 feat: Dynamic stats in release notes (companies, categories from DB) 2026-01-14 17:31:10 +01:00
26c76cc691 fix: Update release notes stats (111 firms, 19 categories) 2026-01-14 15:47:43 +01:00
1147e7e27c chore: Merge duplicate release notes (11 Jan, 10 Jan)
- v1.12.0 + v1.13.0 → v1.13.0 (11 stycznia 2026)
- v1.10.0 + v1.11.0 → v1.11.0 (10 stycznia 2026)

One version per day rule applied.
2026-01-14 15:10:53 +01:00
0b1dc49298 chore: Merge release notes from Jan 14 into single v1.16.0 entry
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 15:07:39 +01:00
22e73e4f80 feat: Email DKIM/SPF/DMARC config + year_established data fill
- Added release notes v1.19.0 with today's changes
- Email: DKIM, SPF, DMARC configured for nordabiznes.pl
- Data: year_established filled for 71/111 companies (64%)
- Script: fix_year_established.py for KRS date migration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 15:01:01 +01:00
c8075e0872 feat: Add email test script for manual testing
Script sends welcome emails to specified addresses for testing
DKIM/SPF/DMARC configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 14:09:17 +01:00
abded75fb0 fix: Add fallback background-color for email headers
Outlook and some email clients don't render CSS gradients properly.
Added solid background-color (#1e3a8a) as fallback before gradient.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 12:27:35 +01:00
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