Commit Graph

166 Commits

Author SHA1 Message Date
8ee5945ccd fix: Handle NULL views_count in forum and classifieds
- Forum topics and classifieds now handle NULL views_count gracefully
- Prevents TypeError when incrementing view counter
2026-01-11 06:03:13 +01:00
957fff3f2f fix: Use absolute paths in file_upload_service for PROD compatibility
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 21:30:03 +01:00
1b15a578e2 docs: Add release notes v1.11.0 - forum categories, statuses, attachments
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 21:28:07 +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
cdc53d9ff3 docs: Add release notes v1.10.0 - architecture docs and security improvements
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:57:43 +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
7d1df82d76 Merge branch 'auto-claude/004-remove-hardcoded-database-credentials-from-shell-s'
Security fix: Remove hardcoded database credentials from shell scripts and source code.

Changes:
- Scripts now use environment variables ($DATABASE_URL, $PGPASSWORD)
- Safe fallback values with CHANGE_ME placeholder
- Added .env.example template
- Added docs/SECURITY.md documentation
- Updated CLAUDE.md with credential management guidelines

Resolves conflict by removing Auto Claude state files (already in .gitignore).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:42:05 +01:00
841f2b266a chore: Stop tracking Auto Claude state files (already in .gitignore)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:41:25 +01:00
e806746141 auto-claude: 5.3 - Verify no credentials remain in codebase
- Created CREDENTIAL_VERIFICATION_REPORT.md with comprehensive grep audit
- Verified NO hardcoded production passwords in executable code (.py, .sh)
- Only safe occurrences found: password redaction in logging, env var refs, docs
- Updated implementation_plan.json: subtask 5.3 status -> completed
- Updated build-progress.txt: Phase 5 and entire task COMPLETE
- CWE-798 vulnerability successfully remediated
- All 5 phases completed: Analysis, Python updates, Shell updates, Documentation, Testing
2026-01-10 13:16:10 +01:00
5dbf9ca51d auto-claude: 5.2 - Test that view_maturity_results.sh provides clear error message when PGPASSWORD is not set
- Created TEST_RESULTS_SHELL_SCRIPTS.md with comprehensive test verification
- Verified script properly validates PGPASSWORD environment variable
- Confirmed clear error message and exit code 1 when PGPASSWORD not set
- All validation checks pass successfully
2026-01-10 13:13:13 +01:00
9552845aee auto-claude: 5.1 - Test that all updated Python scripts provide clear error messages when DATABASE_URL is not set
- Created test_database_url_validation.py for static code analysis
- Created test_runtime_errors.py for runtime error verification
- Created TEST_RESULTS.md with comprehensive test documentation
- All 7 Python scripts verified to use safe 'CHANGE_ME' fallback
- Confirmed no hardcoded production credentials remain in code
- Scripts properly fail with clear authentication errors
- Test coverage: 7/7 scripts passed (100%)

Security validation complete for CWE-798 remediation.
2026-01-10 13:10:09 +01:00
f85b3261ab auto-claude: 4.3 - Create security documentation explaining credential management
Created comprehensive docs/SECURITY.md with:
- Database credentials management guide (CWE-798 security)
- Complete environment variables reference
- Development and production setup instructions
- Shell script configuration (.pgpass, PGPASSWORD)
- Security best practices (never hardcode credentials)
- Verification and testing procedures
- Troubleshooting guide for common issues
- Incident response procedures for compromised credentials
- Links to official documentation and security standards

This completes Phase 4 (Documentation) of the credential security cleanup task.
2026-01-10 13:06:00 +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
76f6ac19dc auto-claude: 4.1 - Add clear comments in .env.example explaining DATABASE_URL and PGPASSWORD
- Added comprehensive DATABASE_URL documentation with examples for dev/prod
- Added PGPASSWORD documentation for shell scripts (psql, pg_dump)
- Included security warnings about CWE-798 and hardcoded credentials
- Added usage examples: export, inline, and .pgpass file method
- Documented that shell scripts cannot read .env files automatically
2026-01-10 13:00:47 +01:00
3e3c3cb18c auto-claude: 3.1 - Replace hardcoded PGPASSWORD with environment variable
- Added PGPASSWORD environment variable check at script start
- Replaced 3 instances of hardcoded 'NordaBiz2025Secure' with $PGPASSWORD
- Added usage instructions and security warning (CWE-798)
- Script now exits with error if PGPASSWORD is not set
2026-01-10 12:58:57 +01:00
33a48894d7 auto-claude: 2.7 - Replace hardcoded password in update_social_media.py with environment variable
- Removed hardcoded DATABASE_URL assignment with 'NordaBiz2025Secure' password
- Added comprehensive warning comment about CWE-798 security vulnerability
- Script now relies on DATABASE_URL environment variable or safe fallback from database.py
- Follows same security pattern as other updated scripts (run_migration.py, etc.)
2026-01-10 12:56:56 +01:00
f29987f635 auto-claude: 2.6 - Remove hardcoded password from docstring usage example 2026-01-10 12:55:34 +01:00
c228716c0f auto-claude: 2.6 - Replace hardcoded password in scripts/test_collaboration_matching.py with safe fallback 2026-01-10 12:54:39 +01:00
914dac410e auto-claude: 2.5 - Replace hardcoded password in scripts/seo_audit.py with safe fallback 2026-01-10 12:53:29 +01:00
90f9401530 auto-claude: 2.4 - Replace hardcoded password in scripts/seo_report_generator.py with safe fallback 2026-01-10 12:52:01 +01:00
b4dcca6d55 auto-claude: 2.3 - Replace hardcoded password in scripts/social_media_audit.py with safe fallback 2026-01-10 12:50:39 +01:00
4cb505f21c auto-claude: 2.2 - Replace hardcoded password in run_migration.py with safe fallback and add warning comment 2026-01-10 12:49:18 +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
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
70382b4e52 auto-claude: Merge auto-claude/002-update-readme-md-to-reflect-current-flask-applicat 2026-01-10 11:20:50 +01:00
2c79500286 chore: Stop tracking Auto Claude state files 2026-01-10 11:18:16 +01:00
a44797d4fc chore: Ignore Auto Claude state files to prevent merge conflicts 2026-01-10 11:18:15 +01:00
ee250290d0 auto-claude: subtask-4-3 - Polish formatting and presentation 2026-01-10 09:57:58 +01:00
eefda67411 auto-claude: subtask-4-2 - Ensure README is developer-friendly 2026-01-10 09:53:49 +01:00
9258928e53 auto-claude: subtask-4-1 - Verify all technical details are accurate
Fixed 2 minor inaccuracies found during verification:
- Company logos count: 82 → 80 images
- Python packages count: 13 → 16 packages

