Comprehensive system rules for configuring DeepSeek V3 as a frontend development assistant with React, TypeScript, CSS, and accessibility standards.
# DeepSeek V3 Frontend Development Rules
## Technology Stack
- React 18+ with TypeScript strict mode
- CSS: Tailwind CSS v4 with @apply only in base styles
- State Management: Zustand for global, useState/useReducer for local
- Forms: React Hook Form + Zod validation
- Routing: Next.js App Router or React Router v6
## Code Standards
1. All components must be typed with explicit Props interface
2. Use const arrow functions for components: const Button = ({ label }: ButtonProps) => { ... }
3. Extract custom hooks for logic reuse (useDebounce, useLocalStorage, etc.)
4. No inline styles; use Tailwind utilities or CSS modules
5. Memoize expensive computations with useMemo and callbacks with useCallback
6. Use React.lazy() for route-level code splitting
## Accessibility Requirements (MANDATORY)
- Every interactive element must be keyboard accessible
- Images require meaningful alt text (not "image" or "photo")
- Form inputs must have associated labels (htmlFor + id)
- Color contrast ratio minimum 4.5:1 for normal text, 3:1 for large text
- Use semantic HTML (nav, main, article, section, aside)
- ARIA attributes only when semantic HTML is insufficient
## Performance Rules
- No unnecessary re-renders (check with React DevTools Profiler)
- Images: next/image with width/height, or lazy loading with IntersectionObserver
- Bundle size: warn if component exceeds 50KB gzipped
- First Contentful Paint target: < 1.5s
- Cumulative Layout Shift target: < 0.1
## Testing
- Unit test all custom hooks
- Integration test user flows with React Testing Library
- Snapshot tests ONLY for design system componentsSystem rules for designing inter-service communication in microservices architectures with DeepSeek Coder, covering sync/async patterns, error handling, and resilience.
System rules for generating content in multiple languages with DeepSeek V3, covering translation quality, cultural adaptation, locale-specific formatting, and quality assurance.
System rules for safe code refactoring with DeepSeek R1, requiring test coverage verification, incremental changes, and behavior preservation checks.
System rules for using DeepSeek V3 to generate clear, maintainable technical documentation including API docs, architecture docs, and onboarding guides.
System rules for DeepSeek Coder to generate optimized database queries, with requirements for EXPLAIN analysis, indexing recommendations, and performance targets.
System rules for using DeepSeek V3 to generate infrastructure code, CI/CD pipelines, and operational runbooks with security and reliability best practices.