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
58 changes: 58 additions & 0 deletions .github/workflows/react-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# React Doctor — finds security, performance, correctness, accessibility,
# bundle-size, and architecture issues in React codebases.
#
# Docs: https://www.react.doctor/ci
# Source: https://github.com/millionco/react-doctor

name: React Doctor

on:
# Scans the PR's changed files and posts a sticky summary comment listing only the new issues introduced relative to the merge base of the target branch.
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# Scans `main` on every push to track the health-score trend and catch regressions that slipped past PR review.
push:
branches: ["main"]

permissions:
contents: read
pull-requests: write
issues: write
statuses: write

# Cancels any in-flight scan for the same PR (or branch, on push) the moment a new commit arrives, so reviewers only ever see the latest run.
concurrency:
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
react-doctor:
runs-on: ubuntu-latest
steps:
# fetch-depth: 0 gives React Doctor the full git history it needs to find the merge base with the target branch. Without it a shallow checkout has no merge base, so PR runs can't compare against the base and fall back to reporting every issue in the changed files (pre-existing ones included) instead of only the ones the PR introduced.
- uses: actions/checkout@v5
with:
fetch-depth: 0

- uses: millionco/react-doctor@v2
# Advisory by default: React Doctor reports findings on every PR — a
# sticky summary comment, inline review comments, and a commit status
# with the health score — but never fails the check, so it won't red-X
# a teammate's PR on day one. When your team trusts the signal, graduate
# the gate: uncomment the block below and set blocking to "error" (fail
# on new error-severity findings) or "warning" (fail on any finding).
# Full reference: https://www.react.doctor/ci
#
# Security: @v2 is a floating major tag that may move. For supply-chain-
# hardened CI, pin to a full commit SHA with a version comment instead:
# uses: millionco/react-doctor@<sha> # v2.x.x
# with:
# blocking: error # Gate level: "none" (advisory, the default) | "warning" | "error"
# scope: full # On PRs, scan the whole project instead of just changed files
# comment: false # Disable the sticky PR summary comment
# comment-on-clean: false # Skip new comments for clean scans
# review-comments: false # Disable inline review comments on changed lines
# commit-status: false # Disable the commit status (score + counts, links to the run)
# version: "0.4.0" # Pin to a specific react-doctor version instead of "latest"
# directory: apps/web # Scan a sub-directory (default: ".")
# project: "web,admin" # In a monorepo, scan specific workspace project(s)
25 changes: 4 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Dependencies
node_modules

# Build output
dist
dist-ssr
.cloudflare
*.local

# Editor directories and files
Expand All @@ -26,23 +24,8 @@ dist-ssr
*.sln
*.sw?

# Astro
.astro

# OS
Thumbs.db
.DS_Store

# Installed skills
.agents/skills

.design/
design-concepts/

# wrangler files
.wrangler
.dev.vars*
!.dev.vars.example
.env*
# dotenv environment variable files
.env
.env.*
!.env.example
.cloudflare
1 change: 1 addition & 0 deletions .wrangler/deploy/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "configPath": "../../dist/wrangler.json", "auxiliaryWorkers": [] }
47 changes: 31 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,53 @@
# Project Introduction

LASweb-v2 is the official website for Lazy Alien Server (LAS), a Chinese Minecraft server organization focused on student-led technical exchange. The site presents LAS's community, founding timeline, infrastructure, open-source projects, administration team, and joining information, with a separate rules page.
LASweb-v3 is an experimental third version of the website for Lazy Alien Server (LAS), a Chinese Minecraft server organization focused on student-led technical exchange. The production site is LASweb-v2 (`../LASweb-v2`, Vue). v3 explores a motion- and animation-driven design in a modernist, minimalist direction.

All LAS facts (identity, copy, routes, hardware, team, join paths, the full rules text, gallery, assets) are in [docs/las-handoff.md](docs/las-handoff.md), extracted from v2. Use it instead of inventing LAS content; v2 is the source of truth when they disagree.

## Architecture

