Commit Graph

22 Commits

Author SHA1 Message Date
986360f7d5 feat: Add URL normalization and inline audit sections
- Add normalize_social_url() function to database.py to prevent
  www vs non-www duplicates in social media records
- Update update_social_media.py to normalize URLs before insert
- Update social_media_audit.py to normalize URLs before insert
- Add inline GBP Audit section to company profile
- Add inline Social Media Audit section to company profile
- Add inline IT Audit section to company profile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 23:07:03 +01:00
c7a46c5ada feat: Add /api/connections endpoint and people in company detail
- API endpoint for connections graph visualization
- Include Person/CompanyPerson data in company profile
- Support for Zarząd, Wspólnicy, Prokurenci, JDG relationships

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 14:10:04 +01:00
bfe1cd897c feat: Add AI usage monitoring dashboard
- Add AIUsageLog, AIUsageDaily, AIRateLimit models to database.py
- Update gemini_service.py to log to new AIUsageLog table
- Create /admin/ai-usage dashboard with stats and charts
- Show daily/weekly/monthly requests, tokens, costs
- Track usage by type (chat, news_evaluation, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 08:21:07 +01:00
e399022223 feat: Add 1-5 star rating to ZOPK news AI evaluation
- Add ai_relevance_score column (1-5) to zopk_news table
- Update AI prompt to return score with detailed criteria:
  * 1 star = very weak (loose connection to region/industry)
  * 2 stars = weak (general industry news)
  * 3 stars = medium (relates to ZOPK industry but not directly)
  * 4 stars = strong (directly about ZOPK investments/companies)
  * 5 stars = perfect (main topic is ZOPK, Kongsberg, offshore Baltic)
- Display star ratings in admin dashboard with color-coded badges
- Score >= 3 marks news as relevant, < 3 as not relevant

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:34:36 +01:00
a0db0af6c8 feat: AI-based news relevance evaluation using Gemini
- Add ai_relevant, ai_evaluation_reason, ai_evaluated_at columns to zopk_news
- Add evaluate_news_relevance() and evaluate_pending_news() functions
- Add /admin/zopk/news/evaluate-ai endpoint
- Add AI filter tiles (Pasuje wg AI, Nie pasuje wg AI)
- Add "Oceń przez AI" button with progress feedback
- Show AI evaluation badge on news items
- Add new sources: Norda FM, Twoja Telewizja Morska, Nadmorski24.pl, Facebook (Samsonowicz)

AI evaluates news against ZOPK topics: offshore wind, nuclear plant,
Kongsberg investment, data centers, hydrogen labs, key people.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:13:08 +01:00
46ef40950f feat: Add multi-source news search with cross-verification for ZOPK
- Add ZOPKNewsService with multiple RSS sources (12 feeds)
- Implement cross-verification logic (3+ sources = auto_approved)
- Add title hash normalization for fuzzy deduplication
- Include government sources: MON, Ministerstwo Rozwoju
- Include Google News searches for key topics and people
- Add confidence scoring (1-5 based on source count)
- Update SQL migration with cross-verification columns

Sources: Brave API, trojmiasto.pl, Dziennik Bałtycki, Google News,
gov.pl/obrona-narodowa, gov.pl/rozwoj-technologia

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 06:41:31 +01:00
d51637a226 feat: Add ZOPK (Zielony Okręg Przemysłowy Kaszubia) knowledge base
- Add database models for ZOPK projects, stakeholders, news, resources
- Add migration with initial data (5 projects, 7 stakeholders)
- Implement admin dashboard with news moderation workflow
- Add Brave Search API integration for automated news discovery
- Create public knowledge base pages (index, project detail, news list)
- Add navigation links in main menu and admin bar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 06:32:27 +01:00
e8714ac6b0 feat: Add AI-generated content indicators
- Add is_ai_generated column to ForumTopic, ForumReply, NordaEvent, Classified
- Display AI badge next to author name for AI-generated content
- Purple gradient badge with tooltip 'Wygenerowano przez AI'
2026-01-11 06:16:35 +01:00
61e70ad67c feat: Forum categories, statuses, and multi-file attachments
- Add category selection (feature_request, bug, question, announcement)
- Add status tracking (new, in_progress, resolved, rejected) with admin controls
- Add file attachments support (JPG, PNG, GIF up to 5MB)
- Multi-file upload (up to 10 files per reply) with drag & drop and paste
- New FileUploadService with EXIF stripping for privacy
- Admin panel with status statistics and change modal
- Grid display for multiple attachments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 21:26:20 +01:00
6e9f1a4e4d auto-claude: 2.1 - Replace hardcoded password in database.py with safe fallback
- Replaced hardcoded password 'NordaBiz2025Secure' with placeholder 'CHANGE_ME'
- Added comprehensive warning comment about CWE-798 (Use of Hard-coded Credentials)
- Production credentials must now be set via DATABASE_URL environment variable
2026-01-10 12:47:23 +01:00
71b2928bc5 fix: Eager load Company relationship to fix DetachedInstanceError
Zmiana lazy='joined' dla relationship w modelu User
aby uniknąć błędu podczas dostępu do current_user.company w szablonach

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 19:32:24 +01:00
c1d033a9e2 feat: Panel użytkowników - dodawanie użytkowników i wyświetlanie firm
- Dodano endpoint POST /admin/users/add z generowaniem hasła
- Naprawiono wyświetlanie przypisanych firm (relationship Company)
- Dodano przycisk "Dodaj użytkownika" z modalem
- Naprawiono obcinanie nazw użytkowników w tabeli
- UI: modal z formularzem, wyświetlanie wygenerowanego hasła

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:31:50 +01:00
721e313549 auto-claude: subtask-1-3 - Add ITCollaborationMatch SQLAlchemy model to datab
Added ITCollaborationMatch model to database.py for storing company match pairs:
- company_a_id, company_b_id: Foreign keys to companies table
- match_type: Type of collaboration (shared_licensing, backup_replication, etc.)
- match_reason: Human-readable explanation of the match
- match_score: 0-100 strength score
- status: suggested, contacted, in_progress, completed, declined
- shared_attributes: JSONB for flexible attribute storage
- Helper properties for Polish labels (match_type_label, status_label)
- UniqueConstraint on (company_a_id, company_b_id, match_type)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:20:08 +01:00
2df1ed324f auto-claude: subtask-1-2 - Add ITAudit SQLAlchemy model to database.py
Add comprehensive ITAudit model with all columns for 9-section IT audit form:
- Scores (overall, completeness, security, collaboration)
- IT Contact fields
- Cloud & Identity (Azure AD, M365, Google Workspace)
- Server Infrastructure (virtualization, OS)
- Endpoints (employee/computer counts, MDM)
- Security (antivirus, EDR, VPN, MFA)
- Backup & Disaster Recovery (Proxmox PBS support)
- Monitoring (Zabbix integration placeholder)
- Business Apps (ticketing, ERP, CRM)
- Active Directory configuration
- Collaboration flags for cross-company matching

Includes helper properties for maturity labels and score categories.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:17:48 +01:00
3b2dcc279b feat(gbp-audit): Use Google data for all audit fields
- Add new columns to CompanyWebsiteAnalysis: google_name, google_address,
  google_phone, google_website, google_types, google_maps_url
- Update _check_name(), _check_address(), _check_phone(), _check_website(),
  _check_categories() to use Google data instead of NordaBiz database
- All audit fields now show real data from Google Business Profile
- Fallback to NordaBiz data only when Google data unavailable

Migration: database/migrations/add_google_gbp_fields.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 04:43:03 +01:00
41997a15e9 auto-claude: subtask-1-1 - Add google_opening_hours (JSONB) and google_photos_count (INTEGER) columns to CompanyWebsiteAnalysis model
- Added google_opening_hours Column(JSONB) for storing GBP opening hours
- Added google_photos_count Column(Integer) for storing GBP photos count
- Both columns added to GOOGLE BUSINESS section alongside existing google_* columns
2026-01-08 22:57:21 +01:00
1c0680877b auto-claude: subtask-2-1 - Create GBPAudit database model for storing audit results
Add GBPAudit SQLAlchemy model for Google Business Profile audit tracking:
- Completeness score (0-100) with score category property
- Field-by-field status tracking (JSONB)
- AI-generated recommendations storage (JSONB)
- Individual field boolean flags (name, address, phone, etc.)
- Photo/review metrics
- Google Place ID integration
- Audit metadata and timestamps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:02:21 +01:00
d5e6365d1e auto-claude: Merge auto-claude/005-badanie-jakosci-seo-stron-intrentowych-kazdego-z-c 2026-01-08 12:36:09 +01:00
6e4e7c2240 Sync: Current production state
- Added CompanyRecommendation system
- Made company pages public (removed @login_required)
- CSS refactor: inline styles instead of external fluent CSS
- Added release notes page
- Added admin recommendations panel
- Company logos (webp format)
- Docker compose configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 12:26:22 +01:00
5ef2752e1a auto-claude: 1.3 - Extend CompanyWebsiteAnalysis model with SEO columns
Added 42 new columns to CompanyWebsiteAnalysis model:

PageSpeed Insights (5 columns):
- pagespeed_seo_score, pagespeed_performance_score
- pagespeed_accessibility_score, pagespeed_best_practices_score
- pagespeed_audits (JSONB)

On-Page SEO Details (18 columns):
- meta_title, meta_description, meta_keywords
- h1_count, h2_count, h3_count, h1_text
- total_images, images_without_alt, images_with_alt
- internal_links_count, external_links_count, broken_links_count
- has_structured_data, structured_data_types, structured_data_json

Technical SEO (13 columns):
- has_canonical, canonical_url, is_indexable, noindex_reason
- viewport_configured, largest_contentful_paint_ms
- first_input_delay_ms, cumulative_layout_shift
- has_og_tags, og_title, og_description, og_image, has_twitter_cards
- html_lang, has_hreflang

SEO Audit Metadata (6 columns):
- seo_audit_version, seo_audited_at, seo_audit_errors
- seo_overall_score, seo_health_score, seo_issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 01:56:44 +01:00
6d589407be Sync local repo with production state
- Add MembershipFee and MembershipFeeConfig models
- Add /health endpoint for monitoring
- Add Microsoft Fluent Design CSS
- Update templates with new CSS structure
- Add Announcement model
- Update .gitignore to exclude analysis files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 22:23:28 +01:00
02fc67bf40 Initial commit 2026-01-01 14:01:49 +01:00