Skip to content

Full-Stack CRUD Agent MCP Server: React + Next.js + Laravel + MySQL with intelligent orchestration and MySQL_MCP_Agent integration

Notifications You must be signed in to change notification settings

Vilmantas8/react-nextjs-laravel-mysql-crud-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

React-Next.js-Laravel-MySQL CRUD Agent

Full-Stack eCommerce Automation via Model Context Protocol (MCP)

An intelligent MCP server that orchestrates end-to-end development, testing, and deployment of React/Next.js + Laravel + MySQL applications to Hostinger.

License: MIT TypeScript Laravel Next.js Progress


🚀 Quick Start

# 1. Scaffold a new project
claude> scaffold_project { projectName: "my-store", packageManager: "pnpm" }

# 2. Generate CRUD for products
claude> generate_crud { 
  name: "product", 
  fields: [
    {name: "name", type: "string", required: true},
    {name: "price", type: "decimal", required: true},
    {name: "stock", type: "integer"}
  ]
}

# 3. Run migrations
claude> db_migrate { env: "local" }

# 4. Deploy to Hostinger
claude> deploy_hostinger_frontend { method: "ftp", host: "ftp.example.com", user: "...", path: "/public_html" }

Result: Production-ready eCommerce store in < 4 hours! 🎉


📋 Table of Contents


✨ Features

🎯 Core Capabilities

  • Project Scaffolding: Generate complete monorepo with Next.js + Laravel + MySQL
  • CRUD Generation: Full-stack CRUD (models, controllers, pages, forms, tests) from schema
  • Intelligent Relations: One-to-many, many-to-many, polymorphic relationships
  • Authentication: Laravel Sanctum with frontend flows (login, register, protected routes)
  • Database Management: Migrations, seeders, backups via MySQL_MCP_Agent integration
  • Testing Suite: PHPUnit (backend) + Jest/Vitest (frontend) + Playwright (E2E)
  • One-Click Deploy: Automated deployment to Hostinger (FTP/SSH)
  • Quality Gates: Linting, type checking, test coverage, security scans

🧠 Intelligent Features

  • Schema Inference: Generate database schema from CSV/JSON samples
  • Natural Language Spec: Convert plain English to CRUD code (spec_to_crud)
  • Code Review: Static analysis with suggestions (critique_diff)
  • Auto-Refactoring: Safe refactors with test preservation (refactor_module)
  • Release Planning: Generate deployment plans with gates (plan_release)
  • Performance Insights: Query optimization, index suggestions via MySQL_MCP_Agent

🏗️ Technology Stack

Layer Technology Version
Frontend React + Next.js 18.3 + 14.0
Backend Laravel 11.0
Database MySQL 8.0+
Styling Tailwind CSS + shadcn/ui 3.4+
Validation Zod (client) + Laravel (server) Latest
Testing PHPUnit + Jest + Playwright Latest
Deployment Hostinger (Shared/VPS) -

🏛️ Architecture

┌──────────────────────────────────────────────────────────┐
│                  Claude / LLM (MCP Client)               │
└────────────────────────┬─────────────────────────────────┘
                         │
            ┌────────────▼───────────────┐
            │   MCP Server (TypeScript)  │
            │   26 Tools:                │
            │   - scaffold_project       │
            │   - generate_crud          │
            │   - spec_to_crud           │
            │   - generate_relations     │
            │   - db_migrate             │
            │   - deploy_*               │
            │   - (20 more...)           │
            └────────────┬───────────────┘
                         │
        ┌────────────────┼────────────────┐
        │                │                │
        ▼                ▼                ▼
