Skip to content

Next.js Stack Guide

This guide covers using Sequant with Next.js / React projects.

Sequant automatically detects Next.js projects by looking for:

  • next.config.js
  • next.config.mjs
  • next.config.ts
  • next in package.json dependencies

When initialized with the Next.js stack, Sequant configures these commands:

CommandDefault
Testnpm test
Buildnpm run build
Lintnpm run lint
Devnpm run dev

The workflow skills use these patterns to locate files:

PatternGlob
Componentscomponents/**/*.tsx
Pages/Routesapp/**/*.tsx
API Routesapp/api/**/*.ts
Tests__tests__/**/*.test.{ts,tsx}

During planning, Sequant will:

  • Check for existing components in components/
  • Look for similar pages in app/
  • Review API patterns in app/api/

During implementation, the agent will:

  • Run npm run lint to check code style
  • Run npm test for test verification
  • Run npm run build to verify the build passes

Quality review includes:

  • TypeScript type checking
  • ESLint validation
  • Build verification
  • Test coverage review

Override commands in .claude/.local/memory/constitution.md:

## Build Commands
- Test: `npm run test:ci`
- Build: `npm run build:prod`
- Lint: `npm run lint:strict`
app/
├── layout.tsx
├── page.tsx
├── api/
│ └── route.ts
└── [slug]/
└── page.tsx
components/
├── ui/ # Reusable UI components
├── forms/ # Form components
└── layouts/ # Layout components
  1. Use Server Components by default - The agent will prefer server components unless client interactivity is needed.

  2. API Routes - For data fetching, prefer server actions or API routes in app/api/.

  3. Testing - Ensure Jest or Vitest is configured for the /test phase to work properly.