Back to Templates
EdgeOne Pages Next.js Hybrid Rendering Template
A hybrid rendering demonstration project based on EdgeOne Pages and Next.js 15, showcasing SSR, ISR, SSG, Streaming, and other rendering strategies, as well as the use of Node Functions and Edge Functions.
EdgeOne Pages Next.js Hybrid Rendering Template
A hybrid rendering demonstration project based on EdgeOne Pages and Next.js 15, showcasing SSR, ISR, SSG, Streaming, and other rendering strategies, as well as the use of Node Functions and Edge Functions.
โจ Features
- ๐ Hybrid Rendering Strategies - Demonstrates SSR, ISR, SSG, Streaming, and other rendering methods
- โก Modern Frontend - Next.js 15 + React 18 + TypeScript
- ๐จ Aesthetic UI - Tailwind CSS 4 + shadcn/ui component library
- ๐ง Out-of-the-Box - Preconfigured development environment and build process
- ๐ฑ Mobile-First - Fully responsive design, supporting all devices
- ๐ Edge Computing - Supports Node Functions and Edge Functions
๐ ๏ธ Technology Stack
Frontend
- Next.js 15.4.7 - React full-stack framework
- React 18.3.1 - User interface library
- TypeScript 5 - Type-safe JavaScript
- Tailwind CSS 4 - Utility-first CSS framework
- shadcn/ui - Modern UI component library
Backend
- EdgeOne Pages - Edge computing platform
- Node Functions - Node.js runtime functions
- Edge Functions - Edge runtime functions
Development Tools
- ESLint - Code quality checking
- PostCSS - CSS postprocessor
- Turbopack - Fast build tool
๐ Quick Start
Environment Requirements
- Node.js 18.0 or higher version
- EdgeOne Pages account
Install Dependencies
# Clone the project
git clone <your-repo-url>
cd next-mix-template
# Install dependencies
npm install
Local Development
# Start the development server
edgeone pages dev
# Access http://localhost:6699
Build
# Build the production version
edgeone pages build
๐ Feature Demonstrations
Hybrid Rendering Strategies
SSR (Server-Side Rendering)
- Path:
/ssr
- Characteristics: Re-renders on the server for each request
- Suitable for: Dynamic content and personalized pages
ISR (Incremental Static Regeneration)
- Path:
/isr
- Characteristics: Static generation + incremental updates
- Suitable for: News or blog websites
SSG (Static Site Generation)
- Path:
/ssg
- Characteristics: Pre-generates all pages at build time
- Suitable for: Corporate websites and static content
Streaming (Streaming Rendering)
- Path:
/streaming
- Characteristics: Gradually renders page content, enhancing user experience
- Suitable for: Data-intensive pages and complex content
Server Functions
Node Functions
- Path:
/node-functions
- Characteristics: Runs code at Node.js runtime
- Suitable for: Complex backend logic and data processing
Edge Functions
- Path:
/edge-functions
- Characteristics: Runs code at edge runtime
- Suitable for: Real-time data processing and geolocation services
๐๏ธ Project Structure
next-mix-template/
โโโ src/ # Source code directory
โ โโโ app/ # Next.js App Router
โ โ โโโ layout.tsx # Root layout component
โ โ โโโ page.tsx # Home page component
โ โ โโโ ssr/ # SSR demonstration pages
โ โ โโโ isr/ # ISR demonstration pages
โ โ โโโ ssg/ # SSG demonstration pages
โ โ โโโ streaming/ # Streaming demonstration pages
โ โ โโโ node-functions/# Node Functions demonstration pages
โ โ โโโ edge-functions/# Edge Functions demonstration pages
โ โ โโโ api/ # API routes
โ โ โโโ globals.css # Global styles
โ โโโ components/ # React components
โ โ โโโ ui/ # shadcn/ui component library
โ โ โโโ Header.tsx # Page header component
โ โ โโโ Hero.tsx # Hero section component
โ โ โโโ Features.tsx # Features component
โ โ โโโ FeatureCard.tsx # Feature card component
โ โโโ lib/ # Utility functions
โโโ public/ # Static resources
โโโ package.json # Project configuration
โโโ next.config.ts # Next.js configuration
โโโ tailwind.config.ts # Tailwind CSS configuration
โโโ tsconfig.json # TypeScript configuration
โโโ components.json # shadcn/ui configuration
๐ License
This project uses the MIT License - View the LICENSE file for details.