Commit Graph

27 Commits

Author SHA1 Message Date
a57187e05f test: Add comprehensive testing infrastructure
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- pytest framework with fixtures for auth (auth_client, admin_client)
- Unit tests for SearchService
- Integration tests for auth flow
- Security tests (OWASP Top 10: SQL injection, XSS, CSRF)
- Smoke tests for production health and backup monitoring
- E2E tests with Playwright (basic structure)
- DR tests for backup/restore procedures
- GitHub Actions CI/CD workflow (.github/workflows/test.yml)
- Coverage configuration (.coveragerc) with 80% minimum
- DR documentation and restore script

Staging environment: VM 248, staging.nordabiznes.pl

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 07:52:34 +01:00
d96cd78c47 feat: Add automatic website content updater with Gemini 3 Flash
- New script: scripts/website_content_updater.py
- Uses Gemini 3 Flash (free tier) for AI extraction
- Extracts: services_extracted, main_keywords, content_summary
- Supports: single company, batch, stale-days filtering, dry-run
- Rate limiting: 2s between API calls
- Documented cron setup in CLAUDE.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:42:04 +01:00
ea17cdd106 refactor: Remove duplicate sections for KRS companies
- Hide "Zarząd i Wspólnicy" section for companies with KRS API data
  (data is now in "Dane z rejestrów urzędowych" section)
- Hide "Informacje prawne i biznesowe" section for companies with KRS API data
  (NIP, REGON, forma prawna, kapitał - all in KRS section)
- Remove rejestr.io links (we now have official KRS API data)
- Keep PDF download button in legacy section
- Add CRBR and SUDOP registries to TODO for future integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:06:40 +01:00
30e3883704 docs: Add production script execution guidance for DATABASE_URL
Document that `source .env` doesn't work via SSH and
provide correct patterns for running Python scripts
that need database access on production.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:48:58 +01:00
cebe52f303 refactor: Rebranding i aktualizacja modelu AI
- Zmiana nazwy: "Norda Biznes Hub" → "Norda Biznes Partner"
- Aktualizacja modelu AI: Gemini 2.0 Flash → Gemini 3 Flash
- Zachowano historyczne odniesienia w timeline i dokumentacji

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:08:39 +01:00
30729ef83e feat(ai): Thinking Mode dla NordaGPT
- Nowy SDK google-genai z obsługą thinking mode
- Przełącznik poziomu rozumowania w UI chatu (3 poziomy)
- Błyskawiczny (minimal) - szybkie odpowiedzi
- Szybki (low) - zrównoważony
- Głęboki (high) - maksymalna analiza
- Endpoint /api/chat/settings do zapisywania preferencji
- Dokumentacja dla NotebookLM (prezentacja)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:20:58 +01:00
ab117c962d chore(branding): Zmiana 111 → 150 podmiotów gospodarczych
Landing page i chat timeline - cel marketingowy 150 podmiotów
zamiast dynamicznej liczby z bazy (111).

Zmieniono również terminologię:
- "firm członkowskich" → "podmiotów gospodarczych"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:49:29 +01:00
21a78befad feat(contacts): Baza kontaktów zewnętrznych dla członków Norda
- Nowy model ExternalContact z pełnymi danymi kontaktowymi, social media, related_links (JSONB)
- Migracja SQL 020_external_contacts.sql z full-text search
- Routes: /kontakty (lista), /kontakty/dodaj, /kontakty/<id>, /kontakty/<id>/edytuj
- Szablony: lista z filtrami, karta szczegółów, formularz CRUD
- Nawigacja: link "Kontakty zewnętrzne" w dropdown Społeczność
- Poprawka: aktualizacja liczby firm z 80 na 111

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 08:35:06 +01:00
587d000b9b docs: Reorganizacja dokumentacji - wydzielenie DEVELOPMENT, ROADMAP, CREDENTIALS
- CLAUDE.md uproszczony - tylko kluczowe info dla Claude
- docs/DEVELOPMENT.md - szczegóły SearchService, Chatbot, Testy AI, SEO, News
- docs/ROADMAP.md - plan rozwoju, priorytety, strategia monetyzacji 3-tier
- docs/CREDENTIALS.md - zasady zarządzania hasłami i kluczami API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 10:26:24 +01:00
143f5c674a feat(zopk): Implementacja łączenia duplikatów encji (Priorytet 4)
Nowe funkcje w zopk_knowledge_service.py:
- find_duplicate_entities() - wyszukiwanie podobnych encji (pg_trgm)
- merge_entities() - łączenie encji z transferem relacji
- get_entity_merge_preview() - podgląd przed połączeniem

Nowe endpointy w app.py:
- GET /admin/zopk/knowledge/duplicates - panel zarządzania duplikatami
- POST /api/zopk/knowledge/duplicates/preview - podgląd merge
- POST /api/zopk/knowledge/duplicates/merge - wykonanie merge

Nowy szablon:
- templates/admin/zopk_knowledge_duplicates.html - UI z kartami encji

Dodatkowo:
- Aktualizacja CLAUDE.md z procedurą wdrażania
- Skrypt scripts/run_migration.py do uruchamiania migracji SQL

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 09:09:22 +01:00
07171b46b7 docs: Raport incydentu CPU + ostrzeżenia o uruchamianiu skryptów
- Dodano INCIDENT_REPORT_20260115.md dokumentujący incydent
  wysokiego CPU spowodowany wielokrotnym uruchomieniem skryptu
