Commit Graph

19 Commits

Author SHA1 Message Date
f7be09ec63 Add Broken Links detection and SEO Analysis features
Database Schema:
- Added meta_description TEXT field to pages table
- Added index on status_code for faster broken link queries

Backend Changes:
- Crawler now extracts meta descriptions from pages
- New API endpoint: broken-links (finds 404s and server errors)
- New API endpoint: seo-analysis (analyzes titles and meta descriptions)

SEO Analysis Features:
- Title length validation (optimal: 30-60 chars)
- Meta description length validation (optimal: 70-160 chars)
- Detection of missing titles/descriptions
- Duplicate content detection (titles and meta descriptions)

Frontend Changes:
- Added "Broken Links" tab showing pages with errors
- Added "SEO Analysis" tab with:
  * Statistics overview
  * Pages with SEO issues
  * Duplicate content report

All quality checks pass:
- PHPStan Level 8: 0 errors
- PHPCS PSR-12: 0 warnings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 09:26:33 +02:00
9e61572747 Add recrawl functionality and fix PHPCS warnings
- Added "Recrawl" button in jobs table UI
- Implemented recrawl API endpoint that deletes all job data and restarts crawl
- Fixed PHPCS line length warnings in api.php and Crawler.php

All quality checks pass:
- PHPStan Level 8: 0 errors
- PHPCS PSR-12: 0 warnings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 09:07:50 +02:00
11fd8fa673 Add copyright headers to configuration files
Extended copyright headers to SQL, YAML, and JSON configuration files:
- config/docker/init.sql (SQL comment block)
- docker-compose.yml (YAML comment)
- composer.json and src/composer.json (JSON _comment field)

All files validated and tested successfully.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 08:58:28 +02:00
cbf099701b Add copyright headers to all application files
Added copyright headers to all PHP files in the application with proper author information (Martin Kiesewetter) and contact details.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 08:47:44 +02:00
ad274c0738 Update paths for config/ directory structure
Adjusted all references to match new config/ structure:
- docker/config/nginx/default.conf → config/nginx/default.conf
- docker/init.sql → config/docker/init.sql
- docker/start.sh → config/docker/start.sh

Updated files:
- docker-compose.yml: Updated volume mount paths
- README.md: Updated project structure documentation

New structure consolidates all configuration files under config/
for better organization and clarity.

Tested and verified all services running correctly.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 08:36:58 +02:00
de4d2e53d9 Reorganize Docker-related files into docker/ directory
Moved Docker infrastructure files to dedicated docker/ folder:
- config/nginx/default.conf → docker/config/nginx/default.conf
- init.sql → docker/init.sql
- start.sh → docker/start.sh (currently unused)

Updated:
- docker-compose.yml: Adjusted volume paths
- README.md: Updated project structure documentation

Benefits:
- Clear separation between infrastructure (docker/) and application (src/)
- Better project organization
- Easier to understand for new developers

Docker Compose and Dockerfile remain in root for convenience.
All services tested and working correctly.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 08:31:47 +02:00
daa76b2141 Remove legacy PHP files from root directory
Removed unused legacy files:
- index.php (old crawler entry point)
- webanalyse.php (old crawler implementation)
- setnew.php (database reset script)

These files are no longer used. The current application uses:
- src/index.php (web interface)
- src/api.php (API endpoints)
- src/classes/Crawler.php (crawler implementation)
- src/crawler-worker.php (background worker)

The legacy code remains in git history if needed.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 08:24:43 +02:00
09d5b61779 Fix link extraction bug caused by type checking
The PHPStan fix inadvertently broke link extraction by using is_int()
on $pageId, which failed when lastInsertId() or fetchColumn() returned
a string instead of an int.

Changes:
- Convert $pageId to int explicitly after fetching
- Use $pageId > 0 instead of is_int($pageId) for validation
- Handle both 0 and '0' cases when fetching manually

This ensures link extraction works again while maintaining type safety.
Tests pass, PHPStan clean.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 08:18:52 +02:00
e569d189d5 Add comprehensive quality tooling and fix code style issues
Quality Tools Added:
- PHPStan (Level 8) for static analysis
- PHP_CodeSniffer (PSR-12) for code style
- Updated PHPUnit test suite with type safety

Code Improvements:
- Fixed all PHPStan Level 8 errors (13 issues)
- Auto-fixed 25 PSR-12 code style violations
- Added proper type hints for arrays and method parameters
- Fixed PDOStatement|false handling in api.php and tests
- Improved null-safety for parse_url() calls

Configuration:
- phpstan.neon: Level 8, analyzes src/ and tests/
- phpcs.xml: PSR-12 standard, excludes vendor/
- docker-compose.yml: Mount config files for tooling
- composer.json: Add phpstan, phpcs, phpcbf scripts

Documentation:
- Updated README.md with testing and quality sections
- Updated AGENTS.md with quality gates and workflows
- Added pre-commit checklist for developers

All tests pass (9/9), PHPStan clean (0 errors), PHPCS compliant (1 warning)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 23:58:21 +02:00
b5640ad131 docker-compose 2025-10-03 23:26:28 +02:00
5b5a627662 gitignore 2025-10-03 23:19:49 +02:00
4e868ca8e9 Sonstiges 2025-10-03 20:22:17 +02:00
a6e2a7733e Fix Docker container startup and API endpoint configuration
- Update Dockerfile to use inline CMD instead of external start.sh script to resolve execution issues with CRLF line endings
- Fix nginx fastcgi_pass configuration to use localhost:9000 for PHP-FPM communication
- Correct API endpoint paths in frontend from /src/api.php to /api.php to match nginx document root configuration
- Ensure Composer dependencies are properly installed with PHP 8.3 compatibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 20:20:20 +02:00
67390a76f3 Merge conflict resolved in .gitignore 2025-10-03 19:57:58 +02:00
f568875b2c Add PHPUnit tests and update UI
- Add PHPUnit 11.0 testing framework
- Create unit tests for Database and Crawler classes
- Create integration tests for Crawler
- Add phpunit.xml configuration
- Change UI background color to rose
- All 9 tests passing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 14:13:04 +02:00
2f301cec42 Initialer Push von Martin
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 14:02:44 +02:00
d9d73eee41 Start 2025-09-26 21:30:27 +02:00
5f6f179518 Start 2025-09-26 21:24:36 +02:00
b3e8f2ce85 Start 2025-09-26 21:24:25 +02:00