01. Overview/Quickstart

5-Minute Quickstart

Follow this guided track to create a GN-Apex project node, configure your environment variables, mount the React Provider, and query live edge content.

GET STARTED FAST
< 5 Min
From Zero to Live Production Node

Install the SDK, add your public key, and your frontend is instantly equipped with CMS, Auth, and Analytics.

Zero Boilerplate · Zero Configuration
1
Create Account & Provision Workspace

Register an account on gnapex.com, verify your email with the 6-digit OTP, and create your workspace. Choose your operational mode (General, Education, Non-Profit, or E-Commerce).

2
Obtain Project Credentials

In your project dashboard, navigate to Settings → API Keys. Copy your Project ID and Public API Key (nx_pk_...) into your local .env.local file:

1# Your unique Project Node ID
2NEXT_PUBLIC_NEXUS_ID="prj_clx1a2b3c4d5e6f7g8h9"
3 
4# Your Public API Key (Safe for client browsers)
5NEXT_PUBLIC_NEXUS_KEY="nx_pk_live_8f3a9e2b1c4d5e6f7a8b9c0d"
6 
7# The GN-Apex API Endpoint
8NEXT_PUBLIC_NEXUS_API_URL="https://gnapex.com"
3
Install the Client SDK

Install the official package and Lucide icons into your Next.js or React application:

1npm install @nexushub/client lucide-react
4
Mount the NexusProvider

Wrap your root layout with NexusProvider to activate automatic route tracking, RUM Web Vitals, and real-time live events:

1import { NexusProvider } from "@nexushub/client";
2import "./globals.css";
3 
4export default function RootLayout({
5 children,
6}: {
7 children: React.ReactNode;
8}) {
9 return (
10 <html lang="en">
11 <body>
12 <NexusProvider autoPromptPush={true}>
13 {children}
14 </NexusProvider>
15 </body>
16 </html>
17 );
18}
5
Query Content & Stream Live Events

Fetch CMS pages with automatic ISR tag injection and render rich components:

1import { nexus } from "@nexushub/client";
2import { NexusRichText, NexusImage } from "@nexushub/client/react";
3import { generateDocMetadata } from "@/lib/docs-metadata";
4 
5// Auto-generated SEO Metadata
6export const metadata = generateDocMetadata("/docs/overview/quickstart");
7 
8export default async function HomePage() {
9 // Query singleton page with automatic Next.js ISR tag caching
10 const page = await nexus.getPage("home");
11 
12 return (
13 <main className="max-w-4xl mx-auto py-12 px-4">
14 <h1 className="text-4xl font-extrabold tracking-tight">{page.hero_title}</h1>
15 <NexusImage
16 value={page.hero_image}
17 className="w-full h-80 my-6 rounded-2xl object-cover shadow-xl"
18 />
19 <NexusRichText value={page.body_content} />
20 </main>
21 );
22}
You're Live!
Your application is now connected to the GN-Apex edge network. Web analytics, Core Web Vitals, session tracking, and instant cache revalidation are active.