- Dodano ostrzeżenia do CLAUDE.md o uruchamianiu skryptów:
  - SSH timeout NIE oznacza nieudanego wykonania
  - Sprawdzaj procesy przed ponownym uruchomieniem
  - Używaj QEMU guest agent jako alternatywy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 07:35:05 +01:00
db02d3660f feat(zopk): Improve AI scoring and auto-approve threshold
Changes:
- Lower auto-approve threshold from 4★ to 3★ (verified 2026-01-15)
- Add detailed progress bar for ZOPK search process
- Add auto-approved articles list with star ratings
- Document ZOPK topics (ZOP Kaszubia) in CLAUDE.md
- Add 8-second countdown before auto-refresh

Technical:
- zopk_news_service.py: Changed score threshold from >=4 to >=3
- Templates: New CSS for progress phases and results display
- CLAUDE.md: Added "ZOP Kaszubia News" section with topic guidelines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 05:05:41 +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
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
13ee367509 feat: AI learning from feedback + v1.12.0
AI Learning System:
- Add FeedbackLearningService for few-shot learning from user feedback
- Integrate learning context into chat prompts (nordabiz_chat.py)
- Add seed examples for cold start (when insufficient real feedback)
- Add /api/admin/ai-learning-status endpoint
- Add learning status section to chat analytics panel

Other Changes:
- Update release notes to v1.12.0
- Remove old password references from documentation (CLAUDE.md)
- Fix password masking in run_migration.py (use regex for any password)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 10:51:08 +01:00
539b6f40bc docs: Add Auto Claude configuration and merge conflict resolution guide
- Document Auto Claude state files that should never be committed
- Add pre-commit hook that automatically unstages Auto Claude files
- Include troubleshooting steps for merge conflicts
- Document worktree management commands

This prevents future merge conflicts caused by .auto-claude-* files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:44:41 +01:00
1a2edef536 auto-claude: 4.2 - Add section to CLAUDE.md about proper credential management
- Added comprehensive 'Zarządzanie danymi uwierzytelniającymi' subsection
- Documented CWE-798 security vulnerability and prevention measures
- Included code examples of proper vs improper credential handling
- Added table of required environment variables (DATABASE_URL, PGPASSWORD, API keys)
- Documented shell script validation patterns
- Added Git safety practices and accidental commit remediation steps
- Included pre-deployment verification commands
2026-01-10 13:02:37 +01:00
fa4fb92390 docs: Add complete architecture documentation with C4 diagrams
- System Context diagram (C4 Level 1)
- Container diagram (C4 Level 2)
- Flask component diagram (C4 Level 3)
- Deployment architecture with NPM proxy
- Database schema (PostgreSQL)
- External integrations (Gemini AI, Brave Search, PageSpeed)
- Network topology (INPI infrastructure)
- Security architecture
- API endpoints reference
- Troubleshooting guide
- Data flow diagrams (auth, search, AI chat, SEO audit, news monitoring)

All diagrams use Mermaid.js and render automatically on GitHub.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 12:40:52 +01:00
5af216c5e0 security: Fix critical vulnerabilities from security audit
- Remove sensitive tokens from logs (show only 8-char preview)
- Enforce SECRET_KEY minimum 32 characters (no default value)
- Reduce login rate limit from 100/hour to 5/hour
- Remove exposed PageSpeed API key from CLAUDE.md

BREAKING: Application requires SECRET_KEY >= 32 chars in .env

Author: Maciej Pienczyn z wykorzystaniem AI i Claude Opus
2026-01-09 15:50:40 +01:00
6970dc5a6b chore: Project cleanup - remove Auto0Claude and obsolete docs
Removed:
- .auto-claude/ directory (79 files, 2.9MB)
- 5 git worktrees and auto-claude/* branches
- Obsolete deployment docs (DEPLOYMENT*.md)
- Iteration summaries (ITERATION_*.md)
- Old analysis files (VERIFICATION_*, DETAILED_FINDINGS, etc.)
- One-time scripts (fix_*.py, import_*.py, migrate_*.py)

Updated:
- CLAUDE.md: Added Social Media Audit as implemented
- CLAUDE.md: Marked fetch_company_news.py as TODO

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 06:41:03 +01:00
69bb6b839a docs: Fix incorrect SQLite references - DEV uses PostgreSQL via Docker
The documentation incorrectly stated that DEV environment uses SQLite
when it actually uses PostgreSQL via Docker on localhost:5433.

Updated files:
- CLAUDE.md - main project instructions
- PROJECT_INFO.md - environment documentation
- deployment_checklist.md - deployment procedures
- SCRIPTS_INDEX.md - script usage commands
- .claude/commands/*.md - all slash command definitions
- tests/test_admin_seo_dashboard.py - test database URL

DEV environment:
- PostgreSQL via Docker: localhost:5433
- Container: nordabiz-postgres
- Database: nordabiz
- User: nordabiz_app

PROD environment:
- PostgreSQL: 10.22.68.249:5432

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 03:40:50 +01:00
def60a4b22 docs: fix database config - DEV uses PostgreSQL via Docker, not SQLite 2026-01-09 03:30:51 +01:00
b7b95c9c11 Aktualizuj nazwę klucza API PageSpeed w dokumentacji 2026-01-08 16:03:51 +01:00
ca7888c325 Dodaj dokumentację audytu SEO do CLAUDE.md
- Konfiguracja Google PageSpeed Insights API
- Metryki i interpretacja wyników
- Skrypty uruchamiania audytów
- WAŻNE: połączenie z bazą przez localhost
- Tabela seo_metrics
- UI stylizowanych modali

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 16:03:01 +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
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