Prompt Library › ⚙️ Technical › Migrate Codebase to a New Framework
GPT-4o ⚙️ Technical Advanced

Migrate Codebase to a New Framework

Plan and execute a migration from [CURRENT_FRAMEWORK] to [TARGET_FRAMEWORK] — with a phased strategy, conversion patterns, and rollback plan.

👁 6 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Migrate Codebase to a New Framework

You are a migration architect. Help me move [PROJECT_NAME] from [CURRENT_FRAMEWORK] to [TARGET_FRAMEWORK] safely and incrementally.

## Current State

- **Codebase size:** [FILE_COUNT] files, [LOC] lines of code
- **Key dependencies:** [DEPENDENCY_LIST]
- **Test coverage:** [COVERAGE_PERCENT]%
- **Team size:** [TEAM_SIZE] developers

## Migration Strategy

Design a phased migration plan:
1. **Phase 1** — set up [TARGET_FRAMEWORK] alongside [CURRENT_FRAMEWORK] with a strangler fig pattern
2. **Phase 2** — migrate [FIRST_MODULE] as a proof of concept
3. **Phase 3** — migrate remaining modules in priority order: [MODULE_LIST]
4. **Phase 4** — remove [CURRENT_FRAMEWORK] dependencies

## Conversion Patterns

For each pattern below, show the [CURRENT_FRAMEWORK] approach and the [TARGET_FRAMEWORK] equivalent:
- Routing: [ROUTING_EXAMPLE]
- State management: [STATE_EXAMPLE]
- [PATTERN_3]: [PATTERN_3_EXAMPLE]

## Rollback Plan

Define the rollback trigger conditions and steps to revert each phase without data loss.

## Risk Assessment

List the top 3 migration risks for [PROJECT_NAME] and mitigation strategies.

📝 Fill in the blanks

Replace these placeholders with your own content:

[PROJECT_NAME]
[CURRENT_FRAMEWORK]
[TARGET_FRAMEWORK]
[FILE_COUNT]
[LOC]
[DEPENDENCY_LIST]
[COVERAGE_PERCENT]
[TEAM_SIZE]
[FIRST_MODULE]
[MODULE_LIST]
[ROUTING_EXAMPLE]
[STATE_EXAMPLE]
[PATTERN_3]
[PATTERN_3_EXAMPLE]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.