Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .claude/skills/visual-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ STRESS_SEED_ALLOWED_HOSTS=ep-<branch> mise exec -- pnpm payload run scripts/seed

```sh
mise exec -- pnpm preview:experience:build
mise exec -- pnpm preview:experience # http://127.0.0.1:3100, read-only database session
mise exec -- pnpm preview:experience # http://127.0.0.1:7300, read-only database session
```

The bot guard returns 403 to curl-like user agents; the scripts send a browser user agent.
Expand All @@ -41,7 +41,7 @@ The bot guard returns 403 to curl-like user agents; the scripts send a browser u

```sh
node .claude/skills/visual-review/scripts/crawl-snapshot.mjs https://www.lyovson.com /tmp/before.json
node .claude/skills/visual-review/scripts/crawl-snapshot.mjs http://127.0.0.1:3100 /tmp/after.json
node .claude/skills/visual-review/scripts/crawl-snapshot.mjs http://127.0.0.1:7300 /tmp/after.json
node .claude/skills/visual-review/scripts/crawl-snapshot.mjs --diff /tmp/before.json /tmp/after.json
```

Expand All @@ -51,7 +51,7 @@ Expect differences only where the change intends them. Stress pages exist only o

```sh
OUT=/tmp/shots TAG=my-change ROUTES=/,/posts,/activities \
node .claude/skills/visual-review/scripts/screenshots.mjs https://www.lyovson.com http://127.0.0.1:3100
node .claude/skills/visual-review/scripts/screenshots.mjs https://www.lyovson.com http://127.0.0.1:7300
```

Review desktop and phone, light and dark. Then run the standard gate from AGENTS.md (`pnpm lint` last) and `PLAYWRIGHT_BASE_URL=http://127.0.0.1:3100 pnpm test:browser`.
Review desktop and phone, light and dark. Then run the standard gate from AGENTS.md (`pnpm lint` last) and `PLAYWRIGHT_BASE_URL=http://127.0.0.1:7300 pnpm test:browser`.
2 changes: 1 addition & 1 deletion .claude/skills/visual-review/scripts/screenshots.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// dark, for side-by-side review.
//
// OUT=/tmp/shots TAG=change ROUTES=/,/activities node screenshots.mjs \
// https://www.lyovson.com http://127.0.0.1:3100
// https://www.lyovson.com http://127.0.0.1:7300
import { mkdirSync } from "node:fs";
import { createRequire } from "node:module";

Expand Down
2 changes: 1 addition & 1 deletion .cursor/environment.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Lyovson.com",
"install": "bash .cursor/install.sh",
"ports": [{ "name": "web", "port": 3100 }]
"ports": [{ "name": "web", "port": 7300 }]
}
12 changes: 11 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@ Use mise and pnpm with the committed versions. [package.json](package.json) owns

## Project contracts

- Preserve the responsive grid-card design, theme tokens, and custom breakpoints in `src/app/(frontend)/globals.css`; reuse `src/components/grid/`. Desktop grid units are 400px, while mobile cards fit their container.
- Payload collections and hooks own content publication, access, embeddings, and invalidation. Preserve public-read predicates, private-field filtering, paid-work authorization, unchanged-content skips, and recursion guards. Inspect current hooks/jobs before changing these paths.
- Lexical editors share `src/fields/default-lexical.ts` and `src/fields/lexical-configs.ts`. Update these owners rather than duplicating editor configs. Regenerate Payload types/import maps when their inputs change using `pnpm generate:types` and `pnpm generate:importmap`.
- Consult [README.md](README.md) for setup and database discovery. Never touch production machines or the production database. Run no migrations. Use no paid APIs. A `POSTGRES_URL` used for a build or preview must be a Neon development branch, never the production `main` branch.

## Design

