Full-featured feature flag system with targeting, percentage rollouts, and React hooks.
Implement a feature flag system following the LaunchDarkly pattern. Include: 1. **Flag evaluation engine:** - Support flag types: boolean, string, number, JSON - User targeting by attributes (id, email, plan, country) - Percentage rollouts with consistent hashing - Rule-based targeting with AND/OR conditions - Default values when flag is not found 2. **React integration:** - FeatureFlagProvider context wrapper - useFeatureFlag(flagKey, defaultValue) hook - FeatureGate component for conditional rendering - withFeatureFlag HOC for class components 3. **Server-side evaluation:** - Middleware for API routes - Flag evaluation in server components - Edge-compatible evaluation 4. **Management:** - In-memory store with API-driven updates - Flag change event streaming - Local override for development - Analytics tracking of flag evaluations Use TypeScript throughout with proper generics.
Leverage DeepSeek Coder for complete, production-quality code implementations. Excels at algorithmic problems, system design, and competitive programming.
Structured reasoning framework leveraging DeepSeek R1's advanced thinking capabilities. For complex math, logic, coding, and multi-step analysis problems.
Interpret legal contract clauses step by step with precedent references, statutory analysis, and practical implications.
Perform detailed financial analysis including ratio analysis, trend identification, and comparative benchmarking.
Solve linear algebra problems with step-by-step matrix operations, eigenvalue computation, and vector space analysis.
Given incomplete evidence, use DeepSeek R1 to generate the most likely explanations through abductive reasoning.