Full-Stack Development Workflows

/api-endpoint - Create REST API endpoint

markdown

`# /api-endpoint Create REST API endpoint: $ARGUMENTS with full testing and documentation.

Implementation Checklist

  1. Route Setup

  2. Database Integration

  3. Testing Suite

  4. Documentation

Validation

/react-component - Full React component creation

markdown

`# /react-component
Create React component: $ARGUMENTS with TypeScript, tests, and Storybook.

Component Structure

  1. Core Implementation

    // src/components/$ARGUMENTS/$ARGUMENTS.tsx
    import React from 'react';
    import './styles.css';
    
    interface ${ARGUMENTS}Props {
      // Define props with JSDoc comments
    }
    
    export const $ARGUMENTS: React.FC<${ARGUMENTS}Props> = ({}) => {
      // Implementation with proper error boundaries
      return <div></div>;
    };`
    
    
  2. Testing Strategy

  3. Storybook Stories

  4. Styling & Accessibility

Quality Gates

#### /database-migration` - Comprehensive migration workflow

# /database-migration
Create database migration: $ARGUMENTS with rollback and testing.

## Migration Planning
1. **Analysis Phase**
   - Review current schema with `describe` commands
   - Identify potential breaking changes
   - Plan data migration strategy for existing records
   - Estimate migration time for production data volume

2. **Migration Files**
   ```sql
   -- migrations/$(date +%Y%m%d_%H%M%S)_$ARGUMENTS.up.sql
   BEGIN TRANSACTION;
   -- Forward migration
   COMMIT;`

sql

- `*- migrations/$(date +%Y%m%d_%H%M%S)_$ARGUMENTS.down.sql*
BEGIN TRANSACTION;
*- Rollback migration*
COMMIT;`
1. **Testing Protocol**
    - Test on development database with production data copy
    - Verify migration performance with EXPLAIN ANALYZE
    - Test rollback procedure completely
    - Validate data integrity with checksums
2. **Production Deployment**
    - Create database backup before migration
    - Run migration during low-traffic window
    - Monitor application health post-migration
    - Document any manual steps required