- **Tokens:** [`src/app/(frontend)/globals.css`](src/app/(frontend)/globals.css) is the only source. The named palette (`--paper`, `--ink`, `--wave-blue`, `--cedar-gold` and the rest, in OKLCH) sits in `:root` and `.dark`; the shadcn semantic and `--accent-*` tokens mix from it in Oklab; `@theme inline` exposes them to Tailwind with the type scale and the grid breakpoints `g1`–`g5` (420–2100px). Style with token utilities, add a token there before using a new colour, and keep raw colours out of components. Light and dark both ship.
- **Layout:** preserve the responsive grid-card design and reuse `src/components/grid/`. Desktop grid units are 400px; mobile cards fit their container.
- **Type:** IBM Plex Sans, Serif and Mono, self-hosted through `next/font/local` in `src/app/(frontend)/fonts.ts` (`--font-sans`, `--font-serif`, `--font-display`, `--font-mono`).
- **Components:** shadcn/ui, style `new-york` on Radix ([components.json](components.json)), icons from lucide. Add primitives with the shadcn CLI. Avenews uses `base-nova` on Base UI on purpose; do not convert either project to match the other.
- **Mark:** the crest. `src/components/Logo/logo.tsx` renders `public/crest-dark-simple.webp` and inverts it for dark mode; the full marks are in `public/brand/`.
- **Assets:** site icons and the OG image live in `public/`; editorial media goes through Payload's Media collection to Vercel Blob, not the repo.
- **AI imagery:** none is in use. Adding any needs Rafa's approval; it must not depict a real person or imitate a real brand, and the commit records the tool and prompt. Label it visibly when it shows realistic people, places or events (EU AI Act Art. 50).
- **Proof:** visual changes go through the `visual-review` skill (desktop and phone, light and dark).

## Verification

Use focused checks during edits. Before pushing to `main`, run:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create `.env.local` with the configuration needed for your environment:
Point `POSTGRES_URL` at a Neon development branch, never at the production `main` branch. Then start development:

```sh
mise exec -- pnpm dev --port 3100
mise exec -- pnpm dev
```

Payload's development schema push is off unless `PAYLOAD_DB_PUSH=true`. Apply schema changes with migrations, and enable push only on a disposable database. Disabling push does not prevent application writes. For public browsing checks against an existing database, the preview commands also enforce read-only database transactions and clear the OpenAI and Resend keys:
Expand All @@ -45,7 +45,7 @@ mise exec -- pnpm preview:experience:build
mise exec -- pnpm preview:experience
```

The preview runs at `http://localhost:3100`. Use an isolated database for CMS edits or migration work.
The dev server and the preview both run at `http://localhost:7300`, inside lyovson.com's port range on Artemis (7300–7399; the 3000s belong to Avenews). Use an isolated database for CMS edits or migration work.

## Database discovery

Expand Down
2 changes: 1 addition & 1 deletion e2e/public-navigation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ test("public pages remain navigable without JavaScript", async ({
const context = await browser.newContext({ javaScriptEnabled: false });
const page = await context.newPage();
await page.goto(
`${test.info().project.use.baseURL || process.env.PLAYWRIGHT_BASE_URL || "http://localhost:3100"}/`
`${test.info().project.use.baseURL || process.env.PLAYWRIGHT_BASE_URL || "http://localhost:7300"}/`
);
await expect(
page.getByRole("navigation", { name: "Main navigation" })
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"build": "cross-env NODE_OPTIONS=--no-deprecation payload build",
"dev": "cross-env NODE_OPTIONS=--no-deprecation next dev",
"dev": "cross-env NODE_OPTIONS=--no-deprecation next dev --port 7300",
"dev:https": "cross-env NODE_OPTIONS=--no-deprecation next dev --experimental-https",
"generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap",
"generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types",
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
reporter: "list",
outputDir: "/private/tmp/lyovson-playwright-results",
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://localhost:3100",
baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://localhost:7300",
trace: "retain-on-failure",
},
projects: [
Expand Down
2 changes: 1 addition & 1 deletion scripts/public-experience-preview.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ database.searchParams.set("options", "-c default_transaction_read_only=on");
env.POSTGRES_URL = database.toString();
const args =
command === "start"
? ["start", "--hostname", "127.0.0.1", "--port", "3100"]
? ["start", "--hostname", "127.0.0.1", "--port", "7300"]
: ["build"];
const child = spawn(
process.execPath,
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/site-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DEFAULT_CANONICAL_ORIGIN = "https://www.lyovson.com";
const DEFAULT_RUNTIME_ORIGIN = "http://localhost:3000";
const DEFAULT_RUNTIME_ORIGIN = "http://localhost:7300";
const DEFAULT_OG_IMAGE_PATH = "/og-image.png";
const DEFAULT_LOGO_PATH = "/android-chrome-512x512.png";

Expand Down
Loading