一键导入
project-strategy
High-level overview of project structure, mock API architecture, and authentication flow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
High-level overview of project structure, mock API architecture, and authentication flow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
ZGO API development standards including pagination, error handling, and RESTful design
Test patterns, mocking strategies, and organization best practices
Standardized error format, error code clusters, and API client usage for consistent error handling.
Specifications for Zustand stores, React Query hooks, and the Service-Hook-Type pattern with optimistic updates.
Strict rules for environment variable management using Zod validation and src/config/env.ts.
Guidelines for managing internationalization (i18n) in the project using next-intl and unified translation patterns.
| name | project-strategy |
| description | High-level overview of project structure, mock API architecture, and authentication flow. |
This skill provides a high-level strategic overview of the LlamaFront AI Scaffold. It covers the overall directory structure, the mock API architecture, and the authentication flow, ensuring that developers understand the core foundations of the project.
The project follows a modular structure under src/:
app/: Next.js App Router, routes, and API handlers.components/: UI primitives (ui/), feature components (features/), and common components (common/).services/: Stateless API wrappers.store/: Zustand stores for global state.hooks/: Custom React hooks for business logic and server state.i18n/: Internationalization configuration and modules.themes/: Design tokens and global styles.All API calls initially go through Next.js Route Handlers under src/app/api/*, which mock backend responses. This allows for fast development without an external backend dependency.
Flow: Browser → /api/* → Next.js API Routes (Mock)
The project supports two token modes via NEXT_PUBLIC_AUTH_TOKEN_MODE:
basic: Single access token.refresh: Access + refresh token pair (Default).Protected routes are managed via AuthGuard in layout components.
// app/(normal)/layout.tsx
import { AuthGuard } from '@/components/auth-guard';
export default function NormalLayout({ children }) {
return <AuthGuard>{children}</AuthGuard>;
}
(auth): Public auth pages (login, register).(normal): Protected dashboard and user console.(site): Public marketing and information pages.[!NOTE] Production Ready: This scaffold is designed to be easily switched from mock APIs to real backend services by updating the service layer and environment variables.