docs: consolidate documentation into organized structure

- Move 12 markdown files from root to docs/ subdirectories
- Organize documentation by category:
  • docs/troubleshooting/ (1 file)  - Technical troubleshooting guides
  • docs/deployment/      (4 files) - Deployment and security documentation
  • docs/guides/          (3 files) - Feature-specific guides
  • docs/planning/        (4 files) - Planning and improvement proposals

Root directory cleanup:
- Reduced from 16 to 4 markdown files in root
- Only essential project files remain:
  • CLAUDE.md (AI instructions)
  • README.md (Main project readme)
  • CLEANUP_PLAN.md (Current cleanup plan)
  • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements)

This improves:
 Documentation discoverability
 Logical organization by purpose
 Clean root directory
 Better maintainability
This commit is contained in:
2025-10-05 11:05:04 +02:00
parent 887847dde6
commit 5050c7d73a
36686 changed files with 196456 additions and 12398919 deletions

View File

@@ -6,13 +6,15 @@ namespace App\Infrastructure\GeoIp;
use PDO;
use RuntimeException;
use App\Framework\Database\ConnectionInterface;
use App\Framework\Database\ValueObjects\SqlQuery;
final class CountryDataService
{
private const string RESTCOUNTRIES_API_URL = 'https://restcountries.com/v3.1/all?fields=cca2,name,translations';
public function __construct(
private readonly PDO $database
private readonly ConnectionInterface $connection
) {
}
@@ -30,27 +32,27 @@ final class CountryDataService
throw new RuntimeException('Ungültige JSON-Daten erhalten');
}
$this->database->beginTransaction();
$this->database->exec('DELETE FROM countries');
$this->connection->beginTransaction();
$this->connection->execute(SqlQuery::create('DELETE FROM countries'));
$stmt = $this->database->prepare('INSERT INTO countries (code, name_en, name_de, name_native, updated_at) VALUES (?, ?, ?, ?, ?)');
$insertSql = 'INSERT INTO countries (code, name_en, name_de, name_native, updated_at) VALUES (?, ?, ?, ?, ?)';
$processed = 0;
foreach ($countries as $countryData) {
$country = $this->parseCountryData($countryData);
if ($country) {
$stmt->execute([
$this->connection->execute(SqlQuery::create($insertSql, [
$country->code,
$country->nameEn,
$country->nameDe,
$country->nameNative,
$country->updatedAt,
]);
]));
$processed++;
}
}
$this->database->commit();
$this->connection->commit();
echo "Länderdatenbank aktualisiert: {$processed} Länder geladen\n";
return $processed;
@@ -58,9 +60,8 @@ final class CountryDataService
public function getCountryByCode(string $code): ?Country
{
$stmt = $this->database->prepare('SELECT code, name_en, name_de, name_native, updated_at FROM countries WHERE code = ?');
$stmt->execute([$code]);
$result = $stmt->fetch(PDO::FETCH_ASSOC);
$sql = 'SELECT code, name_en, name_de, name_native, updated_at FROM countries WHERE code = ?';
$result = $this->connection->queryOne(SqlQuery::create($sql, [$code]));
if (! $result) {
return null;