How This Developer Migrated a Full Laravel App in 8 Hours with Claude Code's TDD Pipeline

How This Developer Migrated a Full Laravel App in 8 Hours with Claude Code's TDD Pipeline

A developer completed a complex Laravel-to-custom-framework migration in one Claude Code session using a TDD-first approach and reusable skills.

Ggentic.news Editorial·7h ago·4 min read·9 views·via devto_claudecode
Share:

The Technique — TDD as Claude Code's Feedback Loop

A developer recently migrated GoFormX, a Laravel 12 + Inertia + Vue 3 application, to a custom PHP framework called Waaseyaa in a single 8-hour Claude Code session. The key wasn't just Claude's coding ability—it was structuring the work so Claude could verify its own progress at every step.

Why It Works — Concrete, Verifiable Outcomes

The developer created a reusable skill called laravel-to-waaseyaa that follows this 6-phase pipeline:

  1. Scaffold — Basic package structure with composer.json and ServiceProvider
  2. TDD Core Components — Write test → watch it fail → implement → watch it pass
  3. Wire — Register services, middleware, and routes
  4. Verify — Run full test suite + CS Fixer
  5. Deploy — Add to monorepo, create GitHub repo, tag, submit to Packagist

This works because every step has a concrete, verifiable outcome. The tests aren't just for code quality—they're Claude's feedback mechanism. When a test passes, Claude knows that specific component works. No ambiguity, no guessing.

What Got Built — The Output

In that single session:

3 Framework Packages (published to Packagist):

  • waaseyaa/inertia — Inertia v3 adapter with 30 tests
  • waaseyaa/auth — Headless authentication with TOTP 2FA and rate limiting (46 tests)
  • waaseyaa/billing — Stripe integration with webhook processing (35 tests)

1 Complete Application:

  • 7 PHP controllers with 37 unit tests
  • 28 Vue 3 page components
  • 24 shadcn-vue UI component directories
  • Full Docker Compose setup with 6 services
  • GitHub Actions CI/CD pipeline
  • Ansible deployment config

Total: 148 tests, all green.

How To Apply It — Creating Your Own Claude Code Pipeline

1. Start with a Detailed Spec

The migration spec was written BEFORE any Claude Code session. It specified every route, entity field, and API endpoint. Your CLAUDE.md should include:

## Migration Specification

### Routes to Port
- GET /login → AuthController@showLoginForm
- POST /login → AuthController@login
- GET /dashboard → DashboardController@index

### Database Schema
- users table: id, email, password_hash, created_at
- sessions table: id, user_id, token, expires_at

### API Endpoints
- POST /api/v1/forms → FormController@store
- GET /api/v1/forms/{id} → FormController@show

2. Structure Your Work as Test-First Tasks

Instead of "build authentication system," break it down:

## Current Task: User Login

1. Create test for UserRepository::findByEmail()
2. Implement UserRepository with MariaDB PDO connection
3. Create test for AuthService::attemptLogin()
4. Implement AuthService with password verification
5. Create test for LoginController@store
6. Implement controller with session creation

3. Use Playwright MCP for End-to-End Verification

The developer used Playwright MCP (browser automation) to verify flows actually work in a browser, not just with curl. This catches issues like the Inertia v3 data-page="app" attribute requirement that took reading framework source code to discover.

4. Handle Environment Gotchas

They discovered PHP-FPM doesn't inherit Docker environment variables by default. The fix: add clear_env = no to FPM config AND switch from $_ENV to getenv() with a helper function. Document these in your CLAUDE.md under "Known Issues."

The Reusable Skill — Your Secret Weapon

The laravel-to-waaseyaa skill encodes all the patterns, conventions, and gotchas discovered during the migration. When you complete a complex project with Claude Code, extract the workflow into a skill. Next time you face a similar task, the skill provides the playbook.

What's Actually Verified

Every flow was tested with Playwright MCP:

  • GET login page → fill credentials → click "Sign in" → land on dashboard
  • Vue app rendering with navigation working
  • User data displayed correctly
  • HMAC signatures accepted by Go API

This isn't just unit tests—it's full integration testing that the migration actually works.

The Takeaway for Your Next Claude Code Session

Three things made this migration successful:

  1. Detailed spec before coding — Claude executes against concrete requirements
  2. TDD as the feedback loop — Tests tell Claude when each component works
  3. Incremental verification — Commit after every task, test after every component

Don't batch 10 things and hope they all work. Break your project into verifiable steps where Claude can see its own progress. The result? 148 green tests and a production-ready application scaffold in 8 hours.

AI Analysis

Claude Code users should adopt a TDD-first approach for complex migrations and refactors. Instead of asking Claude to "migrate the auth system," structure your work as: (1) Write failing test for component A, (2) Implement component A, (3) Verify test passes, (4) Repeat for component B. Create a detailed `CLAUDE.md` spec BEFORE starting your session. Include every route, database schema change, and API endpoint. Claude executes best against concrete requirements, not vague intentions. Use Playwright MCP or similar browser automation tools for end-to-end verification. Unit tests are good, but seeing the app actually work in a browser catches framework-specific issues like the Inertia v3 `data-page` attribute requirement. Extract successful workflows into reusable skills. If you complete a Laravel-to-Symfony migration, create a `laravel-to-symfony` skill that encodes your patterns and gotchas. Next time, you're not starting from scratch.
Original sourcedev.to

Trending Now

More in Products & Launches

View all