Initial Commit with ENVs, directory structures, cursor rules, etc

This commit is contained in:
2025-05-10 17:12:58 -05:00
commit 1a65e69d25
21 changed files with 572 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
function readJsonFile($filename) {
$filepath = __DIR__ . '/../data/' . $filename;
if (!file_exists($filepath)) {
return [];
}
$content = file_get_contents($filepath);
return json_decode($content, true) ?? [];
}
function writeJsonFile($filename, $data) {
$filepath = __DIR__ . '/../data/' . $filename;
$json = json_encode($data, JSON_PRETTY_PRINT);
return file_put_contents($filepath, $json);
}
function ensureDataDirectory() {
$dataDir = __DIR__ . '/../data';
if (!file_exists($dataDir)) {
mkdir($dataDir, 0755, true);
}
}
+17
View File
@@ -0,0 +1,17 @@
</main>
<footer class="bg-light p-3 mt-4">
<div class="container text-center">
<p>Family Hub &copy; <?= date('Y') ?></p>
</div>
</footer>
<!-- Bootstrap JS from CDN -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<!-- jQuery from CDN (if needed) -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Custom JavaScript -->
<script src="assets/js/main.js"></script>
</body>
</html>
+23
View File
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Family Hub</title>
<!-- Bootstrap CSS from CDN -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome icons from CDN -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Custom styles -->
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<header class="bg-primary text-white p-3">
<div class="container">
<h1>Family Hub</h1>
</div>
</header>
<main class="container py-4">
+23
View File
@@ -0,0 +1,23 @@
<?php
require_once __DIR__ . '/../config/config.php';
function sanitizeInput($input) {
if (is_array($input)) {
return array_map('sanitizeInput', $input);
}
return htmlspecialchars(trim($input), ENT_QUOTES, 'UTF-8');
}
function formatDate($date) {
return date('Y-m-d', strtotime($date));
}
function generateExportFilename($type) {
return $type . '_' . date('Y-m-d') . '.json';
}
function ensureExportDirectory() {
if (!file_exists(EXPORT_DESTINATION)) {
mkdir(EXPORT_DESTINATION, 0755, true);
}
}