- Vue 3 application using Composition API and `<script setup lang="ts">`.
- TypeScript for application logic, SCSS for styling, and Vite+ for development, builds, checking, and package management.
- `src/views/` contains route-level pages: `HomePage.vue` composes the landing-page sections, `RulesPage.vue` renders the rules data, `GalleryPage.vue` the image archive, `MapPage.vue` embeds the BlueMap server map full screen (styled by `public/bluemap/las.css`, loaded on the BlueMap side), and `StatusPage.vue` shows each access route's reachability (both linked from the navbar's 更多 panel).
- `src/components/` contains reusable landing-page sections and interactive modules such as the live timer, tech support bento tiles, GitHub project listing, and join flow.
- `src/data/rules.ts` is the source of truth for the rules page; `src/styles/` contains shared design tokens and global industrial UI styles.
- `src/router/index.ts` defines the `/`, `/rules`, `/gallery`, `/map`, and `/status` routes. The `@` alias resolves to `src/`.
- `worker/index.ts` is the Cloudflare Worker: a 5-minute cron checks each route in the `STATUS_ROUTES` secret (JSON array of named groups, each a list of routes with a `name`, a `host:port` `target`, and an optional failover `dns` hostname) and keeps uptime counts in the `STATUS_DB` D1 database. Plain routes are tcpinged (retried up to 3 times); `dns` routes are online while their IP is among the hostname's A records, read from its authoritative nameservers over TCP. `GET /api/status` (the only `/api/*` route; static assets serve everything else) returns names, up/down, and half-hourly and daily counts only, so server addresses never reach the browser. Local values live in the gitignored `.dev.vars`; never commit addresses.
- React 19 with TypeScript, built and checked with Vite+ (`vp`), pnpm as package manager.
- Motion: `motion` (`motion/react`). Components use `m.*` from `motion/react-m` under `<LazyMotion features={domAnimation} strict>` in `src/App.tsx`; a full `motion.*` component throws at runtime by design. `MotionConfig reducedMotion="user"` wraps the app.
- `src/home/` is the homepage (currently the only page, a single full-screen stage):
- `Home.tsx` — stage, backdrop, card, logo, corner letters; owns pointer tracking.
- `Wordmark.tsx` (`<h1>` LAZY / ALIEN / SERVER), `Rail.tsx` (double rule, band hairlines, circles, JOIN US / MORE flags), `StageNav.tsx` (nav list), `Meta.tsx` (key/value info bands, live uptime).
- `motion.ts` — the intro timeline (`AT`), easing, shared variants, `useIntro`.
- `content.ts` — nav items, wordmark lines, info band items, `FOUNDED` (uptime origin).
- `Home.module.css` — all homepage layout.
- `src/index.css` — color tokens (`--blue #0f66dd`, `--black`, `--white`, `--ink-mute` for secondary text), `--ease`, font (Noto Sans, Noto Sans SC for Chinese), resets.
- Assets from v2: `public/hero.webp`, `public/floatingcity.webp`, `public/ftl-ender-pearl.webp`, `public/favicon.svg`, `src/assets/logo.svg` (white-filled wordmark, used as a CSS mask so it takes `currentColor`).

Detailed runtime boundaries, state ownership, data flows, and modification entry points are documented in [architecture.md](architecture.md).
## Design Context

## Product and Design Context
Modernism and minimalism: white card over a full-bleed, slightly dimmed build screenshot; bold sans type, rules, circles, solid label blocks. Two colors with fixed roles: blue (`#0f66dd`) is the brand (wordmark, logo, L / A / S, flags, nav arrows and the active or hovered item); black is structure and information (rails, circles, hairlines, nav labels, info text, with `--ink-mute` for keys). No gradients, textures, shadows, or extra hues. Motion carries the expression, not decoration.

The visual language is neo-industrial and technological: blue and black are primary colors, white is used for contrast, and interfaces use panels, grid lines, status indicators, clipped corners, and restrained motion. Preserve the existing Chinese-language content and responsive behavior when changing UI. Respect `prefers-reduced-motion` and keep interactive controls keyboard-accessible.
The card has a fixed ratio: 2:1 on landscape viewports (`min(80vw, 150svh)` wide), 1:2 on portrait ones. `.board` defines an artboard unit `--u` from the card's container units (`container: card / size`), and every size and offset is a multiple of it, on a 100u module: landscape 1600 × 800, portrait 400 × 800, switched by `@container card (aspect-ratio < 1)`. Landscape grid: left column 0–200 (logo, L), double rail at 200, content to 1400, right column 1400–1600 (A, S); hairlines at 160 and 640 split a top info band, the middle stage (wordmark, nav, circles), and a bottom info band. Change positions through the custom properties on `.board`, keeping both artboards in step. Portrait shows only the first two info blocks of each band.

