Ecme logoEcme logo
Dashboard
    Ecommerce
    Project
    Marketing
    Analytic
Network
    BGP
      Peer
      RTBH
Netflow
    Dashboard
    Flow Analysis
      Top Talkers
      Flow Explorer
      IP Analyzer
    Threats
      Active Attacks
      Mitigation
    System
      Diagnostics
DPI
    Overview
    Traffic Logs
    Analysis
      IP Analysis
      Domain Check
      Unmapped ASNs
      Uncategorized Domains
    Threats
      Blacklists Data
      Blocklist Sources
      Threat Feeds
    Configuration
      Senders
      Ignored Domains
      Webhooks & Alerts
      System Maintenance
    Datasets
      IP Dataset
      Domain Dataset
Concepts
    AI
      Chat
      Image
    Projects
      Scrum Board
      List
      Details
      Tasks
      Issue
    Customer
      List
      Edit
      Create
      Details
    Products
      List
      Edit
      Create
    Orders
      List
      Edit
      Create
      Details
    Account
      Settings
      Activity log
      Roles & Permissions
      Pricing
    Help Center
      Support Hub
      Article
      Edit Article
      Manage Article
    Calendar
    File Manager
    Mail
    Chat
UI Components
    Common
      Button
      Grid
      Typography
      Icons
    Feedback
      Alert
      Dialog
      Drawer
      Progress
      Skeleton
      Spinner
      Toast
    Data Display
      Avatar
      Badge
      Calendar
      Cards
      Carousel
      Table
      Tag
      Timeline
      Tooltip
    Forms
      Checkbox
      Date Picker
      Form Control
      Input
      Input Group
      Radio
      Segment
      Select
      Slider
      Switcher
      Time Input
      Upload
    Navigation
      Dropdown
      Menu
      Pagination
      Steps
      Tabs
    Graph
      Charts
      Maps
Authentication
    Sign In
      Simple
      Side
      Split
    Sign Up
      Simple
      Side
      Split
    Forgot Password
      Simple
      Side
      Split
    Reset Password
      Simple
      Side
      Split
    Otp Verification
      Simple
      Side
      Split
Others
    Access Denied
    Landing
Guide
    Documentation
    Shared Component
    Utilities
    Changelog
Copyright © 2026 Ecme All rights reserved.
Term & Conditions | Privacy & Policy
Getting Started
IntroductionInstallationTailwindCSSCSSStarterUpdating
Development
Development ServerEnvironment VariablesFolder StructureRoutingCreate New PageAPI IntegrationAuthenticationState management
Configuration
App ConfigLayoutsNavigation ConfigThemingInternationalizationDark/Light ModeDirectionOverall Theme Config
Deployment
Build production
Other
Sources & Credits

Create New Page

This guide walks you through the steps to create a new page in the template. By leveraging Next.js file-system routing and the extended routing configuration, you can easily add new pages with tailored settings.

Create the Page Component
  1. Navigate to the app directory
    In the src/app folder, decide where your new page should go. For example, if the page requires authentication, place it in thesrc/app/(protected-pages) directory. If it doesn't require authentication, use thesrc/app/(public-pages) directory instead.

  2. Create a New File
    Create a file named after the new route. For example:

    • For a static route, createsrc/app/new-page/page.tsx.
    • For a dynamic route, use brackets to define parameters, e.g.,src/app/new-page/[id]/page.tsx.
  3. Add Your Page Code
    Define the React component for your page. Example:

    const Page = () => {
        return (
            <div>
                <h1>Welcome to the New Page</h1>
                <p>This is a custom page.</p>
            </div>
        );
    };
    
    export default Page;
Add Routing Configuration

Extend the routing setup, update the src/configs/route.config/routes.config.ts protectedRoutes or publicRoutes configuration to include your new page. For example:

import { ADMIN, USER } from '@/constants/roles';

export const protectedRoutes = {
    ...protectedRoutes,
    '/new-page': {
        key: 'newPage',
        authority: [ADMIN, USER],
        meta: {
            pageContainerType: 'contained',
        },
    },
};

In Next.js, creating a new page is as simple as adding a folder and a page.tsx file

Additional Notes

Instead of applying 'use client' directly to the page file, it is recommended to create a separate client component and import it into the page. This approach allows the page itself to remain server-rendered, optimizing server-side rendering (SSR) and letting only the client-side logic be handled in the client component. For example:

// src/app/(protected-pages)/new-page/page.tsx
import ClientComponent from './ClientComponent';

const NewPage = () => {
    return (
        <div>
            <h1>New Page</h1>
            <ClientComponent />
        </div>
    );
};

export default NewPage;
// src/app/(protected-pages)/new-page/_components/ClientComponent.tsx
'use client';

const ClientComponent = () => {
    return <p>This component runs on the client.</p>;
};

export default ClientComponent;

This way, the page can process SSR tasks before rendering client-side components.