Neubau Fundament + Startseite: Designsystem, PHP-Komponenten, Brevo-Formular, Instagram-Sync
- Ordnerstruktur mit public/-Docroot, Deny-.htaccess für app/bin/config/data/storage - CLAUDE.md mit Leitplanken (self-hosted only, Single Source of Truth, Component-first) - Design-Tokens aus alter Seite extrahiert (Akzent #e20612, Coolvetica/Abel als woff2) - Front Controller mit Routen-Register, Sitemap, Canonical, JSON-LD (SportsClub) - Startseite: Hero, Instagram-Feed (lokaler Cache), Historie/Sportheim, Stats, Partner, Kontakt - Kontaktformular via PHPMailer/Brevo mit Honeypot + HMAC-Time-Trap (kein reCAPTCHA) - bin/instagram-sync.php: Scraper mit Strategie-Kette, flock, atomarem Cache, lokalen Bildern Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
24
app/bootstrap.php
Normal file
24
app/bootstrap.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
define('ROOT_PATH', dirname(__DIR__));
|
||||
define('APP_PATH', __DIR__);
|
||||
define('DATA_PATH', ROOT_PATH . '/data');
|
||||
define('STORAGE_PATH', ROOT_PATH . '/storage');
|
||||
define('PUBLIC_PATH', ROOT_PATH . '/public');
|
||||
|
||||
// Config laden — ohne config.php läuft die Seite mit der Vorlage weiter (Mailversand schlägt dann fehl).
|
||||
$configFile = ROOT_PATH . '/config/config.php';
|
||||
$GLOBALS['__config'] = require (is_file($configFile) ? $configFile : ROOT_PATH . '/config/config.example.php');
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', ($GLOBALS['__config']['env'] ?? 'production') === 'development' ? '1' : '0');
|
||||
ini_set('log_errors', '1');
|
||||
ini_set('error_log', STORAGE_PATH . '/logs/php-errors.log');
|
||||
|
||||
require APP_PATH . '/helpers.php';
|
||||
|
||||
if (is_file(ROOT_PATH . '/vendor/autoload.php')) {
|
||||
require ROOT_PATH . '/vendor/autoload.php';
|
||||
}
|
||||
Reference in New Issue
Block a user