┌──────────────┐  ┌──────────────┐  ┌─────────────────┐
│   Next.js    │  │   Laravel    │  │MySQL_MCP_Agent  │
│  (Frontend)  │◄─┤   (API)      │◄─┤ (DB Operations)│
│              │  │              │  │                 │
│ - React 18   │  │ - PHP 8.3    │  │ - Schema valid. │
│ - App Router │  │ - Eloquent   │  │ - Migrations    │
│ - SWR        │  │ - Sanctum    │  │ - Performance   │
│ - Tailwind   │  │ - PHPUnit    │  │                 │
└──────────────┘  └──────┬───────┘  └─────────────────┘
                         │
                         ▼
                  ┌─────────────┐
                  │   MySQL 8   │
                  │  Database   │
                  └─────────────┘

Key Principles:

  • API-First: Clear separation between frontend and backend
  • Idempotent: All tools safe to re-run
  • Type-Safe: TypeScript + PHP strict types
  • Test-Driven: 80%+ backend, 70%+ frontend coverage
  • Security by Default: RBAC, input validation, CORS, HTTPS

📖 View Full Architecture Documentation →


📦 Installation

Prerequisites

  • Node.js: 20.x or later
  • PHP: 8.3 or later
  • Composer: 2.x or later
  • MySQL: 8.0 or later
  • Claude Desktop: Latest version

Step 1: Clone Repository

git clone https://github.com/yourusername/react-nextjs-laravel-mysql-crud-agent.git
cd react-nextjs-laravel-mysql-crud-agent

Step 2: Install MCP Server

cd tools/mcp-server
npm install
npm run build

Step 3: Register with Claude Desktop

Edit your Claude Desktop config:

Windows: C:\Users\YourUser\AppData\Roaming\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "react-nextjs-laravel-mysql-crud-agent": {
      "command": "node",
      "args": [
        "C:/path/to/react-nextjs-laravel-mysql-crud-agent/tools/mcp-server/dist/index.js"
      ],
      "env": {}
    },
    "MySQL_MCP_Agent": {
      "command": "node",
      "args": [
        "C:/path/to/MySQL_MCP_Agent/dist/index-fixed.js"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "your_database"
      }
    }
  }
}

Step 4: Restart Claude Desktop

Close and reopen Claude Desktop. The MCP servers should now be available!

📖 Detailed Setup Guide →


🎮 Usage Examples

Example 1: Create eCommerce Store

User: Create a new eCommerce store called "TechShop" with products, categories, cart, and checkout.

Claude: I'll help you create TechShop! Let me start by scaffolding the project...

Claude will automatically:

  1. ✅ Scaffold monorepo (Next.js + Laravel + MySQL)
  2. ✅ Generate Product entity (model, controller, pages, tests)
  3. ✅ Generate Category entity with many-to-many relation
  4. ✅ Generate Cart and Order entities
  5. ✅ Set up authentication (Sanctum)
  6. ✅ Run migrations and seed demo data
  7. ✅ Run tests (all passing)
  8. ✅ Build frontend and backend
  9. ✅ Deploy to Hostinger

Example 2: Add New Feature

User: Add a "Wishlist" feature where users can save products for later.

Claude: I'll add the Wishlist feature...

Claude will:

  1. ✅ Generate Wishlist model with user relationship
  2. ✅ Create migration (wishlists table, wishlist_items pivot)
  3. ✅ Generate API endpoints (add, remove, list)
  4. ✅ Generate frontend components (WishlistButton, WishlistPage)
  5. ✅ Add tests (feature + unit + E2E)
  6. ✅ Update documentation

Example 3: Infer Schema from Data

User: I have a CSV of products. Generate the database schema and import the data.

[User uploads products.csv]

Claude: Let me analyze the CSV and create the schema...

Claude will:

  1. ✅ Parse CSV and infer field types
  2. ✅ Generate migration with proper indexes
  3. ✅ Create seeder to import CSV data
  4. ✅ Run migration and seeder
  5. ✅ Generate CRUD for the entity

📖 More Usage Examples →


📚 Documentation Hub

🎯 Quick Navigation

I want to...

