Frontend Playground
Notes
Sop 1
-
SOP: Frontend Experiment Setup
sop-frontend-experimentPurpose
Standard process for adding a new frontend experiment to the playground, and promoting approved prototypes to production SvelteKit apps.
Core Principle: Playground IS Production
SvelteKit
.sveltefiles ARE HTML. A playground prototype is not "inspiration" — it IS the implementation. The promotion path is copy-paste, not rewrite:- Copy the
<style>block → paste into the.sveltecomponent's scoped<style>(or intoapp.cssfor shared styles) - Copy the HTML structure → paste into the
.sveltetemplate - Replace hardcoded text with
{data.foo}Svelte bindings - Add
+page.server.tsto fetch the real data
That's it. No screenshots. No "porting." No interpretation. The prototype IS the code.
Rule
Vanilla HTML, CSS, and JavaScript only. No npm. No SvelteKit. No build step. If it can't be opened directly in a browser, it doesn't belong in the playground.
Playground Structure
Component What It Is Example Hub repo CSS philosophy guide + landing page. No project prototypes. pal-e-playgroundProject playground repo Each product project owns its own [project]-playgroundrepo for HTML/CSS prototyping.westside-playground,mcd-tracker-playgroundProcedure: Create Project Playground Repo
- Create Forgejo repo —
forgejo_admin/[project]-playground - Clone locally —
git clone ... ~/[project]-playground - Add index.html — follow
convention-frontend-css(Atkinson Hyperlegible,#fafafabg,max-width: 48rem, mobile breakpoint 600px). Readpal-e-playground/guide/first. - Add nginx subpath — add a
location /[project]/ { alias /srv/[project]-playground/; }block to the playground nginx config + hostPath mount for~/[project]-playground. This serves the new repo atplayground.tail5b443a.ts.net/[project]/. - Update hub landing page — add a link to the new subpath in
pal-e-playground/index.html. Push to the hub repo. - Verify on phone — open
playground.tail5b443a.ts.net/[project]/and confirm it renders. - Register — add repo to
project-frontend-playgroundRepos table under Project Playground Repos. - Push to Forgejo
cd ~/[project]-playground git add . git commit -m "initial prototype" git push
Procedure: Hub Repo Maintenance
- The hub repo (
pal-e-playground) contains only:guide/index.html(CSS philosophy reference) andindex.html(landing page linking to all project subpaths). - Landing page is the live directory — it links to every project playground via subpath (e.g.
/westside/,/mcd-tracker/). Update it whenever a new project onboards. - Guide updates — when CSS conventions change, update
convention-frontend-cssfirst, then update the guide to match. - No project prototypes in the hub — project prototypes live in their own
[project]-playgroundrepos, served as subpaths under the same Tailscale funnel.
Promotion to Production
- Approve on phone — Lucas verifies the prototype looks right on mobile
- Create Forgejo issue on target repo (pal-e-app, westside-app, etc.) referencing the prototype path
- Direct copy-paste — the dev agent's job is mechanical:
- Copy CSS into scoped
<style>orapp.css - Copy HTML into
.sveltetemplate - Replace hardcoded hex values with
var(--color-*)custom properties - Replace hardcoded text/data with
{data.foo}Svelte bindings - Add
+page.server.tsfor data fetching
- Copy CSS into scoped
- QA review — verify zero hardcoded hex, all data bindings correct, mobile responsive
- Lucas verifies production on phone before merge
Why This Works
SvelteKit components are HTML with superpowers. A
.sveltefile has three sections:<script>, HTML template, and<style>. The HTML template IS HTML. The<style>IS CSS. The only translation from playground to production is adding the<script>for data binding and replacing static content with template expressions.Proven by: F11c home page (PR #37). Prototype at
html-playground/6-pal-e-home/→ direct port to+page.sveltein one dev agent dispatch.What NOT to Do
- Don't add
package.jsonto a playground experiment - Don't try to connect to live APIs from the playground — use hardcoded/fake data
- Don't skip the phone check — if it's not mobile-friendly, it's not ready
- Don't let agents design the look — agents port proven CSS, they don't create it
- Don't use screenshots as an intermediary — the HTML/CSS IS the spec
- Don't "reinterpret" the prototype — copy it literally, then swap data bindings
Related
project-frontend-playground— parent projectdoc-html-playground— philosophy + infra referenceconvention-frontend-css— CSS custom property rulesfeedback_playground_first— the original feedback that established this conventionfeedback_frontend_iteration— frontend must iterate with Lucas in the loop
- Copy the
Project Page 1
-
Project: Frontend Playground
project-frontend-playgroundVision
The frontend development practice. Prove visual design with vanilla HTML, CSS, and JavaScript before committing to production repos. Zero framework overhead. Immediate feedback on any device. Lucas iterates here personally — agents don't ship frontend without visual approval.
Rule: vanilla HTML, CSS, and JavaScript only. No npm, no SvelteKit, no build step. If it can't be opened directly in a browser, it doesn't belong in a playground. SvelteKit and framework concerns live in production repos (pal-e-app, westside-app).
User Stories
- As Lucas, I want to prototype a page layout on my phone in minutes, so that I can lock the visual design before any agent writes framework code.
- As Lucas, I want to save an HTML file and immediately see it on my phone via the Tailscale funnel, so that iteration is instant with zero build steps.
- As a new project, I want a clear SOP for creating my own playground repo that follows the established CSS philosophy.
- As a dev agent, I want a proven HTML/CSS prototype to copy-paste into a SvelteKit production app, so that I know exactly what CSS to port.
Architecture
Linked-Repo Model
Each product project owns its own
-playgroundrepo. Thepal-e-playgroundrepo is the hub — it contains the CSS philosophy guide and landing page, not project prototypes. Project playground repos are listed under both their own project AND under this project as references.pal-e-playground/ ← hub repo (CSS guide + landing page only) index.html ← landing page with guide link guide/ ← canonical CSS philosophy reference index.html westside-playground/ ← separate repo, Westside prototypes mcd-tracker-playground/ ← separate repo, mcd-tracker prototypes (future)How It Works
Each playground repo is served via nginx hostPath + Tailscale funnel. Save a file locally, refresh the browser on any device — instant. No build, no deploy, no CI.
Frontend Development Workflow
Layer Tool Who Purpose CSS reference pal-e-playground/guide/ Agents + Lucas Canonical CSS philosophy — 3 systems, 5 properties, 10 rules, debugging playbook Visual design [project]-playground repo Lucas Prove the look, mobile-first, iterate fast Backend / API pal-e-docs, basketball-api, etc. Agents Data model, endpoints, business logic Production frontend pal-e-app, westside-app (SvelteKit) Agents → Lucas verifies Marry proven CSS with real data + interactivity Promotion Path
- Playground — iterate on HTML+CSS in the project's own playground repo until it looks right on phone
- The HTML/CSS IS the spec — no screenshots as intermediary
- Agent ports to production — dev agent copy-pastes the proven CSS into the SvelteKit repo
- Lucas verifies on device — production result checked on phone before merge
Project Onboarding
When a new project needs a frontend, follow
sop-frontend-experiment:- Create a
[project]-playgroundForgejo repo - Read
convention-frontend-cssand thepal-e-playground/guide/before writing any CSS - Prototype with hardcoded/fake data — prove the look, not the data
- Set up nginx hostPath + Tailscale funnel for phone verification
- When approved, create Forgejo issue on the production repo referencing the prototype
Status
- pal-e-playground repo: LIVE. Hub + CSS guide. PR #2 merged (2026-03-16).
- westside-playground: Existing, stays as its own repo.
- html-playground: ARCHIVED. Guide content recreated in pal-e-playground.
- Convention + SOP: Updated with linked-repo model, debugging playbook, 3 layout systems, 5 core properties.
Milestones
- 2026-03 (original) — html-playground created. 5 SvelteKit experiments. Experiment #3 promoted to westside-app.
- 2026-03-15 — Philosophy reset: vanilla HTML/CSS/JS only.
- 2026-03-15 — Linked-repo model established.
pal-e-playground= hub + CSS guide. Each project owns its own-playgroundrepo. Convention and SOP updated with debugging playbook, 3 layout systems, 5 core properties.
Repos
Hub Repo
Repo Platform Role forgejo_admin/pal-e-playgroundForgejo CSS philosophy guide + landing page (hub only — no project prototypes) Project Playground Repos
Repo Platform Product Project Production Repo forgejo_admin/westside-playgroundForgejo Westside Basketball westside-app Archived
Repo Platform Status forgejo_admin/playgroundForgejo ARCHIVED — replaced by pal-e-playground Key Conventions
convention-frontend-css— the CSS rules, layout systems, debugging playbooksop-frontend-experiment— how to create playground repos and onboard projects
Board
No board yet. Work tracked via plan-pal-e-agency Phase 14. Board created when sustained execution begins.
Repos 1
-
pal-e-playgroundactive