Comprehensive verification completed:
 No static HTML references
 All files exist
 Technology versions correct
 Commands verified
 Production details accurate

See technical-verification-report.md for full details.
2026-01-10 09:50:30 +01:00
cbff2ffafe auto-claude: subtask-3-8 - Document development and testing 2026-01-10 09:46:11 +01:00
d74889a1c6 auto-claude: subtask-3-7 - Add API endpoints documentation 2026-01-10 09:43:53 +01:00
40ff7e950e auto-claude: subtask-3-6 - Add deployment and production information 2026-01-10 09:40:38 +01:00
47b4ca039b auto-claude: subtask-3-5 - Document current features (not planned ones) 2026-01-10 09:37:36 +01:00
8c29b7e26b auto-claude: subtask-3-4 - Write development environment setup instructions 2026-01-10 09:35:13 +01:00
1a4a55ef5e auto-claude: subtask-3-3 - Update project structure section 2026-01-10 09:29:14 +01:00
1938c71a7a auto-claude: subtask-3-2 - Document complete technology stack 2026-01-10 09:28:04 +01:00
604ef0a962 auto-claude: subtask-3-1 - Update project overview and description 2026-01-10 09:25:57 +01:00
e3a2416aba auto-claude: subtask-2-2 - Identify key features to highlight
Completed comprehensive key features inventory for README.md update.

Created key-features-inventory.md (19KB) documenting 20 features:
- 5 user-facing features (Company Directory, Search, AI Chat, Auth, Notifications)
- 8 admin features (News, Social Media, SEO, GBP/IT Audits, Forum, Calendar, Users)
- 7 technical features (API, Deployment, Security, Database, Verification, External APIs, Testing)

All features categorized by priority (top/high/medium) and documented with:
- Implementation status (all LIVE)
- Technology stack
- Endpoints/scripts
- Database tables
- Source references

Acceptance criteria met:
✓ Complete feature list from CLAUDE.md
✓ User-facing vs admin features categorized
✓ All features documented with details and sources

Files created in .auto-claude/specs/:
- key-features-inventory.md (19KB)
- Updated build-progress.txt
- Updated implementation_plan.json
2026-01-10 09:24:26 +01:00
77abe883f3 auto-claude: subtask-1-3 - Extract technology stack from requirements.txt and CLAUDE.md
Created comprehensive technology-stack-inventory.md documenting:
- 13 Python dependencies from requirements.txt
- Backend: Flask 3.0, SQLAlchemy 2.0, PostgreSQL
- Security: Flask-Login, Flask-WTF, Flask-Limiter
- AI: Google Gemini 2.5 (4 models)
- External APIs: 6 integrations (Google PageSpeed, Maps, Graph, KRS, Brave)
- Frontend: Jinja2, CSS3, Vanilla JS
- Infrastructure: Gunicorn, NPM, Let's Encrypt, Docker
- Environment configuration requirements

All acceptance criteria met.
2026-01-10 09:15:43 +01:00
b3d039bbe3 docs: Add admin bar to release notes v1.9.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:23:09 +01:00
23aefe1054 feat: Add admin bar with grouped dropdowns, clean user menu
- Add dark admin bar below main navigation (visible only for admins)
- Group admin functions into 3 dropdowns: Zarządzanie, Audyty, Analityka
- Remove admin links from user dropdown menu
- Keep user menu clean with only personal items

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:18:58 +01:00
2035f46f07 feat: Add 'Co nowego' link to user menu for release notes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:10:26 +01:00
118c604579 docs: Add AI user creation to release notes v1.9.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:02:53 +01:00
809e573ff7 feat: AI-assisted user creation with Gemini integration
- Add POST /api/admin/users/ai-parse endpoint for text/image parsing
- Add POST /api/admin/users/bulk-create for batch user creation
- Add "Dodaj z AI" button with purple gradient in admin users panel
- Add 3-step modal flow (Input → Review → Results)
- Support text paste from any source (email, Excel, CRM, Slack)
- Support screenshot upload and clipboard paste (Ctrl+V / Cmd+V)
- AI extracts emails, names, matches companies, detects admin roles
- Display generated passwords with copy functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:01:30 +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
69460b05fe docs: Aktualizacja release notes v1.9.0
- Dodawanie użytkowników w panelu admina
- Wyświetlanie przypisanych firm
- Poprawki nazw użytkowników

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 19:04:13 +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
7455151c02 feat: Add admin user management panel with improved UI
- Add /admin/users panel for managing users (toggle admin, toggle verified, assign company, reset password, delete)
- Add link to admin menu in base.html
- Replace native confirm()/alert() with styled modals and toast notifications
- Add confirmation modal for password reset with warning icon
- Add styled reset URL modal with copy functionality
- Add danger-styled confirmation modal for user deletion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:27:23 +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