feat: project scaffolding, database schema, config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Gestoría LP
2026-03-01 23:25:55 +00:00
commit 10bc97e8b9
6 changed files with 166 additions and 0 deletions

28
includes/config.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
// Database
define('DB_HOST', 'localhost');
define('DB_NAME', 'gestoria_lp');
define('DB_USER', 'root');
define('DB_PASS', '');
// SMTP (Hostinger)
define('SMTP_HOST', 'smtp.hostinger.com');
define('SMTP_PORT', 465);
define('SMTP_USER', 'contacto@gestorialp.com');
define('SMTP_PASS', '');
define('SMTP_FROM_NAME', 'Gestoría LP');
// WhatsApp
define('WHATSAPP_NUMBER', '521XXXXXXXXXX');
// Encryption key for client credentials (32 bytes for AES-256)
define('ENCRYPTION_KEY', 'CHANGE_THIS_TO_A_RANDOM_32_CHAR_KEY!');
// Upload settings
define('UPLOAD_DIR', __DIR__ . '/../uploads/');
define('MAX_FILE_SIZE', 5 * 1024 * 1024); // 5MB
define('ALLOWED_EXTENSIONS', ['pdf', 'jpg', 'jpeg', 'png', 'doc', 'docx']);
// Site
define('SITE_URL', 'https://gestorialp.com');
define('SITE_NAME', 'Gestoría LP');

15
includes/db.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
require_once __DIR__ . '/config.php';
function getDB(): PDO {
static $pdo = null;
if ($pdo === null) {
$dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8mb4';
$pdo = new PDO($dsn, DB_USER, DB_PASS, [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
]);
}
return $pdo;
}