This file provides guidance to Claude Code when working with this repository.
This repository is the current SAST Link Next implementation, not a generic starter template. It combines:
- Next.js 16 App Router
- React 19
- TypeScript
- Tailwind CSS v4
- shadcn/ui-style primitives
- Zustand for client-side state
- Axios + SWR for frontend data access patterns
/account switcher and quick-login entry/logintwo-step login/registerfour-step registration/resetfour-step password reset/callback/feishuFeishu OAuth callback/callback/githubGitHub OAuth callback
/homeuser homepage overview/home/editprofile editing and avatar upload/cropping/home/edit/safetysafety settings
- Web mode:
pnpm dev - Static-export build:
pnpm build
pnpm dev
pnpm build
pnpm start
pnpm lint
pnpm test
pnpm test:watch
pnpm test:coverage
pnpm exec tsc --noEmit
pnpm dlx shadcn@latest add <component-name>app/App Router routes, layouts, providers, and page testscomponents/shared UI and feature-oriented componentshooks/shared hooks such asuse-fetch-profilelib/api/Axios client plus auth/user/oauth wrapperslib/validations/form validation rulesstore/Zustand stores for auth, accounts, panels, and profile statemocks/MSW bootstraptests/shared test helpers and higher-level tests
next.config.tsusesoutput: "export"
- Tailwind CSS v4 via PostCSS
- shared CSS variables in
app/globals.css tw-animate-css- shadcn/ui-style component patterns in
components/ui/
This repository already has an active Jest setup.
- Test runner: Jest 30
- Environment:
jest-fixed-jsdom - Coverage command:
pnpm test:coverage - Config:
jest.config.ts - Setup files:
jest.setup.ts,jest.polyfills.ts
Tests currently exist across:
app/components/hooks/lib/store/
@/* maps to the repository root.
Common imports:
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import { useAuthStore } from "@/store/use-auth-store";- Always use
pnpm. - Do not assume this repo is still a starter; inspect the real route groups and state/API modules first.
NEXT_PUBLIC_API_BASE_URLis the backend base URL.NEXT_PUBLIC_API_MOCKING=trueenables MSW bootstrap inapp/providers.tsx.- The npm package name still uses starter-style naming; treat current code/config as source of truth rather than marketing labels.