Files
ulicraft-server-v1/plan/09-landing.md
2026-05-24 04:03:42 +02:00

54 lines
2.5 KiB
Markdown

# Landing page — guest onboarding site
## Summary
Apex `ulicraft.local` serves a clean static page guiding guests through joining:
download launcher → add account → import modpack → connect. Built with **Astro +
TypeScript** in its own `./landing/` project; `npm run build` emits straight into
`./www/`, which Caddy already serves at the apex domain. No runtime JS framework —
output is plain HTML/CSS plus one tiny copy-to-clipboard script.
## Stack & wiring
- `landing/` — Astro project (own `package.json`, `tsconfig`).
- `astro.config.mjs``outDir: "../www"`. Build overwrites `www/`; `www/` is
gitignored (generated artifact).
- `BASE_DOMAIN` env read at build time in `src/data/site.ts`
(`process.env.BASE_DOMAIN ?? "ulicraft.local"`). Bake before deploy:
`BASE_DOMAIN=ulicraft.local pnpm run build`.
- Logo: drop PNG at `landing/public/logo.png` → copied to `www/logo.png`,
referenced as `/logo.png` (favicon + hero). `image-rendering: pixelated` keeps
the stone 3D logo crisp.
## Content (src/data/site.ts is the single source)
- Hero: logo, name, server address `mc.${BASE_DOMAIN}:25565` (copy button).
- Step 1: launcher downloads — 3 OS buttons → `/launcher/latest/<stable>`.
- Step 2: add authlib-injector account, URL `http://auth.${BASE_DOMAIN}/authlib-injector`,
register link to `http://auth.${BASE_DOMAIN}`.
- Step 3: import packwiz `http://packwiz.${BASE_DOMAIN}/pack.toml`.
- Step 4: connect to server address.
## Launcher download links (Option A — stable symlinks)
Page links to fixed names so they survive launcher version bumps:
- `fjord-windows-setup.exe`
- `fjord-macos.dmg`
- `fjord-linux-x86_64.AppImage`
`tooling/fetch-launcher.sh` must create these as symlinks under
`mirror/launcher/latest/` pointing at the real versioned assets. **Keep the names
in sync** between `site.ts` and the script. Caddy mount
`./mirror/launcher:/srv/www/launcher:ro` makes them resolve at `/launcher/latest/…`.
## Tasks
- [ ] User: place logo at `landing/public/logo.png`
- [ ] `cd landing && pnpm install`
- [ ] `BASE_DOMAIN=ulicraft.local pnpm run build` → verify `www/index.html` + `www/logo.png`
- [ ] Extend `fetch-launcher.sh`: after download, symlink stable names → versioned files
(resolve which asset = win setup / mac dmg / linux AppImage)
- [ ] Confirm Caddy serves apex from `./www` and `/launcher/latest/*` from mirror
- [ ] Optional: pin launcher tag instead of `latest` for party day
- [ ] Optional: add a "what's in the pack" section once mod list firms up