Skip to content

Commit 45ea3c4

Browse files
committed
Move browser application into www
1 parent 7a8f079 commit 45ea3c4

522 files changed

Lines changed: 438 additions & 271 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Rules:
117117

118118
## Current Version/Date
119119

120-
- Project Instructions Version: 2026.06.28.007
120+
- Project Instructions Version: 2026.06.28.008
121121
- Date: 2026-06-28
122122
- Owner: OWNER
123123

dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Project Instructions Version
22

3-
Current Project Instructions Version: 2026.06.28.007
3+
Current Project Instructions Version: 2026.06.28.008
44

55
Last Updated: 2026-06-28
66

@@ -15,6 +15,7 @@ Last Updated: 2026-06-28
1515
- Added repository layout scaffold governance for `www/`, `api/`, and `dev/local-runtime/`.
1616
- Added `www/` migration map for safe browser-served application movement planning.
1717
- Added local route-root compatibility toggle documentation for future `www/` activation.
18+
- Moved browser-served application files under `www/` and made local static serving prefer `www/` by default.
1819
- Codex must read this version file and the latest repository copy of `PROJECT_INSTRUCTIONS.md` before performing work.
1920
- Codex must discard previously remembered Project Instructions and treat the repository copy as authoritative.
2021
- Codex must validate canonical report and ZIP paths, branching model, and legacy path avoidance before work proceeds.

dev/build/ProjectInstructions/PROJECT_STATE.md

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Project State
22

