Routing

Domiex routing follows the Next.js App Router conventions, it uses a file-based routing system where each file in the /app directory corresponds to a route in your application. Subfolders represent nested routes, making it easy to structure complex navigation.

For detailed information & concepts about the Next.js App Router , please refer to the documentation.

1. Setting Up the Project Structure
  • Description: Organize your project into layout (with sidebar & topbar) and nonlayout (without them).
  • Folder Structure:
    • app
      • (layout) (#sidebar & topbar)
        • layout.jsx
        • newpage/page.jsx
      • (non-layout) (# without sidebar & topbar)
        • layout.jsx
        • auth/page.jsx
      • layout.jsx (#Root Layout)
      • page.jsx (#Main Entry)
    Layout
  • The layout folder will contain pages that need a sidebar and topbar (e.g., dashboard, chart pages).
    Non-Layout
  • The layout folder will contain pages without these components (e.g., login, error pages)
2. Creating Pages and Custom Layouts
  • Description: Define custom layouts for different sections of the app.
  • Folder Structure:
    • app
      • (layout) (#sidebar & topbar)
        • layout.jsx
        • newpage/page.jsx
      • (non-layout) (# without sidebar & topbar)
        • layout.jsx
        • auth/page.jsx
      • (custom-layout) (#add custom sidebar & topbar)
        • layout.jsx (#holds custom sidebar & topbar)
        • settings/page.jsx
      • layout.jsx (#Root Layout)
      • page.jsx (#Main Entry)
  • Creating a Custom Layout for a Specific Page:
    // app/custom-layout/layout.jsx
    import Sidebar from "@/components/Sidebar";
                            
    export default function Layout({ children }) {
        return (
            <Sidebar>
             {children}
            <Sidebar/>
        )
    }
Receive the latest updates directly in your inbox!

Be the first to know about new updates and exclusive discounts. No spam, just great offers!

How about

A Custom Project?

With over 7 years of experienced team, we specialize in delivering custom projects for startups, blue-chip companies, and government agencies. We have successfully completed over 250+ projects, providing tailored solutions that meet the unique needs of each client.

Hire Us
Domiex Admin & Dashboards
230+

Total Pages

5+

Layouts

11+

Application

We provide quick support withing one business day to all of our customers.

© Domiex Created & Crafted by SRBThemes.