6686388834
Account creation and guarded onboarding flow. Current-cash starting balance with automatic rollover enabled. Dynamic bill generation, shared/custom categories, recurring targets, and optional same-day onboarding transactions. Optional dormant reserve and additional categories. Mailgun email or authenticator-app 2FA configuration. Responsive dark/light UI with no overflow at 390px. Fixed administrator session-ID creation bug. Core implementation: [OnboardingService.php (line 59)](/Users/tyemeclifford/Documents/GH/budget/app/OnboardingService.php:59), [onboarding.php (line 19)](/Users/tyemeclifford/Documents/GH/budget/views/onboarding.php:19), and [index.php (line 143)](/Users/tyemeclifford/Documents/GH/budget/public/index.php:143). Verification passed: financial self-test, onboarding integration test, full browser walkthrough, mobile layout, routing guards, and zero browser console errors. Live email delivery requires actual Mailgun credentials and was not sent during testing.
41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Budget\Auth;
|
|
use Budget\BudgetService;
|
|
use Budget\Database;
|
|
use Budget\OnboardingService;
|
|
use Budget\Settings;
|
|
|
|
const APP_ROOT = __DIR__ . '/..';
|
|
|
|
spl_autoload_register(static function (string $class): void {
|
|
$prefix = 'Budget\\';
|
|
if (!str_starts_with($class, $prefix)) {
|
|
return;
|
|
}
|
|
$path = __DIR__ . '/' . str_replace('\\', '/', substr($class, strlen($prefix))) . '.php';
|
|
if (is_file($path)) {
|
|
require $path;
|
|
}
|
|
});
|
|
|
|
if (PHP_SAPI !== 'cli' && session_status() !== PHP_SESSION_ACTIVE) {
|
|
session_name('neon_ledger_session');
|
|
session_set_cookie_params([
|
|
'httponly' => true,
|
|
'samesite' => 'Lax',
|
|
'secure' => !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off',
|
|
]);
|
|
session_start();
|
|
}
|
|
|
|
$database = new Database(APP_ROOT . '/config/database.json', APP_ROOT);
|
|
$pdo = $database->pdo();
|
|
$settings = new Settings($pdo);
|
|
date_default_timezone_set((string) $settings->get('app.timezone', 'America/New_York'));
|
|
$auth = new Auth($pdo, $settings);
|
|
$budget = new BudgetService($pdo, $settings);
|
|
$onboarding = new OnboardingService($pdo, $settings);
|