+ Anomaly-first store monitor / two reports a day +
++ By continuing you agree to our{" "} + + Terms + {" "} + and{" "} + + Privacy Policy + + . +
+From 6348090dfefda9933fa3d7c46b163d24724f6f58 Mon Sep 17 00:00:00 2001
From: zhu <1812073942@qq.com>
Date: Thu, 7 May 2026 17:36:42 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../spec/frontend/component-guidelines.md | 1 +
.trellis/spec/frontend/type-safety.md | 3 +
.../components/password-toggle/index.tsx | 25 +++
src/app/(auth)/index.scss | 9 +
src/app/(auth)/layout.tsx | 137 ++++++++++++
src/app/(auth)/login/login-error.ts | 37 ++++
src/app/(auth)/login/page.tsx | 174 +++++++++++++++
src/app/(auth)/signup/page.tsx | 204 ++++++++++++++++++
src/app/(auth)/validate.ts | 14 ++
9 files changed, 604 insertions(+)
create mode 100644 src/app/(auth)/components/password-toggle/index.tsx
create mode 100644 src/app/(auth)/index.scss
create mode 100644 src/app/(auth)/layout.tsx
create mode 100644 src/app/(auth)/login/login-error.ts
create mode 100644 src/app/(auth)/login/page.tsx
create mode 100644 src/app/(auth)/signup/page.tsx
create mode 100644 src/app/(auth)/validate.ts
diff --git a/.trellis/spec/frontend/component-guidelines.md b/.trellis/spec/frontend/component-guidelines.md
index 15b22b4..1882135 100644
--- a/.trellis/spec/frontend/component-guidelines.md
+++ b/.trellis/spec/frontend/component-guidelines.md
@@ -71,6 +71,7 @@ If a component requires a large amount of static data (e.g., "dead" data for ren
**Every method, property, interface, and complex logic block MUST be documented.**
- **Language Requirement**: All comments inside the code (JSDoc and internal) **MUST be written in Chinese**.
+- **Mandatory Positive Constraint**: Every new **interface**, **type**, **exported or module-level constant**, **function component**, and **business logic function** MUST have a JSDoc `/** */` comment in **Chinese**. The only exception is for local variables within a function that are immediately obvious and self-explanatory.
- **Public API/Props/Interfaces**: Use JSDoc style `/** ... */` **mandatory** for every interface definition and **every single property** within that interface.
- **Methods & Functions**: Every function (exported or internal) **must** have a `/** ... */` comment explaining its purpose, parameters, and return value.
- **Internal Logic**: Use double-slash `//` for step-by-step explanations inside function bodies.
diff --git a/.trellis/spec/frontend/type-safety.md b/.trellis/spec/frontend/type-safety.md
index 6994bb5..684e2ee 100644
--- a/.trellis/spec/frontend/type-safety.md
+++ b/.trellis/spec/frontend/type-safety.md
@@ -124,6 +124,9 @@ export const SearchBar = ({ placeholder, onSearch }: SearchBarProps) => {
Define the store state and actions with an interface.
```typescript
+/**
+ * 权益状态
+ */
interface AuthState {
token: string | null;
setToken: (token: string) => void;
diff --git a/src/app/(auth)/components/password-toggle/index.tsx b/src/app/(auth)/components/password-toggle/index.tsx
new file mode 100644
index 0000000..f74052f
--- /dev/null
+++ b/src/app/(auth)/components/password-toggle/index.tsx
@@ -0,0 +1,25 @@
+import { Eye, EyeOff } from "lucide-react";
+
+/** 密码显示/隐藏切换按钮的参数。 */
+interface PasswordToggleProps {
+ isShown: boolean;
+ onToggle: () => void;
+}
+
+/** 密码显示/隐藏切换按钮,复用在登录和注册密码输入框中。 */
+export function PasswordToggle({ isShown, onToggle }: PasswordToggleProps) {
+ return (
+
+ );
+}
diff --git a/src/app/(auth)/index.scss b/src/app/(auth)/index.scss
new file mode 100644
index 0000000..82513b6
--- /dev/null
+++ b/src/app/(auth)/index.scss
@@ -0,0 +1,9 @@
+.storeai-auth {
+ /* 认证壳层的细网格背景,只在该路由组内生效。 */
+ .auth-grid {
+ background-image: linear-gradient(to right, rgb(226 232 240 / 0.45) 1px, transparent 1px),
+ linear-gradient(to bottom, rgb(226 232 240 / 0.45) 1px, transparent 1px);
+ background-size: 48px 48px;
+ mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
+ }
+}
diff --git a/src/app/(auth)/layout.tsx b/src/app/(auth)/layout.tsx
new file mode 100644
index 0000000..d930c28
--- /dev/null
+++ b/src/app/(auth)/layout.tsx
@@ -0,0 +1,137 @@
+import Link from "next/link";
+import { BellRing, Clock3, MessagesSquare, ShieldCheck } from "lucide-react";
+
+import "./index.scss";
+
+/** 认证壳层左侧卖点行的入参。 */
+interface FeatureRowProps {
+ icon: React.ComponentType<{ className?: string; "aria-hidden"?: true }>;
+ title: string;
+ body: string;
+}
+
+/**
+ * 登录和注册共享的认证壳层。
+ * 桌面端展示左侧品牌说明,移动端保留紧凑品牌头,表单内容由子路由提供。
+ */
+export default function AuthLayout({ children }: { children: React.ReactNode }) {
+ return (
+
+ Anomaly-first store monitor / two reports a day
+
+ By continuing you agree to our{" "}
+
+ Terms
+ {" "}
+ and{" "}
+
+ Privacy Policy
+
+ .
+
{title}
+{body}
++ Sign in to your StoreAI dashboard. +
++ New to StoreAI?{" "} + + Start your free trial + +
++ Two scheduled reports a day from your store. Cancel anytime. +
+