Themes: dark (default) and light, switched in the navbar (default follows the system). Light follows the Endfield site (endfield.hypergryph.com): white ground, `#f2f2f2` panels, `#010101` ink, industrial yellow `#fffa00`, and a section rhythm that is not all white: the navbar is `#f2f2f2`, the scroll tickers are yellow bands with black type, the timer and hardware sections form a dark block, the admin section is a gray band with borderless white cards, the join group zone is a translucent (50%) yellow panel with a black button, and the footer is dark. Colors are role tokens (`$color-fg`, `$color-accent`, `$color-accent-ink`, …; see `src/styles/variables.scss`), never raw hues: dark must stay unchanged when light changes. In light, yellow is only a fill on white — surfaces carrying black text, selected states, bands and bars at least 6px thick; brand text, thin lines, dots, and focus rings are black ink. Dark sections use the `dark-surface` mixin, where yellow is the brand ink. Light-only fixes go in `@include light { … }`.
## Motion Rules

Tilt rule: every slanted mark, edge, or panel uses the hero split-line angle, never a hand-picked degree. The angle is the shared `--hero-slant` (with `--hero-slant-tan`) defined in `src/styles/global.scss`. It is computed from the hero image's clipped left edge, so it follows the viewport. Apply it as `transform: skewX(calc(-1 * var(--hero-slant)))` so slants lean like `/`. For a slanted edge on one side only, skew a background pseudo-element and clip it with `overflow: hidden` rather than hard-coding a pixel offset in `clip-path`. Out of scope: 45° corner chamfers (`clipped-panel`), diagonal hatch patterns, rotations (clock hands, arrows, vertical labels), and the hero seam itself.
- The intro is one timeline: retime it only through `AT` in `src/home/motion.ts`. Order: backdrop settles, card unfolds from a horizontal line, rails draw and band hairlines branch off them, then wordmark, nav, circles and flags, corner letters and logo, and the info text last.
- Reveals slide content inside an `overflow: hidden` mask (`rise`) or animate `clip-path` (`wipe`, `unfold`). Masks clip focus outlines, so focus styles inside masks must draw within the box (nav links use an underline).
- Pointer-driven motion (backdrop parallax, wordmark line shear, circles sliding along the rail) reacts to mouse pointers only, through springs; touch input leaves the stage still.
- Respect `prefers-reduced-motion`: `useIntro()` returns `initial={false}` so elements render in their final state, pointer tracking is off, and CSS transitions are cut in `src/index.css`. Every new animation must follow the same path.
- Keep interactive controls keyboard-accessible with visible focus.

Typography rule: use only the four weight tokens (`$font-weight-regular`, `-medium`, `-bold`, `-black`) and never introduce another weight. Text below body size (16px) uses exactly two size tokens: `$font-size-small` (14px: secondary copy, descriptions, nav links, notes, small controls) and `$font-size-label` (12px: keys, plates, badges, indices, counts, HUD readouts, metadata); never write a raw size under 16px and never scale small text with the viewport (exceptions: decorative glyph art and the clamp minimum of fluid display sizes). The “all caps + small type + wide letter-spacing” label pattern is prohibited: small labels use normal case and no tracking. Uppercase is reserved for brand wordmarks and oversized display type. Em dashes and centered dots are not used in interface copy; separate labels with layout (gaps, rules, or separate lines) instead.

## Important Rules

- Do not perform browser-based verification or use browser tooling unless the user explicitly asks for it.
- Avoid file names in one folder that differ only by case (e.g. `Veil.tsx` beside `veil.ts`): on Windows the type checker loses the project's ambient types for one of them.

## Deployment

- The site is served by Cloudflare Workers Static Assets. `cloudflare.config.ts` is the source of truth and `cf` is the CLI; do not add Wrangler or a Wrangler config.
- `main` is the Workers Builds production branch. `beta-3` and other branches deploy through Workers Previews.
- `pnpm run build` writes `dist/`, then `scripts/build-output.mjs` writes the `.cloudflare/output/v0/` tree consumed by `cf deploy --prebuilt`.
- Manual deploys: `pnpm run deploy` for production, `pnpm run deploy:preview` for a preview.
## Working Notes

