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.

View Demo
FrameworkNext.js
Use CaseStarter
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.

๐Ÿš€ One-Click Deployment

Deploy with EdgeOne Pages