Files
pos-system/.agent/workflows/frontend-dev.md

1.4 KiB

description
description
Development workflow cho frontend apps (web-client, web-admin, etc.) - chạy dev server, lint, typecheck, build

Frontend Development Workflow

Workflow phát triển cho frontend React/Next.js apps trong GoodGo platform.

Prerequisites / Yêu Cầu

  • Node.js 20+
  • pnpm (workspace manager)

Steps

1. Navigate to Frontend App

cd apps/web-client  # hoặc web-admin, web-merchant

2. Install Dependencies

// turbo

pnpm install

3. Run Development Server

// turbo

pnpm dev

Server sẽ chạy tại http://localhost:3000

4. Type Checking

// turbo

pnpm typecheck

5. Linting

// turbo

pnpm lint

6. Build Production

pnpm build

7. Run Unit Tests

// turbo

pnpm vitest run

8. Run E2E Tests

pnpm playwright test

Quick Commands / Lệnh Nhanh

Command Description
pnpm dev Start dev server
pnpm build Production build
pnpm lint ESLint check
pnpm typecheck TypeScript check
pnpm vitest Run unit tests (watch)
pnpm vitest run Run unit tests (once)
pnpm playwright test Run E2E tests