Goal Documentation
Understand the project PRD.md - Product Requirements
See the development plan ROADMAP.md - 7-Phase Timeline
Understand the architecture ARCHITECTURE.md - System Design
Start developing CONTRIBUTING.md - Dev Setup & Standards
Deploy to production DEPLOYMENT_GUIDE.md - Hostinger Deployment
Track current progress PROGRESS_TRACKING.md - Sprint Status
See latest activity DEVELOPMENT_PROGRESS_LIVE.md - Live Log

📖 Core Documentation

Document Description
PRD.md Complete product requirements and acceptance criteria
ROADMAP.md 7-phase development plan with milestones
ARCHITECTURE.md System architecture, design patterns, technical decisions
CONTRIBUTING.md Developer guidelines, coding standards, workflows
DEPLOYMENT_GUIDE.md Step-by-step deployment to Hostinger
PROGRESS_TRACKING.md Sprint tracking, velocity, KPIs
DEVELOPMENT_PROGRESS_LIVE.md Real-time development activity log

📂 Complete Documentation Hub →


🛠️ MCP Tools

Scaffolding & Generation (8 tools)

Tool Description Example
scaffold_project Create monorepo structure { projectName: "myapp" }
generate_crud Full-stack CRUD generation { name: "product", fields: [...] }
spec_to_crud Natural language to CRUD { spec: "product catalog with categories" }
generate_relations Add relationships { relations: [{from: "product", to: "category", type: "many_to_many"}] }
generate_seed Factory & seeder { entity: "product", count: 100 }
infer_schema_from_samples CSV/JSON → schema { format: "csv", content: "..." }
create_openapi Generate API docs { scan: true }

Database & Testing (6 tools)

Tool Description
db_migrate Run migrations
verify_mysql_connection Test DB connection
run_tests Execute test suite
write_tests Generate tests
run_playwright E2E testing
critique_diff Code review

Build & Deploy (8 tools)

Tool Description
build_frontend Build Next.js
package_backend Package Laravel
deploy_hostinger_frontend Upload frontend
deploy_hostinger_backend Upload backend
sync_env Manage env vars
smoke_test_env Post-deploy checks
rollback_deploy Rollback deployment
monitor_status Health monitoring

Intelligence (4 tools)

Tool Description
plan_release Generate release plan
refactor_module Safe refactoring
docs_sync Update documentation
status Project status

Total: 26 Tools | Full Tool Reference →


🎓 Learning Path

For First-Time Users

  1. Start with PRD.md to understand what the system does
  2. Review ARCHITECTURE.md to understand how it works
  3. Follow CONTRIBUTING.md to set up your development environment
  4. Check DEPLOYMENT_GUIDE.md when ready to deploy

For Junior Developers

Week 1: Understanding the System

  1. Read PRD.md - Focus on sections 1-5
  2. Read ARCHITECTURE.md - High-Level Architecture
  3. Read CONTRIBUTING.md - Development Setup

Week 2: Hands-On Development 4. Set up local environment 5. Pick a "good first issue" from GitHub 6. Read relevant section of ARCHITECTURE.md for the component 7. Write code following CONTRIBUTING.md standards

Week 3: Testing & Deployment 8. Read testing requirements 9. Write tests for your feature 10. Deploy to staging environment

For Senior Developers

Day 1: Quick Onboarding

  1. Skim PRD.md for product context
  2. Deep dive ARCHITECTURE.md
  3. Review CONTRIBUTING.md for team standards
  4. Check PROGRESS_TRACKING.md for current state

Day 2+: Start Contributing 5. Pick a medium/large issue 6. Review related architecture sections 7. Implement following team standards 8. Write comprehensive tests

For DevOps Engineers

  1. DEPLOYMENT_GUIDE.md - Complete deployment procedures
  2. ARCHITECTURE.md - Infrastructure and deployment architecture

📖 Detailed Learning Paths →


🤝 Contributing

