How opennextjs/opennextjs-netlify works
Main Components
a. Build System Components:
• Build Process Handler (/src/build/)
• Plugin Context Manager
• Content Handlers (Static/Server)
• Function Generators (Edge/Server)
• Image CDN Handler
b. Runtime Components:
• Edge Runtime Environment (/edge-runtime/)
• Headers Management
• Middleware Processing
• Request/Response Handlers
• Routing System
c. Integration Layer:
• Netlify Forms Handler
• Cache Management System
• Regional Blob Store
• Revalidation System
Component Relationships
• Build-time flow: Source → Build Process → Generated Functions
• Runtime flow: Request → Edge/Server Functions → Response
• Cache/Revalidation flow: Content Updates → Cache Invalidation → Redeployment
┌─────────────────────────────────────────────────────────────┐
• Netlify Platform │
• ┬─────────────────────┬───────────────────┤
• Build Process │ Runtime Environment │ Integration Layer│
• ┌──────────┐ │ ┌──────────────┐ │ ┌────────────┐ │
• Plugin │ │ │Edge Runtime │ │ │Forms │ │
• Context │ │ │ ┌────────┐ │ │ │Handler │ │
• ┘ │ │ │Headers │ │ │ └────────────┘ │
• ┌──────────┐ │ │ └────────┘ │ │ ┌────────────┐ │
• Content │ │ │ ┌────────┐ │ │ │Cache │ │
• Handlers │ │ │ │Router │ │ │ │System │ │
• ┘ │ │ └────────┘ │ │ └────────────┘ │
• ┌──────────┐ │ └──────────────┘ │ ┌────────────┐ │
• Function │ │ ┌──────────────┐ │ │Blob Store │ │
• Generator │ │ │Server Runtime │ │ └────────────┘ │
• ┘ │ └──────────────┘ │ │
• ┴─────────────────────┴───────────────────┘
Important Elements to Highlight
• Version compatibility (Next.js 13.5+)
• Node.js runtime requirements (18+)
• Edge function capabilities
• Cache invalidation paths
• Regional blob storage integration