- The homepage fetches and caches the six most-starred repositories from the LazyAlienServer GitHub organization at runtime.
- The founding date used by the live timer is 2022-08-29.
- Images and logos are available under `public/`, `src/assets/`, and `.design/`; reuse existing assets and patterns before adding new ones.
- Only HOME has a page. RULES, ALBUM, MAP, MORE and the JOIN US / MORE flags are placeholder links (`<a>` without `href`); give them an `href` in `src/home/content.ts` or `Rail.tsx` once their pages exist. v2 targets for later: join QQ group `https://qm.qq.com/q/32DhVd36iI`, rules and gallery content in the handoff doc.
- The founding date is 2022-08-29.

<!--VITE PLUS START-->

Expand Down
63 changes: 13 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,21 @@
# LASweb-v2
# LASweb-v3

中文 | [English](README_en.md)

Lazy Alien Server(LAS)官方网站,LAS 是以学生群体为主的 Minecraft 技术交流社区。

## 网站内容

- LAS 社区介绍与技术交流方向
- 服务器成立时间与实时运行计时
- 物理机、内存、存储和网络基础设施展示
- LazyAlienServer GitHub 组织的开源项目
- 管理团队与成员信息
- 加入 LAS 的审核制、邀请制流程
- 独立的《LazyAlienServer 规章制度》页面

## 页面

- 首页:`/`
- 规章制度:`/rules`

在线访问:<https://lzalien.org>

## 技术栈

- Vue 3 Composition API
- TypeScript
- SCSS
- Vite+(Vite、Rolldown、Oxlint、Oxfmt、Vite Task 等统一工具链)
- Vue Router

## 本地开发

项目使用 Vite+ CLI 和锁定版本的 pnpm。

```bash
vp install
vp dev
```

生产构建、格式检查和 lint:
Experimental, motion-driven version of the Lazy Alien Server (LAS) website. React 19, TypeScript, [Vite+](https://viteplus.dev/), pnpm, and [Motion](https://motion.dev/).

```bash
vp run build
vp fmt --check src/components/GithubProjects.vue
vp lint --deny-warnings
vp install # install dependencies
vp dev # dev server
vp check # format, lint, type check
vp run build # type check and production build
```

`vp run build` 会先执行 TypeScript 检查,再生成生产构建文件。开发服务器默认使用 Vite+ 的开发流程。

## 设计方向
Project context and design rules: [AGENTS.md](AGENTS.md). LAS content handed over from LASweb-v2: [docs/las-handoff.md](docs/las-handoff.md).

网站采用蓝色、黑色和白色为核心的 neo-industrial / technological 视觉语言,使用网格、状态指示器、硬边面板、工业斜线、裁切角和克制动效。页面保留中文内容,并适配桌面、tablet 和 mobile 布局,同时尊重 `prefers-reduced-motion`。
## Deployment

## 相关链接
The site runs on Cloudflare Workers Static Assets through `cf` and `cloudflare.config.ts`; Wrangler is not used. `main` is the production branch, while `beta-3` and other branches deploy as Workers Previews.

- [Lazy Alien Server 原官网](https://lzalien.org/)
- [LAS 规章制度原站](https://lzalien.org/rules/)
```bash
pnpm run deploy # production
pnpm run deploy:preview # preview
```
13 changes: 12 additions & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The official website of Lazy Alien Server (LAS), a Chinese Minecraft organizatio
- Home: `/`
- Rules: `/rules`

Visit the live site at <https://lzalien.org>.
Visit the live site at [lzalien.org](https://lzalien.org/).

## Tech stack

Expand Down Expand Up @@ -48,6 +48,17 @@ vp lint --deny-warnings

`vp run build` runs the TypeScript check before producing the production bundle. Use `vp run <script>` when invoking a script defined by the project.

## Deployment

The site runs on Cloudflare Workers Static Assets. `cloudflare.config.ts` defines the Worker and `cf` deploys it; Wrangler is not used:

```bash
pnpm run deploy # production
pnpm run deploy:preview # preview
```

`main` is the Workers Builds production branch; `beta-3` and other branches deploy through Previews. `scripts/build-output.mjs` converts `dist/` into the Build Output that `cf deploy --prebuilt` consumes.

## Design direction

The site uses a neo-industrial and technological visual language built around blue, black, and white. Panels, blueprint grids, status indicators, hard edges, clipped corners, industrial line textures, and restrained motion establish the interface system. The site preserves its Chinese content, supports desktop, tablet, and mobile layouts, and respects `prefers-reduced-motion`.
Expand Down
Loading
Loading