Rekomendasi #8 â Migration Path: Static HTML/JS â Next.js | Generated 27 Maret 2026
Hampir semua 93 Vercel projects saat ini menggunakan plain HTML + inline JavaScript tanpa framework, build tools, atau module system. Ini menyebabkan:
Tidak semua apps perlu Next.js. Strategi tiered berdasarkan kompleksitas dan kebutuhan:
Simple landing pages dan info pages yang tidak butuh interactivity atau routing. Cukup cleanup CSS + add shared nav component.
| App | Reason to Keep Static | Action |
|---|---|---|
| ibnu-hub (hub) | Simple linktree â works perfectly as static HTML | Add shared CSS, keep as-is |
| ibnu-portfolio | Landing page only | Add shared nav, cleanup CSS |
| career-job | Single-page info | Add shared CSS only |
| nomoribnu | Contact card only | Merge into portfolio |
Multi-page apps dengan moderate interactivity. Migrate to Next.js with output: 'export' (static site generation). No server needed.
| App | Why Next.js SSG | Pages/Routes |
|---|---|---|
| superapp-main | 15+ modules, needs routing & code-splitting | /life, /pro, /skill, /business, /games, etc. |
| superappgov | 7+ sections, gov portal needs SEO | /cpns, /asn, /procurement, /bansos, /pkp |
| learning | 9 content sections, needs navigation | /phd, /leadership, /tools, /politik, etc. |
| finance | 8 finance tools, calculator components | /investment, /sidehustle, /properti, etc. |
| productivity | 6 tools, state management needed | /tasks, /sosmed, /agama, /boards |
Data-heavy apps yang butuh server-side rendering, API routes, atau database connections.
| App | Why Full Next.js | SSR Features Needed |
|---|---|---|
| gov-dashboard | Real-time monitoring, data fetching | API routes for data, SSR for fresh data, auth |
| gov-data | Database CRUD, analytics | API routes for DB, SSR for tables, export |
| ai-hub | LLM API integration, streaming | API routes for AI proxy, edge functions |
npx create-next-app apps/superapp --typescript --tailwind --app
Convert each <section> / module dari HTML ke React component. Replace inline styles with Tailwind classes.
Map each merged project ke Next.js App Router page: app/life/page.tsx, app/pro/page.tsx, etc.
import { createNav, theme } from '@ibnu/ui' â use monorepo shared components.
Test all routes, check custom domains, verify Vercel preview deploys work correctly.
// BEFORE: apps/superapp/index.html (monolithic HTML) // 5000+ lines of inline HTML, CSS, JavaScript // All modules in one file, no code splitting // AFTER: apps/superapp/app/layout.tsx import { Nav } from '@ibnu/ui' import '@ibnu/ui/styles/base.css' import './globals.css' export default function RootLayout({ children }) { return ( <html lang="id"> <body> <Nav title="SuperApp" links={[ { label: 'Life', url: '/life' }, { label: 'Pro', url: '/pro' }, { label: 'Skill', url: '/skill' }, { label: 'Business', url: '/business' }, ]} /> {children} </body> </html> ) } // AFTER: apps/superapp/app/life/page.tsx // Code-split! Only loads when user visits /life export default function LifePage() { return ( <main className="container"> <h1>SuperApp Life</h1> {/* Content migrated from superapp-life */} </main> ) }
| Benefit | Tier 1 (Static) | Tier 2 (SSG) | Tier 3 (SSR) |
|---|---|---|---|
| SEO Score | Basic | Excellent (pre-rendered) | Excellent (dynamic) |
| Load Time | Fast | Very fast (CDN) | Fast (edge SSR) |
| Code Splitting | Manual | Automatic | Automatic |
| Type Safety | None | TypeScript | TypeScript |
| API Integration | Client-only | Client-only | Server-side |
| Migration Effort | Minimal | Medium | High |
| Maintenance | Low | Low | Medium |
| Technology | Choice | Rationale |
|---|---|---|
| Framework | Next.js 15 (App Router) | Best Vercel integration, React ecosystem, SSG + SSR |
| Language | TypeScript | Type safety, better DX, catch bugs early |
| Styling | Tailwind CSS | Utility-first, no CSS conflicts, works in monorepo |
| State | Zustand | Simple, lightweight, no boilerplate (replace for complex apps) |
| Build | Turborepo | Already planned in Rekomendasi #5 |
| Testing | Vitest + Playwright | Fast unit tests + E2E for critical flows |
| Linting | ESLint + Prettier | Shared config via @ibnu/config package |
| Phase | Week | Apps | Action |
|---|---|---|---|
| Phase 1 | Week 1 | Tier 3 (gov-dashboard, gov-data, ai-hub) | Highest value â migrate data-heavy apps first |
| Phase 2 | Week 2 | Tier 2 (superapp, superappgov, finance) | Migrate multi-page apps to Next.js SSG |
| Phase 3 | Week 3 | Tier 2 (learning, productivity) | Remaining multi-page apps |
| Phase 4 | Week 4 | Tier 1 (hub, portfolio, career) | Cleanup static apps, add shared components |
Framework Standardization Plan v1.0 â Generated by Claude for Subkhan Ibnu Aji â 27 Maret 2026
Part of Vercel & GitHub Infrastructure Audit Series