Code Generation & Refactoring
Generate, optimize, and refactor code across any programming language with AI assistance.
Generate a complete CRUD application using Next.js for the frontend and Express.js with MongoDB for the backend. Include user authentication with JWT, input validation, error handling, and a responsive UI with Tailwind CSS. Provide the complete code structure with all necessary files.
Review this React component code for performance issues, accessibility problems, and best practices. Suggest specific refactoring steps including hooks optimization, component splitting, and state management improvements. Explain why each change improves the code.
Generate RESTful API endpoints for a user management system using Python FastAPI. Include POST for user creation, GET for retrieval, PUT for updates, and DELETE for removal. Add input validation using Pydantic, proper error handling, and request/response documentation.
Debugging & Problem Solving
Identify and fix bugs faster with AI-powered debugging assistance.
I'm getting this error: [INSERT ERROR MESSAGE]. The code attempts to [DESCRIBE WHAT YOU'RE TRYING TO DO]. Analyze the error message, explain what caused it, provide a corrected code snippet, and explain how to prevent this error in the future.
My application is running slowly. The main operation processes [DESCRIBE OPERATION]. Here's the relevant code: [PASTE CODE]. Identify performance bottlenecks, suggest optimization strategies, provide optimized code, and explain the performance improvements expected.
I suspect a memory leak in my [FRAMEWORK/LANGUAGE] application. The memory usage increases over time when [DESCRIBE BEHAVIOR]. Analyze this code for potential memory leaks, suggest debugging approaches, recommend fixes, and provide best practices to prevent leaks.
Testing & Quality Assurance
Write comprehensive tests and improve code quality with AI-driven testing strategies.
Generate comprehensive unit tests using Jest for this function: [PASTE FUNCTION]. Cover all code paths, edge cases, error conditions, and normal scenarios. Include test setup/teardown, mocking where necessary, and assertion explanations.
Design integration tests for this API endpoint using [TEST FRAMEWORK]. The endpoint: [DESCRIBE ENDPOINT]. Include tests for successful requests, validation errors, authentication failures, database operations, and external API calls. Provide test code and test data.
Create end-to-end tests using Cypress for this user workflow: [DESCRIBE WORKFLOW]. Include page navigation, form filling, validation, error handling, and success verification. Provide Page Object Model setup and organized test structure.
System Design & Architecture
Design scalable systems and make architectural decisions with confidence.
Design a microservices architecture for an e-commerce platform handling: [LIST FEATURES]. Define service boundaries, communication patterns (sync/async), database strategy, API gateway design, authentication approach, and deployment considerations. Include a system diagram description.
Design a database schema for [DESCRIBE APPLICATION]. Include: entity definitions, relationships, indexing strategy, normalization decisions, and performance considerations. Provide SQL DDL statements and explain your design choices including scalability implications.
Create Terraform infrastructure code for deploying a [DESCRIBE APPLICATION] on AWS. Include VPC configuration, load balancer, RDS database, S3 buckets, IAM roles, and auto-scaling groups. Organize code with modules and include variables and outputs.
Documentation & Knowledge Transfer
Generate comprehensive documentation and accelerate team knowledge sharing.
Generate OpenAPI/Swagger documentation for this API: [DESCRIBE API ENDPOINTS]. For each endpoint, include method, path, description, parameters, request/response schemas, error codes, and authentication requirements. Format as valid OpenAPI 3.0 specification.
Write an Architecture Decision Record (ADR) for this decision: [DESCRIBE DECISION]. Include status, context, decision, consequences (positive and negative), alternatives considered, and lessons learned. Format for team documentation.
Generate comprehensive documentation and inline comments for this function/class: [PASTE CODE]. Include JSDoc/docstring format, parameter descriptions, return value documentation, usage examples, and inline comments explaining complex logic.