We welcome contributions! Please see our Contributing Guide.

Quick Contribution Checklist

  • Fork the repository
  • Create a feature branch (git checkout -b feature/amazing-feature)
  • Follow coding standards in CONTRIBUTING.md
  • Write tests (80%+ backend, 70%+ frontend coverage)
  • Update documentation as needed
  • Commit your changes (git commit -m 'feat: add amazing feature')
  • Push to the branch (git push origin feature/amazing-feature)
  • Open a Pull Request

Development Workflow

# 1. Set up environment
git clone <your-fork>
cd react-nextjs-laravel-mysql-crud-agent
npm install

# 2. Create feature branch
git checkout -b feature/my-feature

# 3. Make changes and test
npm run test
npm run lint

# 4. Commit and push
git add .
git commit -m "feat: add my feature"
git push origin feature/my-feature

# 5. Open PR on GitHub

Code of Conduct

This project follows the Contributor Covenant Code of Conduct.

📖 Full Contributing Guide →


📊 Project Status

Progress Phase Tests Coverage

Current Sprint: Sprint 1 (Oct 9-15, 2025)
Current Phase: Phase 0 - Bootstrap & Foundation
Next Milestone: v0.1.0 - Foundation (Oct 23, 2025)

Development Roadmap

  • Phase 0 (Weeks 1-2): Bootstrap & Foundation ⏳ In Progress
  • Phase 1 (Weeks 3-6): Core CRUD Engine 📅 Planned
  • Phase 2 (Weeks 7-9): Relations & Advanced DB 📅 Planned
  • Phase 3 (Weeks 10-12): Authentication & Security 📅 Planned
  • Phase 4 (Weeks 13-14): Testing & CI/CD 📅 Planned
  • Phase 5 (Weeks 15-16): Deployment & Hosting 📅 Planned
  • Phase 6 (Weeks 17-20): Marketplace Features 📅 Planned
  • Phase 7 (Weeks 21-22): Polish & v1.0 Release 📅 Planned

📊 View Detailed Progress →
📈 View Full Roadmap →
📝 View Live Development Log →


🔍 Common Questions

Q: How do I get started with development?
A: Read CONTRIBUTING.md → Prerequisites → Development Setup → Development Workflow

Q: What features are planned?
A: See ROADMAP.md - All 7 phases with deliverables and timelines

Q: How do I deploy to Hostinger?
A: Follow DEPLOYMENT_GUIDE.md → Shared Hosting Deployment

Q: What's the database schema?
A: Check ARCHITECTURE.md → Database Schema section

Q: What are the coding standards?
A: CONTRIBUTING.md → Coding Standards

Q: What's the current sprint status?
A: PROGRESS_TRACKING.md → Current Sprint section

📖 More Q&A →


📞 Support

Documentation

Get Help

Quick Actions

I want to... Resource
Report a bug GitHub Issues
Suggest a feature GitHub Discussions
Get help with deployment DEPLOYMENT_GUIDE.md - Troubleshooting
Understand the architecture ARCHITECTURE.md
See what's being worked on PROGRESS_TRACKING.md

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • Model Context Protocol (MCP): Anthropic's protocol for LLM-tool integration
  • Laravel: The PHP framework for web artisans
  • Next.js: The React framework for production
  • shadcn/ui: Beautifully designed accessible components
  • Hostinger: Affordable and reliable hosting

🌟 Show Your Support

If this project helps you, please give it a ⭐️ on GitHub!


🚀 Ready to Build?

Choose your path:

Let's build something amazing! 🎨


Built with ❤️ using MCP, React, Laravel, and MySQL

DocumentationRoadmapContributingDeployment


Last Updated: October 18, 2025
Version: 0.1.0-alpha
Status: Active Development

About

Full-Stack CRUD Agent MCP Server: React + Next.js + Laravel + MySQL with intelligent orchestration and MySQL_MCP_Agent integration

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published