{[
diff --git a/app/docs/reference/[type]/[category]/[name]/page.tsx b/app/docs/reference/[type]/[category]/[name]/page.tsx
new file mode 100644
index 0000000..1cc9eda
--- /dev/null
+++ b/app/docs/reference/[type]/[category]/[name]/page.tsx
@@ -0,0 +1,174 @@
+import Link from 'next/link';
+import { notFound } from 'next/navigation';
+import Code from '../../../../../components/Code';
+import Breadcrumb from '../../../../../components/Breadcrumb';
+import { getAllReferenceParams, getReferenceByPath } from '../../../../../services/referenceService';
+import { getMetadata } from "../../../../../services/metadataService";
+import { kebabCase } from 'change-case';
+
+export async function generateMetadata({ params }: { params: Promise<{ type: string; category: string; name: string }> }) {
+ const { type, category, name } = await params;
+ const data = getReferenceByPath(type, category, name);
+ return getMetadata({
+ title: `${data?.name || 'Reference'} - DocumentDB MQL Reference`,
+ description: data?.description || data?.summary || '',
+ extraKeywords: ['reference', type, category, name]
+ });
+}
+
+export async function generateStaticParams(): Promise<{ type: string; category: string; name: string }[]> {
+ return getAllReferenceParams();
+}
+
+export default async function ReferencePage({ params }: { params: Promise<{ type: string; category: string; name: string }> }) {
+ const { type, category, name } = await params;
+ const data = getReferenceByPath(type, category, name);
+
+ if (!data) {
+ notFound();
+ }
+
+ return (
+
+
+ {/* Header */}
+
+
+ {data.name}
+
+
+
+ {data.description}
+
+ {data.summary && (
+
+ )}
+
+
+ {/* Syntax Section */}
+ {data.syntax && data.syntax.length > 0 && (
+
+ )}
+
+ {/* Parameters Section */}
+ {data.parameters && data.parameters.length > 0 && (
+
+
+ Parameters
+
+ {data.parameters.map((param, index) => (
+
+
+ {param.name}
+ {param.type ?
+ {param.type}
+ : <>>}
+ {param.required && (
+
+ required
+
+ )}
+
+ {param.description && (
+
{param.description}
+ )}
+
+ ))}
+
+
+ )}
+
+ {/* Examples Section */}
+ {data.examples && (
+
+
+ Examples
+
+ {/* Sample Data */}
+ {data.examples.sample && (
+
+ )}
+
+ {/* Example Items */}
+ {data.examples.items && data.examples.items.length > 0 && (
+
+ {data.examples.items.map((example, index) => (
+
+
+
{example.title}
+
+ {example.explanation && (
+
+
{example.explanation}
+
+ )}
+
+ {example.description && (
+
{example.description}
+ )}
+
+ {/* Query */}
+
+
+ {/* Output */}
+ {example.output && (
+
+ )}
+
+ ))}
+
+ )}
+
+ )}
+
+ {/* Related Section */}
+ {data.related && data.related.length > 0 && (
+
+
+ Related
+
+
+ {data.related.map((rel, index) => (
+ -
+
+
+ {rel.reference}
+
+
+ ))}
+
+
+
+ )}
+
+ );
+}
diff --git a/app/docs/reference/[type]/[category]/page.tsx b/app/docs/reference/[type]/[category]/page.tsx
new file mode 100644
index 0000000..3f68527
--- /dev/null
+++ b/app/docs/reference/[type]/[category]/page.tsx
@@ -0,0 +1,59 @@
+import Link from 'next/link';
+import { notFound } from 'next/navigation';
+import ReferenceTable from '../../../../components/Grid';
+import Breadcrumb from '../../../../components/Breadcrumb';
+import { getReferencesByTypeGroupedByCategory, getAllTypeCategoryCombinations, isValidTypeCategoryCombination, getCategoryDescription } from '../../../../services/referenceService';
+import { getMetadata } from "../../../../services/metadataService";
+import pluralize from 'pluralize';
+import { capitalCase } from 'change-case';
+
+export const generateStaticParams = async (): Promise<{ type: string, category: string }[]> => {
+ return getAllTypeCategoryCombinations();
+};
+
+export async function generateMetadata({ params }: { params: Promise<{ type: string; category: string }> }) {
+ const { type, category } = await params;
+ const title = `${capitalCase(category)} ${capitalCase(pluralize(type))}`;
+ const description = getCategoryDescription(type, category);
+ return getMetadata({
+ title: `${title} - DocumentDB MQL Reference`,
+ description: description || '',
+ extraKeywords: ['reference', type, category]
+ });
+}
+
+export default async function CommandReferencePage({ params }: { params: Promise<{ type: string, category: string }> }) {
+ const { type, category } = await params;
+ if (!isValidTypeCategoryCombination(type, category)) {
+ notFound();
+ }
+ const grouped = getReferencesByTypeGroupedByCategory(type);
+ const items = grouped[category] || [];
+ if (items.length === 0) {
+ notFound();
+ }
+ const description = getCategoryDescription(type, category);
+ return (
+
+
+
+
+ MongoDB Query Language (MQL) {capitalCase(category)} {capitalCase(pluralize(type))}
+
+
+ {description && (
+
+ {description}
+
+ )}
+
+
+
+ );
+}
diff --git a/app/docs/reference/[type]/page.tsx b/app/docs/reference/[type]/page.tsx
new file mode 100644
index 0000000..d43991b
--- /dev/null
+++ b/app/docs/reference/[type]/page.tsx
@@ -0,0 +1,63 @@
+import Link from 'next/link';
+import { notFound } from 'next/navigation';
+import ReferenceTable from '../../../components/Grid';
+import Breadcrumb from '../../../components/Breadcrumb';
+import { getReferencesByTypeGroupedByCategory, getTypeDescription } from '../../../services/referenceService';
+import { getMetadata } from "../../../services/metadataService";
+import pluralize from 'pluralize';
+import { capitalCase } from 'change-case';
+
+const allowed_types = ['operator', 'command'];
+
+export const generateStaticParams = async (): Promise<{ type: string }[]> => [
+ { type: 'operator' },
+ { type: 'command' }
+];
+
+export async function generateMetadata({ params }: { params: Promise<{ type: string }> }) {
+ const { type } = await params;
+ const title = capitalCase(pluralize(type));
+ const description = getTypeDescription(type);
+ return getMetadata({
+ title: `${title} - DocumentDB MQL Reference`,
+ description: description || '',
+ extraKeywords: ['reference', type]
+ });
+}
+
+export default async function CommandReferencePage({ params }: { params: Promise<{ type: string }> }) {
+ const type = (await params).type;
+ if (!allowed_types.includes(type)) {
+ notFound();
+ }
+ const grouped = getReferencesByTypeGroupedByCategory(type);
+ const description = getTypeDescription(type);
+ return (
+
+
+
+
+ MongoDB Query Language (MQL) {capitalCase(pluralize(type))}
+
+
+ {description && (
+
+ {description}
+
+ )}
+
+ {Object.entries(grouped).map(([category, items]) => (
+
+
+
+ {capitalCase(category)}
+
+
+
+
+
+
+ ))}
+
+ );
+}
diff --git a/app/docs/reference/layout.tsx b/app/docs/reference/layout.tsx
new file mode 100644
index 0000000..b54a3a4
--- /dev/null
+++ b/app/docs/reference/layout.tsx
@@ -0,0 +1,62 @@
+import { Metadata } from 'next';
+import Link from 'next/link';
+import Index from '../../components/Index';
+import { getReferencesGroupedByTypeAndCategory } from '../../services/referenceService';
+import { getMetadata } from "../../services/metadataService";
+
+export const metadata: Metadata = getMetadata({
+ title: 'DocumentDB MQL Reference',
+ description: 'MongoDB Query Language (MQL) reference for DocumentDB. DocumentDB is a powerful, scalable open-source database solution with MongoDB query compatibility.',
+ extraKeywords: ['reference']
+});
+
+export default function ReferenceLayout({
+ children,
+}: Readonly<{
+ children: React.ReactNode;
+}>) {
+ const groupedReferences = getReferencesGroupedByTypeAndCategory();
+
+ return (
+
+ {/* Background elements */}
+
+
+
+
+
+
+
+ Back to Documentation
+
+
MQL Documentation
+
+
+
+
+
+ {children}
+
+
+
+
+ );
+}
diff --git a/app/docs/reference/page.tsx b/app/docs/reference/page.tsx
new file mode 100644
index 0000000..317feed
--- /dev/null
+++ b/app/docs/reference/page.tsx
@@ -0,0 +1,47 @@
+import Link from 'next/link';
+import ReferenceTable from '../../components/Grid';
+import Breadcrumb from '../../components/Breadcrumb';
+import { getReferencesGroupedByTypeAndCategory } from '../../services/referenceService';
+import pluralize from 'pluralize';
+import { capitalCase } from 'change-case';
+
+export default function Home() {
+ const grouped = getReferencesGroupedByTypeAndCategory();
+ return (
+
+
+
+
+ MongoDB Query Language (MQL)
+
+
+
+ Explore the essential MongoDB Query Language (MQL) operators and commands available in this reference. Each entry includes a brief description and usage details to help you build effective queries and manage your database.
+
+
+ {Object.entries(grouped).map(([type, categories]) => {
+ return (
+
+
+
+ {capitalCase(pluralize(type))}
+
+
+ {Object.entries(categories).map(([category, items]) => (
+
+
+
+ {capitalCase(category)} {capitalCase(pluralize(type))}
+
+
+
+
+
+
+ ))}
+
+ );
+ })}
+
+ );
+}
\ No newline at end of file
diff --git a/app/globals.css b/app/globals.css
index fdc8eb1..12e4bf5 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -1,6 +1,4 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
+@import "tailwindcss";
:root {
--background: 0 0% 8%;
diff --git a/app/layout.tsx b/app/layout.tsx
index 8aa2e9e..883e80f 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -2,26 +2,36 @@ import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import Navbar from "./components/Navbar";
+import { getMetadata } from "./services/metadataService";
const inter = Inter({ subsets: ["latin"] });
-export const metadata: Metadata = {
- title: "DocumentDB - Open Source Document Database",
- description: "A powerful, scalable open-source document database solution",
-};
+export const metadata: Metadata = getMetadata({
+ title: 'DocumentDB - Open Source Document Database',
+ description: 'A powerful, scalable open-source document database solution. Built on the principles of transparency, developer freedom, and standardization, our mission is to build a MongoDB compatible open source document database based on PostgreSQL.',
+});
export default function RootLayout({
children,
-}: {
+}: Readonly<{
children: React.ReactNode;
-}) {
+}>) {
return (
{children}
-
+
);
-}
+}
\ No newline at end of file
diff --git a/app/packages/page.tsx b/app/packages/page.tsx
new file mode 100644
index 0000000..92d04d7
--- /dev/null
+++ b/app/packages/page.tsx
@@ -0,0 +1,227 @@
+import Link from "next/link";
+
+export default function PackagesPage() {
+ return (
+
+
+ {/* Header */}
+
+
+ 📦 DocumentDB Package Repository
+
+
+ Official APT and YUM repositories for DocumentDB packages
+
+
+
+ 🔐 GPG Signed
+
+
+ 🐧 Multi-Distribution
+
+
+ 🔄 Auto-Updates
+
+
+
+
+ {/* Quick Install Cards */}
+
+ {/* Debian/Ubuntu Card */}
+
+
+
+
+ # Add repository with GPG verification
+
+ curl -fsSL https://documentdb.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/documentdb-archive-keyring.gpg
+
+ echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb stable main" | sudo tee /etc/apt/sources.list.d/documentdb.list
+
+
+ # Install packages
+
+ sudo apt update && sudo apt install postgresql-16-documentdb
+
+
+
+
+ Supports: Debian 11/12, Ubuntu 22.04/24.04
+
+
+ AMD64 + ARM64
+
+
+
+
+ {/* RHEL/CentOS/Fedora Card */}
+
+
+
+
+
+ # Enable CRB repo (for dependencies)
+
+ sudo dnf install -y dnf-plugins-core
+
+ sudo dnf config-manager --set-enabled crb
+
+
+ # Add repository with GPG verification
+
+ sudo rpm --import https://documentdb.io/documentdb-archive-keyring.gpg
+
+ echo '[documentdb]
+
+ name=DocumentDB Repository
+
+ baseurl=https://documentdb.io/rpm/rhel9
+
+ enabled=1
+
+ gpgcheck=1
+
+ gpgkey=https://documentdb.io/documentdb-archive-keyring.gpg' | sudo tee /etc/yum.repos.d/documentdb.repo
+
+
+ # Install packages
+
+ sudo dnf install postgresql16-documentdb
+
+
+
+
+ Supports: RHEL 8/9, Rocky, AlmaLinux, CentOS Stream
+
+
+ x86_64 + aarch64
+
+
+
+
+
+ {/* Installation Guide Link */}
+
+
+
+
📖 Complete Installation Guide
+
+ Detailed instructions for all distributions, GPG verification, troubleshooting, etc
+
+
+
+ View Guide
+
+
+
+
+ {/* Alternative Installation Methods */}
+
+
Alternative Installation Methods
+
+ {/* Direct Downloads */}
+
+
+ Direct Package Downloads
+
+
+ Browse and download individual packages without setting up repositories.
+
+
+
+ {/* Manual Installation */}
+
+
Manual Installation
+
+ For one-time installations, you can download and install packages manually:
+
+
+
+ # Example: Direct .deb installation
+ wget https://documentdb.io/packages/ubuntu22.04-postgresql-16-documentdb_0.107-0_amd64.deb
+ sudo dpkg -i ubuntu22.04-postgresql-16-documentdb_0.107-0_amd64.deb
+
+ # Example: Direct .rpm installation
+ wget https://documentdb.io/packages/rhel8-postgresql16-documentdb-0.107.0-1.el8.x86_64.rpm
+ sudo rpm -i rhel8-postgresql16-documentdb-0.107.0-1.el8.x86_64.rpm
+
+
+
+
+
+ {/* Package Information */}
+
+
Available Packages
+
+
+
+
+
+ APT Packages
+
+
+ Debian 11/12, Ubuntu 22.04/24.04
+
+
+ - • postgresql-15-documentdb
+ - • postgresql-16-documentdb
+ - • postgresql-17-documentdb
+
+
+
+
+
+
+ RPM Packages
+
+
+ RHEL 8/9, CentOS, Fedora
+
+
+ - • postgresql16-documentdb
+ - • postgresql17-documentdb
+
+
+
+
+
+
+
+
+
Multi-Architecture Support
+
+ All packages support both AMD64 and ARM64 architectures (including Apple Silicon, AWS Graviton, etc.)
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/app/page.tsx b/app/page.tsx
index 85eb854..615558a 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -10,17 +10,26 @@ export default function Home() {
DocumentDB
- A powerful, scalable open-source document database built for modern applications
+ A powerful, scalable, MongoDB compatible open-source document database built for modern applications
@@ -53,9 +62,9 @@ export default function Home() {
- We want to ensure developers have full visibility into the underlying architecture of the engine
+ We want to ensure developers have full transparency into the underlying architecture of the engine