AGENTS.md
Profectus is a browser game built with Fresh v2 (Vite plugin) on Deno. All playable heroes are women.
Commands
Always use mise (mise run <task>); it manages the Deno version via
mise.toml.
mise run dev– dev server (vite)mise run check– verify formatting, lint, types (deno fmt --check . && deno lint . && deno check); run before finishing any changemise run fmt– format + lintmise run build/mise run start– production build (_fresh/) and servemise run deploy– deploy to Deno Deploy
No test suite exists yet; check is the verification step.
Stack & conventions
- Fresh v2 with the Vite plugin (
@fresh/plugin-viteinvite.config.ts) — NOT classic Fresh; dev/build go through vite. - Styling: Tailwind CSS v4 via the vite plugin, plus DaisyUI components for
all UI. Import CSS in
client.tsfor HMR. - Routes are file-system based (
routes/, registered byapp.fsRoutes()inmain.ts). Interactive islands live inislands/. - Shared typed state:
createDefine<State>()inutils.ts; extendStatethere when adding context values. - Path alias
@/→ repo root (seedeno.jsonimports). - JSX compiles precompiled (preact) per
deno.jsoncompilerOptions — keep the config as is.
Database
- Turso (libSQL) at
turso://profectus-silenloc.aws-eu-west-1.turso.io. Use the official client (@libsql/client), no ORMs or other drivers unless asked. - Credentials come from env (
dotenvfiles are gitignored).
Auth & roles
- Not logged in → login page (with account creation). Logged-in users land directly back in the game.
- Admin bootstrap: the first admin is granted via env var holding an email
address (owner:
silen.locatelli@gmx.ch). Do not build a UI-only admin promotion path without keeping this env mechanism.
Game design constraints
- Player picks one class at start: shield maiden, witch, or assassin.
- Only female heroes/characters; never add male player characters or pronouns/art implying them.
Visual style: Luminous medieval mysticism
All UI follows a medieval-fantasy manuscript direction, implemented as a custom daisyUI theme. It should feel enchanted and old-world without becoming dark or grim:
- Colors: warm parchment, misted sage, moonlit blue, amethyst, and
restrained antique gold. Map
base-100/200/300to light parchment and botanical surfaces; reserve deeper colors for text, borders, and focal actions. - Shape: soft arches, shield silhouettes, illuminated-manuscript borders, crescent moons, stars, vines, and carved-stone details. Use modest rounded corners rather than sharp modern geometry.
- Layout: calm, balanced compositions with ample breathing room and a clear central focus. Layer translucent light and subtle texture for magical depth.
- Typography: uncial or calligraphic display faces for key titles, small-cap old-style serifs for headings and controls, and a readable book serif for body copy.
- Motion: gentle and uncanny: drifting light, soft aura pulses, and small celestial glints. Keep motion subtle and preserve readability.