chore: add web toolchain and infrastructure for Plan 3

This commit is contained in:
Keith Solomon
2026-07-06 17:22:46 -05:00
parent 17782aab33
commit eed678e688
8 changed files with 59 additions and 3 deletions
+11 -1
View File
@@ -1,3 +1,13 @@
.worktrees/
/vendor/
/var/
/var/cache/
/var/phpunit/
/var/phpstan/
/var/logs/
/var/uploads/*
!/var/uploads/.htaccess
!/var/uploads/index.php
/node_modules/
/public/js/*.map
.phpunit.result.cache
.phpunit.cache
+1
View File
@@ -4,6 +4,7 @@
<file>src</file>
<file>tests</file>
<file>public/index.php</file>
<arg name="colors"/>
<arg value="sp"/>
+3
View File
@@ -3,4 +3,7 @@ parameters:
paths:
- src
- tests
- public/index.php
excludePaths:
- src/Views/*
tmpDir: var/phpstan
+5 -2
View File
@@ -5,8 +5,11 @@
cacheDirectory="var/phpunit"
colors="true">
<testsuites>
<testsuite name="BattleForge Test Suite">
<directory>tests</directory>
<testsuite name="unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="integration">
<directory>tests/Integration</directory>
</testsuite>
</testsuites>
+21
View File
@@ -0,0 +1,21 @@
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: sans-serif; }
body { padding: 1rem; max-width: 64rem; margin: 0 auto; }
fieldset { margin: 0 0 1rem 0; padding: 0.5rem 1rem; }
legend { font-weight: bold; }
label { display: block; margin: 0.25rem 0; }
input, select, button, textarea { font: inherit; }
input[type="number"] { width: 5rem; }
table.bf-grid { border-collapse: collapse; }
table.bf-grid td { padding: 0; }
table.bf-grid button { width: 2rem; height: 2rem; border: 1px solid #ccc; background: #fff; }
table.bf-grid button[data-paint="open"] { background: #fff; }
table.bf-grid button[data-paint="forest"] { background: #cfc; }
table.bf-grid button[data-paint="rough"] { background: #fec; }
table.bf-grid button[data-paint="water"] { background: #cce; }
table.bf-grid button[data-paint="blocking"] { background: #444; color: #fff; }
table.bf-grid button[data-objective="1"] { outline: 3px solid #c00; }
table.bf-grid button[data-zone="alpha"] { outline: 3px solid #00c; }
table.bf-grid button[data-zone="bravo"] { outline: 3px solid #0c0; }
.bf-errors { color: #c00; }
.bf-toast { background: #dfd; padding: 0.5rem 1rem; margin: 0.5rem 0; }
+9
View File
@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
// Front controller. The router and handler dispatch land in Task 13.
// For now this returns a 200 with a stub so the dev server is reachable.
http_response_code(200);
header('Content-Type: text/plain; charset=utf-8');
echo "BattleForge dev server up.\n";
+2
View File
@@ -0,0 +1,2 @@
Require all denied
Deny from all
+7
View File
@@ -0,0 +1,7 @@
<?php
declare(strict_types=1);
http_response_code(403);
header('Content-Type: text/plain; charset=utf-8');
echo "Forbidden\n";