wwwis the Astro / MDX / raw TypeScript site for Incomplete Infinity / U29DC.
- Primary references: Astro, Astro MDX, Astro content collections, Vite, MDX, Tailwind CSS, Cloudflare Workers, WebGL, WebGPU
- Local source-of-truth files:
package.json,astro.config.ts,wrangler.jsonc,public/_headers,src/layouts/layout.astro,src/app/app.ts,src/app/core/loop.ts,src/content.config.ts - Edit
AGENTS.mdonly;README.mdandCLAUDE.mdare symlinks to it for tool compatibility.
.
├── src/
│ ├── pages/ Astro routes, article exports, sitemap, robots, llms.txt
│ ├── layouts/ global document shell and metadata
│ ├── components/ chrome, home, artifacts, MDX, logo, and core UI components
│ ├── content/ authored MDX artifacts
│ ├── data/ site copy, links, mark metadata, and constants
│ ├── assets/ flat imported source assets such as tiny inlined mark WebPs
│ ├── app/ browser runtime: core loop, systems, UI owners, graphics, and runtime utilities
│ ├── lib/ portable content, media URL, markdown, and build/export utilities
│ └── styles/ tokens, base, layout, prose, preview, and motion CSS
├── public/ static headers, icons, local fonts, logo, and OG image
├── astro.config.ts Astro, MDX, Tailwind, GLSL string minification, and Cloudflare adapter config
├── wrangler.jsonc Cloudflare Worker and asset deployment config
└── AGENTS.md canonical repo-level agent instructions
- Start with
src/layouts/layout.astrofor shell, metadata, header persistence, grid guide, route router, and the single browser app import. - Start with
src/app/app.ts,src/app/core/owner.ts, andsrc/app/core/loop.tsfor browser runtime ownership, owner order, and frame-loop behavior. - Start with
src/pages/index.astrofor homepage composition andsrc/pages/[slug].astrofor artifact pages. - Start with
src/content.config.ts,src/lib/artifacts.ts, andsrc/lib/markdown.tsfor content collection, visibility, sorting, and markdown export behavior.
| Layer | Choice | Notes |
|---|---|---|
| Routing / render | Astro static output | Cloudflare adapter emits Worker-compatible static assets |
| Content | MDX content collections | authored artifacts in src/content/*.mdx |
| Styling | Tailwind CSS v4 + CSS tokens | inline utilities for component-local styling; shared CSS for tokens, layout, global selectors, and runtime hooks |
| Browser logic | raw TypeScript runtime in src/app |
one app bootstrap, explicit lifecycle owners, and a single shared frame loop |
| Motion / scroll | Astro route bridge + custom app loop | custom scroll owner; keep hot motion transform/opacity-based, native-scroll compatible, and reduced-motion aware |
| Graphics | standalone WebGL under src/app/graphics |
keep canvas logic portable outside Astro and routed through the app runtime |
| Deployment | Cloudflare Workers | headers live in public/_headers; Worker config lives in wrangler.jsonc |
bun install- install dependencies and refresh the lockfile.bun run dev- start Astro locally onlocalhost:3000.bun run build- build the Astro site.bun run preview- preview the production build.bun run deploy- runbun run util:check, then deploy with Wrangler.bun run update- update normal packages, then re-pin Astro, MDX, and the Cloudflare adapter to alpha.bun run util:format- apply and verify formatting with Oxfmt.bun run util:lint- lint and auto-fix with Oxlint.bun run util:check- format, lint-fix, type-check, and build.bun run util:clean- remove Astro/build caches.
src/layouts/layout.astroowns global CSS, metadata, canonical/OG/Twitter tags, font preloads, the persistent header, grid guide, page shell, route router, and the single browser runtime import.src/pages/index.astrocomposes the homepage in this order: origin, protocols, artifact studies, artifact fragments, optional signals, connect.src/pages/[slug].astrorenders artifact detail pages with article metadata, MDX content, hidden metadata, and connect footer.src/pages/[slug].md.ts,src/pages/[slug].txt.ts,src/pages/llms.txt.ts,src/pages/rss.xml.ts, andsrc/pages/feed.json.tsare first-class machine-readable surfaces. Keep them aligned with visible content when copy or MDX behavior changes.- Runtime behavior uses
data-*attributes as the contract between Astro markup, CSS, andsrc/app/*. Extend the existing hook contract for new runtime state. src/app/app.tsis the browser composition root. It starts systems first (device,route,scroll,motion) and UI owners second (lines,media,preview,logo).src/app/core/loop.tsis the only app-ownedrequestAnimationFramescheduler. Runtime owners wake it when work exists and sleep when idle.src/app/core/owner.tsdefines the lifecycle owner contract. Owner files should read in this order: imports, types/constants, class fields, lifecycle methodspreinit,init,resize,read,update,write,post,dispose, then private helpers and exports.src/app/core/state.tsowns stable cross-owner state types socoredoes not import downstream systems or UI.src/app/core/tokens.tscentralizes TypeScript-side motion, preview, media, and line-reveal timing defaults. Keep it aligned withsrc/styles/tokens.csswhen CSS motion tokens change.src/app/systems/route.tsowns route state and the Astro transition bridge. Other owners subscribe to route state instead of importingastro:transitions/client.src/app/systems/scroll.tsowns custom smooth scroll. Keep the model explicit with actual, animated, target, velocity, direction, limit, and native fallback state.src/app/ui/lines.ts,src/app/ui/media.ts,src/app/ui/preview.ts, andsrc/app/ui/logo.tsown DOM enhancement behavior.src/app/graphics/canvas.tsowns logo canvas/WebGL rendering, diagnostics, and fallback safety. It must use the shared core loop, not a second RAF loop.
Runtime philosophy:
- Every frame must have an owner, reason, and place in the loop.
- Async work may load, decode, play, or fail, but it should report state instead of owning runtime control flow.
- Device capability is policy. Expensive owners should ask the device profile before starting high-cost work.
- CSS transitions are valid when the runtime owns the state change, the transition is transform/opacity-oriented, reduced motion is explicit, and interruption/failure leaves the page usable.
- Keep Astro as the static renderer and route event source, not the center of browser architecture.
- MDX frontmatter controls artifact type, date, visibility, thumbnails, hover previews, and export metadata.
isArtifactItem: falsehides an artifact from public listings and exports. src/lib/markdown.tspowers markdown/text exports and first-media extraction. Changes here affect article routes,llms.txt, and hover preview defaults.- Rich origin copy in
src/components/home/origin.astroand plain origin copy insrc/data/copy.tsshould stay semantically aligned. - Local fonts live under
public/fonts. Tiny link mark WebPs live flat undersrc/assetsand are imported inline bysrc/data/marks.ts. Article media resolves through the configured media base URL, currentlyhttps://storage.u29dc.com/assets/. - This repository is public. Keep private vault material, client-sensitive detail, secrets, and personal runtime data in private systems outside the repo.
- Keep content portable. Prefer MDX frontmatter and content collections over framework-specific data machinery.
- Keep creative effects portable. Put browser runtime, canvas, WebGL, WebGPU, scroll, preview, and motion logic in
src/appmodules that can survive a future framework migration. - Keep Astro pages mostly static. Client JavaScript belongs to visible interaction, media, graphics, and progressive enhancement paths.
- The browser experience is an Astro-rendered document plus raw TypeScript owners under
src/app; route, scroll, motion, preview, media, and graphics behavior should fit that ownership model. - Prefer plain
.astro,.mdx,.ts, and CSS files until a heavier abstraction is clearly useful. - Prefer one-word filenames for runtime owners and helpers where they stay clear:
scroll.ts,motion.ts,lines.ts,media.ts,logo.ts,route.ts,loop.ts,owner.ts,canvas.ts. - Keep
src/appimport direction simple:app -> core/systems/ui,systems -> core/utils,ui -> core/systems/graphics/utils,graphics -> core/utils, andutils -> no app owners. - Keep
src/libfree of browser runtime ownership. It is for portable content/export utilities, not app lifecycle, frame scheduling, or visual controllers. - Prefer inline Tailwind utilities for component-local styling. Keep shared CSS for tokens, document defaults, layout primitives, MDX prose, animation selectors, and runtime state selectors.
- Use Lucide icons for standard interface icons. Reserve custom drawing for logos, graphics, and bespoke visual effects.
- Treat
src/styles/layout.css,layout-grid,layout-lane, andlayout-lane-wideas high blast-radius. They align the header, homepage, article pages, connect footer, and grid guide. - Treat
src/app/core/loop.ts,src/app/core/owner.ts, andsrc/app/core/timer.tsas high blast-radius. They define frame order, lifecycle semantics, wake/sleep behavior, and timer handoff for the whole client runtime. - Treat
src/app/systems/scroll.tsas performance-sensitive interaction code. Preserve native fallback, reduced-motion behavior, keyboard/bar/route scroll compatibility, and minimal wheel-handler work. - Treat
src/app/ui/preview.ts,src/lib/hover.ts, andsrc/app/ui/lines.tsas performance-sensitive interaction code. Keep pointer work loop-batched and hot writes transform/opacity-oriented. - Treat
src/app/ui/logo.tsandsrc/app/graphics/canvas.tsas fragile visual code. Preserve reduced-motion, low-power fallback, canvas visibility, and nonblank rendering. - Treat
public/_headers,wrangler.jsonc, andastro.config.tsas deployment/security-sensitive. Run the full quality gate after config changes. - Generated output such as
dist/,.astro/,.wrangler/,node_modules/, and cache directories is regenerated from source.
- Required gate for code, config, content-export, and dependency changes:
bun run util:check. - For dependency or config changes, run
bun installfirst when the lockfile may need to change. - For visual work, run
bun run devand verify desktop and mobile browser views before reporting completion. - For hover previews, page transitions, smooth scroll, and WebGL work, verify client-side navigation as well as first load.
- For WebGL/WebGPU work, verify reduced-motion, low-power fallback, canvas visibility, and nonblank rendering.
- If validation is intentionally limited, state exactly what was not run and the residual risk.