33
```yaml
4-
project_state_version: "2026.06.28.007"
4+
project_state_version: "2026.06.28.008"
55
last_updated: "2026-06-28"
66
current_main_commit: "40de767476d70cadfd1292c916844c2f31b6f185"
77
repository_status:
@@ -10,36 +10,23 @@ repository_status:
1010
runtime_database: "Postgres"
1111
creator_metadata: "API to Postgres"
1212
creator_assets: "API to R2"
13-
project_instructions_version: "2026.06.28.007"
14-
repository_structure_version: "2026.06.28.007"
15-
canonical_layout_version: "2026.06.28.007"
13+
project_instructions_version: "2026.06.28.008"
14+
repository_structure_version: "2026.06.28.008"
15+
canonical_layout_version: "2026.06.28.008"
1616
active_teams:
1717
- "Owner"
1818
- "Alfa"
1919
- "Bravo"
2020
- "Charlie"
2121
- "Delta"
2222
- "Golf"
23-
latest_owner_pr: "PR_26180_OWNER_007-www-route-root-compatibility"
24-
latest_structure_pr: "PR_26180_OWNER_007-www-route-root-compatibility"
23+
latest_owner_pr: "PR_26180_OWNER_008-move-www-application"
24+
latest_structure_pr: "PR_26180_OWNER_008-move-www-application"
2525
valid_top_level_folders:
26-
- "account/"
27-
- "admin/"
2826
- "api/"
29-
- "assets/"
30-
- "community/"
31-
- "company/"
3227
- "deploy/"
3328
- "dev/"
34-
- "docs/"
35-
- "games/"
36-
- "learn/"
37-
- "legal/"
38-
- "marketplace/"
39-
- "memberships/"
40-
- "owner/"
4129
- "src/"
42-
- "toolbox/"
4330
- "www/"
4431
valid_dev_folders:
4532
- "dev/archive/"

dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ The backlog is the authoritative source for determining the next logical PRs.
3939
- Team: Owner
4040
- Product Area: Repository Architecture Simplification
4141
- Status: Active
42-
- Percent Complete: 20%
43-
- Active PR: PR_26180_OWNER_007-www-route-root-compatibility
44-
- Next Milestone: Move browser-served application to `www/`
42+
- Percent Complete: 30%
43+
- Active PR: PR_26180_OWNER_008-move-www-application
44+
- Next Milestone: Move server/API application files into `api/`
4545
- Source / Reference: `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md`; `dev/build/ProjectInstructions/repository/www_migration_map.md`
4646

4747
## Game Journey MVP

dev/build/ProjectInstructions/repository/canonical_repository_structure.md

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,19 @@ Establish the canonical repository structure for future development and reduce t
77
## Canonical Structure
88

99
Valid top-level folders:
10-
- account/
11-
- admin/
1210
- api/
13-
- assets/
14-
- community/
15-
- company/
1611
- deploy/
1712
- dev/
18-
- docs/
19-
- games/
20-
- learn/
21-
- legal/
22-
- marketplace/
23-
- memberships/
24-
- owner/
2513
- src/
26-
- toolbox/
2714
- www/
2815

2916
Root product and repo sections:
30-
- account/, admin/, community/, company/, learn/, legal/, marketplace/, memberships/, and owner/ are production website sections.
31-
- assets/ contains production website and tool assets.
17+
- www/ owns browser-served production website sections, Creator toolbox pages, public game discovery, production Docs & Help, and browser assets.
3218
- api/ is the target Node/API/server application surface for the repository layout simplification workstream.
33-
- docs/ is production Docs & Help content.
34-
- games/ is public game discovery.
35-
- toolbox/ is the Creator toolbox/workspace.
3619
- deploy/ contains deployment configuration.
3720
- dev/ contains the development workspace.
3821
- src/ contains deployable application/runtime/API source.
39-
- www/ is the target browser-served application surface for the repository layout simplification workstream.
22+
- repository root contains standard repository configuration and top-level application shells only.
4023

4124
Deployable application source:
4225
- src/web/{feature-name}/
@@ -75,19 +58,19 @@ Dev workspace ownership:
7558
- dev/tools/ owns development-only tooling.
7659
- dev/workspace/ owns generated output: tmp, zips, logs, generated files, and test-results.
7760

78-
Tools:
79-
- toolbox/{tool-name}/index.html
61+
Browser-served tools:
62+
- www/toolbox/{tool-name}/index.html
8063

81-
Tool assets:
82-
- assets/toolbox/{tool-name}/js/index.js
83-
- assets/toolbox/{tool-name}/css/index.css
64+
Browser-served tool assets:
65+
- www/assets/toolbox/{tool-name}/js/index.js
66+
- www/assets/toolbox/{tool-name}/css/index.css
8467

8568
Themes:
86-
- assets/theme-v1/
87-
- assets/theme-v2/
69+
- www/assets/theme-v1/
70+
- www/assets/theme-v2/
8871

8972
Shared JavaScript:
90-
- assets/js/shared/
73+
- www/assets/js/shared/
9174

9275
Legacy transition buckets:
9376
- src/advanced/
@@ -101,16 +84,16 @@ These legacy transition buckets may remain until explicit migration PRs move the
10184

10285
## Rules
10386

104-
- Root is production website and standard repository configuration only.
105-
- www/ is the browser-served application target surface for migration.
87+
- Root is standard repository configuration and top-level application shells only.
88+
- www/ is the browser-served application surface.
10689
- api/ is the Node/API/server application target surface for migration.
10790
- src/ is deployable application/runtime/API code.
10891
- dev/ is development workspace only.
10992
- deploy/ is deployment configuration.
110-
- docs/ is production Docs & Help content.
93+
- docs/ routes are served from `www/docs/`.
11194
- Theme first.
11295
- Tool CSS second.
113-
- Shared functionality belongs in assets/js/shared/.
96+
- Browser-served shared functionality belongs in `www/assets/js/shared/`.
11497
- No new scattered JS folders.
11598
- No new scattered CSS folders.
11699
- Do not create new folders unless they fit the documented canonical structure.

dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,37 +116,42 @@ Rules:
116116
- Document current browser-served root paths, imports, local server behavior, test assumptions, compatibility needs, and validation lanes.
117117
- Do not move browser files or change package commands.
118118

119-
3. `PR_26180_OWNER_007-move-www-application`
119+
3. `PR_26180_OWNER_007-www-route-root-compatibility`
120+
- Prepare runtime/test route-root compatibility for the future `www/` move.
121+
- Preserve public URLs.
122+
- Keep repository-root serving as the default until the actual move.
123+
124+
4. `PR_26180_OWNER_008-move-www-application`
120125
- Move browser-served application files into `www/`.
121126
- Include root HTML pages, `assets/`, `toolbox/`, `account/`, `legal/`, `learn/`, `play/`, and other browser-served static routes.
122127
- Update internal static references only as needed.
123128
- Do not move API/server files.
124129

125-
4. `PR_26180_OWNER_008-move-api-application`
130+
5. `PR_26180_OWNER_009-move-api-application`
126131
- Move server/API application files into `api/`.
127132
- Include Local API server runtime files, API routes, services, database, storage, auth, publishing, and admin server code.
128133
- Do not move developer-only startup orchestration.
129134
- Browser code must not import from `api/`.
130135

131-
5. `PR_26180_OWNER_009-move-dev-local-runtime`
136+
6. `PR_26180_OWNER_010-move-dev-local-runtime`
132137
- Move developer-only local runtime into `dev/local-runtime/`.
133138
- Include team-aware bootstrap, port config, local startup orchestration, local diagnostics, and browser launch support.
134139
- Update `package.json` commands to point to the new local-runtime paths.
135140

136-
6. `PR_26180_OWNER_010-move-tests-and-validation`
141+
7. `PR_26180_OWNER_011-move-tests-and-validation`
137142
- Ensure all tests and validation suites live under `dev/tests/` or the current canonical dev test structure.
138143
- Update test paths after the `www/`, `api/`, and `dev/` migrations.
139144
- Do not change behavior.
140145

141-
7. `PR_26180_OWNER_011-update-ci-and-scripts`
146+
8. `PR_26180_OWNER_012-update-ci-and-scripts`
142147
- Update CI, package scripts, validation scripts, and developer utilities for the new layout.
143148
- Preserve `npm run dev:bootstrap`, `npm run dev:api`, `npm run dev:web`, and `npm run dev:local-api`.
144149

145-
8. `PR_26180_OWNER_012-remove-legacy-layout`
150+
9. `PR_26180_OWNER_013-remove-legacy-layout`
146151
- Remove or retire obsolete legacy paths after all references are updated.
147152
- Hard stop if any runtime, test, or CI reference still points to old locations.
148153

149-
9. `PR_26180_OWNER_013-final-layout-validation`
154+
10. `PR_26180_OWNER_014-final-layout-validation`
150155
- Validate final repository layout.
151156
- Confirm `www/` owns the browser-served app, `api/` owns the server app, and `dev/` owns the developer workspace.
152157
- Confirm runtime does not depend on `dev/`, browser code does not import `api/`, and legacy references are removed or documented.

dev/build/ProjectInstructions/repository/www_migration_map.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# www Migration Map
22

3-
Status: Active planning map
3+
Status: Implemented migration map
44
Owner: Owner
55
Workstream: Repository Architecture Simplification
6-
PR: PR_26180_OWNER_006-www-migration-map
6+
PR: PR_26180_OWNER_006-www-migration-map; PR_26180_OWNER_008-move-www-application
77

88
## Purpose
99

1010
Document the current browser-served repository surface and the safe sequence required before moving files into `www/`.
1111

12-
This map is a no-runtime-change governance artifact. It does not move browser files, change package commands, change local server behavior, or update runtime imports.
12+
This map began as a no-runtime-change governance artifact. `PR_26180_OWNER_008-move-www-application` used it to move browser-served files under `www/` while preserving public URLs.
1313

1414
## Executive Summary
1515

16-
The browser-served application currently depends on repository-root static serving.
16+
The browser-served application now lives under `www/`.
1717

18-
Current local runtime, test helpers, and browser pages assume URLs such as `/index.html`, `/toolbox/index.html`, `/assets/theme-v2/css/theme.css`, `/account/sign-in.html`, `/admin/system-health.html`, and `/games/index.html` resolve from the repository root.
18+
Current local runtime, test helpers, and browser pages keep URLs such as `/index.html`, `/toolbox/index.html`, `/assets/theme-v2/css/theme.css`, `/account/sign-in.html`, `/admin/system-health.html`, and `/games/index.html` while resolving browser-served files from `www/`.
1919

20-
Moving browser files into `www/` is feasible, but the move must preserve public route URLs while changing the filesystem lookup root. A direct folder move without route compatibility would break Playwright tests, local API static serving, team-aware bootstrap static serving, Node test root aliases, and browser imports that still reference root-level `src/`, `toolbox/`, and `assets/`.
20+
The move preserved public route URLs while changing the filesystem lookup root. Repository-root fallback remains available for transition-only compatibility, including browser imports that still reference root-level `src/`.
2121

2222
## Current Browser-Served Surface
2323

24-
Current root-level browser-served entry points and folders include:
24+
Current browser-served entry points and folders now live under `www/`:
2525

2626
| Path | Current role | Files | HTML files | Move target |
2727
| --- | --- | ---: | ---: | --- |
@@ -75,7 +75,7 @@ These URLs should continue working for users and tests during the move:
7575
- `/marketplace/index.html`
7676
- `/memberships/index.html`
7777

78-
### Rewrite filesystem lookup paths
78+
### Rewritten filesystem lookup paths
7979

8080
Static servers and test helpers should map public URLs to `www/` filesystem paths after the move:
8181

@@ -172,17 +172,21 @@ Recommended approach for the actual move PR:
172172

173173
## Route Root Compatibility Toggle
174174

175-
`PR_26180_OWNER_007-www-route-root-compatibility` installs the local compatibility switch without moving browser files.
175+
`PR_26180_OWNER_007-www-route-root-compatibility` installed the local compatibility switch without moving browser files.
176176

177-
The future activation toggle is:
177+
`PR_26180_OWNER_008-move-www-application` moves browser-served files into `www/` and makes local static serving prefer `www/` by default.
178+
179+
The local static serving root is now `www/` by default. The explicit activation toggle remains:
178180

179181
```text
180182
GAMEFOUNDRY_LOCAL_WEB_ROOT=www
181183
```
182184

183-
Default behavior remains current repository-root static serving when `GAMEFOUNDRY_LOCAL_WEB_ROOT` is unset, empty, `.`, `root`, or `repo-root`.
185+
Default behavior is now `www/` static serving when `GAMEFOUNDRY_LOCAL_WEB_ROOT` is unset or empty.
186+
187+
When `GAMEFOUNDRY_LOCAL_WEB_ROOT=www`, local static serving explicitly prefers `www/` for public browser URLs while retaining repository-root fallback for compatibility during migration.
184188

185-
When `GAMEFOUNDRY_LOCAL_WEB_ROOT=www`, local static serving prefers `www/` for public browser URLs while retaining repository-root fallback for compatibility during migration.
189+
When local validation needs the prior root behavior, `GAMEFOUNDRY_LOCAL_WEB_ROOT=repo-root` resolves static files from the repository root.
186190

187191
This toggle is for local runtime and test helpers only. It does not change production deployment, public URLs, API routes, or package commands.
188192

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# PR_26180_OWNER_008 Branch Validation
2+
3+
## Result
4+
5+
PASS
6+
7+
## Checks
8+
9+
| Check | Result |
10+
|---|---|
11+
| Startup validation completed | PASS |
12+
| Project Instructions version loaded | PASS: `2026.06.28.007` at task start; PR updates docs to `2026.06.28.008` |
13+
| `PROJECT_BRANCHING_POLICY.md` loaded | PASS |
14+
| Current branch | PASS: `PR_26180_OWNER_008-move-www-application` |
15+
| Stacked base branch | PASS: created from `PR_26180_OWNER_007-www-route-root-compatibility` |
16+
| Worktree before branch creation | PASS: clean |
17+
| Reports path | PASS: `dev/reports/` |
18+
| ZIP path | PASS: `dev/workspace/zips/` |
19+
20+
## Dependency Order
21+
22+
1. `PR_26180_OWNER_006-www-migration-map`
23+
2. `PR_26180_OWNER_007-www-route-root-compatibility`
24+
3. `PR_26180_OWNER_008-move-www-application`
25+
26+
PR008 must be reviewed and merged after PR007.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# PR_26180_OWNER_008 Manual Validation Notes
2+
3+
## Manual Notes
4+
5+
`npm run dev:bootstrap -- --team owner` is a long-running local startup command that launches the Owner web/API runtime and may open a browser. It was documented as manual validation rather than left running during this Codex execution.
6+
7+
Expected manual verification:
8+
9+
1. Run `npm run dev:bootstrap -- --team owner`.
10+
2. Confirm diagnostics show Owner/default ports:
11+
- Web URL: `http://127.0.0.1:5500`
12+
- API URL: `http://127.0.0.1:5501/api`
13+
- Browser launch: `http://127.0.0.1:5500/index.html`
14+
3. Open:
15+
- `http://127.0.0.1:5500/index.html`
16+
- `http://127.0.0.1:5500/toolbox/index.html`
17+
- `http://127.0.0.1:5500/account/sign-in.html`
18+
- `http://127.0.0.1:5500/admin/system-health.html`
19+
- `http://127.0.0.1:5500/games/index.html`
20+
4. Confirm public URLs remain unchanged while files are served from `www/`.
21+
22+
## Local Artifact Note
23+
24+
An ignored local file, `assets/DemoGame-26168-001.gfsp`, keeps a physical `assets/` folder visible in this checkout. It is not tracked and was not moved or committed.

0 commit comments

Comments
 (0)