Files
metabuilder/app/_components
copilot-swe-agent[bot] 7a3acb38a9 Phase 1: Next.js 15 migration setup and core structure
Converted project from Vite SPA to Next.js 15 with App Router:

**Dependencies:**
- Installed Next.js 15.1.6 with React 19
- Added @next/third-parties and sharp for optimization
- Updated package.json scripts for Next.js dev/build

**App Structure:**
- Created app/ directory with App Router
- Setup root layout with font optimization (IBM Plex Sans, Space Grotesk, JetBrains Mono)
- Created providers for ThemeProvider and QueryClient
- Implemented file-based routing structure

**Configuration:**
- next.config.ts with standalone output for Docker
- Image optimization config
- Webpack config for DBAL and Lua (Fengari) support
- Path aliases (@/, @/dbal)
- CORS headers for API routes

**Authentication:**
- Created AuthProvider context for client-side auth
- Middleware for route protection
- Session cookie validation
- Role-based redirects

**Routing Structure:**
```
app/
├── layout.tsx              # Root layout
├── providers.tsx           # Client providers
├── page.tsx                # Home (Level 1)
├── level1-client.tsx       # Client wrapper
├── login/                  # Login page
├── (auth)/                 # Protected routes
│   ├── dashboard/          # Level 2
│   ├── admin/              # Level 3
│   ├── builder/            # Level 4
│   └── supergod/           # Level 5
├── api/                    # API routes
└── _components/            # Shared components
```

**Features:**
- Server-side rendering ready
- Automatic code splitting
- Font optimization with next/font
- Image optimization configured
- Auth middleware protection
- Session management
- Role-based access control

**Migration Guide:**
- Created NEXTJS_MIGRATION.md with complete roadmap
- Phase 1 complete 
- Phase 2-5 in progress

**Compatibility:**
- All existing components preserved
- DBAL integration maintained
- Prisma unchanged
- Docker deployment ready (pending Dockerfile update)
- Tailwind CSS working
- Shadcn/ui components compatible

Next: Implement API routes, convert level components, update Docker.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 01:22:00 +00:00
..