Skip to content

Commit c6d474c

Browse files
authored
Merge pull request #164 from nocodb/docs/legal-v2
Docs/legal v2
2 parents 7c5372e + 2ad8a5d commit c6d474c

24 files changed

+1249
-10
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import { legalDocsSource } from '@/lib/source';
2+
import { DocsBody, DocsDescription, DocsTitle, } from 'fumadocs-ui/page';
3+
import { notFound } from 'next/navigation';
4+
import { getMDXComponents } from '@/mdx-components';
5+
import MdxLink from "@/components/mdx/MdxLink";
6+
import { AnchorProvider } from 'fumadocs-core/toc';
7+
import { TOCProvider, TOCScrollArea } from 'fumadocs-ui/components/layout/toc';
8+
import { PageTOC } from 'fumadocs-ui/layouts/docs/page'
9+
import ClerkTOCItems from 'fumadocs-ui/components/layout/toc-clerk';
10+
import { getPageTreePeers } from 'fumadocs-core/server';
11+
import { Cards, Card } from 'fumadocs-ui/components/card';
12+
import TOCMobile from '@/components/layout/TOCMobile';
13+
14+
export default async function Page(props: {
15+
params: Promise<{ slug?: string[] }>;
16+
}) {
17+
const params = await props.params;
18+
const page = legalDocsSource.getPage(params.slug);
19+
if (!page) notFound();
20+
21+
const MDXContent = page.data.body;
22+
23+
return (
24+
<TOCProvider toc={page.data.toc}>
25+
<AnchorProvider toc={page.data.toc}>
26+
<PageTOC className='hidden xl:sticky xl:block !top-[120px] w-68 max-h-[calc(100vh-120px)] order-last shrink-0 overflow-auto'>
27+
<TOCScrollArea className='w-64'>
28+
<ClerkTOCItems />
29+
</TOCScrollArea>
30+
</PageTOC>
31+
<TOCMobile />
32+
<div className='flex flex-col flex-1 gap-4 mx-auto container overflow-y-auto shrink-1 max-w-179 relative p-4'>
33+
<DocsTitle>{page.data.title}</DocsTitle>
34+
<DocsDescription className="mb-0">{page.data.description}</DocsDescription>
35+
<DocsBody>
36+
<MDXContent
37+
components={getMDXComponents({
38+
a: MdxLink
39+
})}
40+
/>
41+
</DocsBody>
42+
<Cards>
43+
{getPageTreePeers(legalDocsSource.pageTree, page.url).slice(0, 2).map((peer) => (
44+
<Card key={peer.url} title={peer.name} href={peer.url}>
45+
{peer.description}
46+
</Card>
47+
))}
48+
</Cards>
49+
<div className="py-8">
50+
</div>
51+
</div>
52+
</AnchorProvider>
53+
</TOCProvider>
54+
);
55+
}
56+
57+
export async function generateStaticParams() {
58+
return legalDocsSource.generateParams();
59+
}
60+
61+
export async function generateMetadata(props: {
62+
params: Promise<{ slug?: string[] }>;
63+
}) {
64+
const params = await props.params;
65+
const page = legalDocsSource.getPage(params.slug);
66+
if (!page) notFound();
67+
68+
return {
69+
title: page.data.title,
70+
description: page.data.description,
71+
};
72+
}

app/docs/legal/layout.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import Sidebar from "@/components/layout/Sidebar";
2+
import { legalDocsSource } from "@/lib/source";
3+
import { TreeContextProvider } from '@/provider/TreeContextProvider';
4+
import { ReactNode } from "react";
5+
import MobileSidebar from "@/app/docs/MobileSidebar";
6+
7+
export default function Page({children}: {children: ReactNode}) {
8+
return (
9+
<div className='relative'>
10+
<TreeContextProvider tree={legalDocsSource.pageTree}>
11+
<div className="max-w-screen-xl flex flex-col xl:flex-row mt-30 mx-auto">
12+
<Sidebar />
13+
{children}
14+
</div>
15+
<MobileSidebar/>
16+
</TreeContextProvider>
17+
</div>
18+
)
19+
}

app/docs/legal/not-found.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import NotFoundPage from '@/components/NotFoundPage'
2+
3+
export default async function NotFound() {
4+
return <NotFoundPage url="/docs/legal" />
5+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import {NextResponse} from 'next/server';
2+
import {legalDocsSource} from '@/lib/source';
3+
import {DocumentRecord} from "@/utils/search/typesense";
4+
5+
export const revalidate = false;
6+
7+
export function GET() {
8+
const results = [] as DocumentRecord[];
9+
10+
11+
for (const page of legalDocsSource.getPages()) {
12+
results.push({
13+
_id: page.url,
14+
structured: page.data.structuredData,
15+
url: page.url,
16+
title: page.data.title,
17+
description: page.data.description,
18+
});
19+
}
20+
21+
return NextResponse.json(results);
22+
}

components/icons/Legal.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { SVGProps } from "react";
2+
import { Scale } from "lucide-react";
3+
4+
export default function LegalIcon({
5+
className,
6+
...props
7+
}: SVGProps<SVGSVGElement>) {
8+
return <Scale className={className} {...props} />;
9+
}

components/layout/TopBarNaigation.tsx

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import {useEffect, useRef, useState} from "react"
44
import {clsx} from "clsx";
55
import Link from "next/link";
6+
import {usePathname} from "next/navigation";
67

78
const tabs = [{
89
title: 'Product Docs',
@@ -18,15 +19,28 @@ const tabs = [{
1819
{
1920
title: 'Changelog (EE)',
2021
href: '/docs/changelog',
22+
},
23+
{
24+
title: 'Legal',
25+
href: '/docs/legal',
2126
}
2227
]
2328

2429
export default function TopBarNaigation() {
30+
const pathname = usePathname()
2531
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null)
2632
const [activeIndex, setActiveIndex] = useState(-1)
2733
const [hoverStyle, setHoverStyle] = useState({})
2834
const [activeStyle, setActiveStyle] = useState({left: "0px", width: "0px"})
2935
const tabRefs = useRef<(HTMLDivElement | null)[]>([])
36+
37+
// Filter tabs based on current path - only show Legal if we're on /docs/legal
38+
const visibleTabs = tabs.filter(tab => {
39+
if (tab.href === '/docs/legal') {
40+
return pathname === '/docs/legal' || pathname.startsWith('/docs/legal/')
41+
}
42+
return true
43+
})
3044

3145
useEffect(() => {
3246
if (hoveredIndex !== null) {
@@ -52,14 +66,11 @@ export default function TopBarNaigation() {
5266
}
5367
}, [activeIndex])
5468

55-
// Determine which tab should be active based on the current path when component mounts
69+
// Determine which tab should be active based on the current path
5670
useEffect(() => {
57-
if (typeof window !== 'undefined') {
58-
const path = window.location.pathname;
59-
const activeTabIndex = tabs.findIndex(tab => path.startsWith(tab.href));
60-
setActiveIndex(activeTabIndex !== -1 ? activeTabIndex : 0);
61-
}
62-
}, []);
71+
const activeTabIndex = visibleTabs.findIndex(tab => pathname.startsWith(tab.href));
72+
setActiveIndex(activeTabIndex !== -1 ? activeTabIndex : 0);
73+
}, [pathname, visibleTabs]);
6374

6475
// Apply active style whenever activeIndex changes or after the component has mounted
6576
useEffect(() => {
@@ -95,7 +106,7 @@ export default function TopBarNaigation() {
95106

96107
{/* Tabs */}
97108
<div className="relative flex gap-3 items-center">
98-
{tabs.map((tab, index) => (
109+
{visibleTabs.map((tab, index) => (
99110
<Link key={index} href={tab.href}>
100111
<div
101112
ref={(el) => { tabRefs.current[index] = el; }}

content/legal/ai-terms.mdx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: 'Noco AI Terms'
3+
description: 'Review the Noco AI Terms to understand your rights, responsibilities, and limitations when using NocoDB’s AI-powered features, including data usage, third-party provider requirements, and service availability.'
4+
---
5+
6+
**Last Updated: August 05, 2025**
7+
8+
These Noco AI Terms (“AI Terms”) apply to your access to and use of Noco AI (defined below). The AI Terms form a part of the agreement between you or your organization (collectively, “you” or “your”) and NocoDB Inc, doing business as NocoDB (“NocoDB”, “we”, “our”, or “us”), that governs your use of the Services, such as NocoDB’s [Terms of Service](/docs/legal/terms-of-service) or a [Master Subscription Agreement](/docs/legal/msa) between you and NocoDB (your “Service Terms”). Capitalized terms used but not defined in these AI Terms have the meaning set forth in your Service Terms. As used in these AI Terms, “Customer Data” also means “Your Content” (or similar term) as used in your Service Terms, and the “Services” also means the “NocoDB Products” (or similar term) as used in your Service Terms. In the event of a conflict between these AI Terms and your Service Terms, these AI Terms will control.
9+
10+
## 1. Noco AI
11+
As used in these AI Terms, “Noco AI” means the features and functionality of the Services made available to you that utilize generative artificial intelligence models. Noco AI is powered by the third-party AI platform and model providers listed on this page, as updated from time to time (each a “Third-Party AI Provider”). In consideration of your agreeing to and complying with these AI Terms, we grant you a non-exclusive, revocable, non-transferable, limited right to access and use Noco AI in accordance with your Service Terms, including these AI Terms.
12+
13+
## 2. Input and Output
14+
You may provide or make available prompts, data, text, or other input to be processed by Noco AI (“Input”) and receive data generated and returned by Noco AI based on the Input (“Output”). Input processed by Noco AI and the resulting Output are your Customer Data.
15+
16+
## 3. Use Restrictions and Third-Party AI Provider Requirements
17+
When you use Noco AI, you are solely responsible for the development, content, operation, maintenance, and use of Customer Data. You will ensure, and you represent and warrant, that Input and your use of Noco AI and Output will not violate: (a) any applicable law; (b) your Service Terms, including these AI Terms; or (c) NocoDB’s Acceptable Use Policy, as updated from time to time. In addition, you will review and comply with the applicable Third-Party AI Provider terms and policies available here, as updated from time to time, which are incorporated into these AI Terms by reference.
18+
19+
## 4. Limitations
20+
You acknowledge that due to the nature of machine learning and the technology powering Noco AI, Output may not be unique, and Noco AI may generate the same or similar output to you and a third party. You should not rely on factual assertions in Output without independently fact-checking their accuracy; Output that appears accurate because of its detail or specificity may still contain material inaccuracies. Noco AI may not dynamically retrieve information, and Output may not account for events or changes to underlying facts occurring after the relevant model was trained. Output should be evaluated for accuracy and suitability for your use case, including by employing human review of the Output.
21+
22+
## 5. Improving Noco AI
23+
Your use of Noco AI does not grant NocoDB any right or license to use or share Customer Data in a manner that is inconsistent with your Service Terms, unless otherwise agreed by you. For clarity, NocoDB does not use, or permit others to use, Input or Output to train the generative artificial intelligence models used to provide Noco AI.
24+
25+
## 6. Data Retention
26+
Third-Party AI Providers will not (a) log Input or Output for human review, or (b) save or retain Input or Output. Third-Party AI Providers may retain and use metadata associated with Noco AI usage solely for billing, safety, and compliance purposes.
27+
28+
## 7. Privacy and Subprocessors
29+
To the extent your Customer Data contains Personal Data (or similar term), you instruct NocoDB and our subprocessors to process such Personal Data for the purposes of providing Noco AI and Output. You consent to our use of applicable Third-Party AI Providers as subprocessors, as listed at [www.nocodb.com/subprocessors](/docs/legal/subprocessors).
30+
31+
## 8. Suspension and Service Levels
32+
Notwithstanding anything to the contrary in your Service Terms, NocoDB may suspend your access to any portion or all of Noco AI if: (a) NocoDB reasonably believes or determines that your use of Noco AI is in violation of these AI Terms or poses a risk to NocoDB, the Services, or a third party; (b) a Third-Party AI Provider requires such suspension; (c) a Third-Party AI Provider has suspended or terminated NocoDB’s access to or use of services or products required to enable your access to Noco AI; or (d) NocoDB’s provision of Noco AI to you is prohibited by legislation, regulation, or other act of government.
33+
34+
Notwithstanding anything to the contrary in your Service Terms, NocoDB does not make any warranty regarding the availability or uptime of Noco AI, and downtime of Noco AI will not constitute downtime under any applicable service level agreement, such as NocoDB’s [Service Level Agreement](/docs/legal/sla).
35+
36+
## 9. Beta Features
37+
NocoDB may provide you with a version or feature of Noco AI that is not generally available as part of an alpha, a beta, a limited release, a developer preview, or another similar term (“AI Beta”). Such Noco AI versions or features (collectively, “AI Beta Features”) might contain bugs, errors, or omissions. AI Beta Features are provided to you for testing purposes only, on an “AS IS” basis, without any warranty, liability, indemnity, or performance obligations. AI Beta Features are not subject to any support commitments. AI Beta Features might never be made available for general use or otherwise be provided in a future version of Noco AI or the Services, and we may discontinue AI Beta Features, or revoke your access to AI Beta Features, at any time for any or no reason, in our sole discretion, without any liability to you. Discontinuing AI Beta Features, or making AI Beta Features inaccessible to you, may have the effect of making some or all of your Customer Data inaccessible to you.
38+
39+
## 10. Modifications
40+
Notwithstanding anything to the contrary in your Service Terms, we may modify or update these AI Terms from time to time, so you should review this page periodically. In such cases, we will update the “Last Updated” date at the top of this page. If the changes are material, we will provide you with reasonable notice prior to the effective date of the changes, either by emailing the email address associated with your account or by notifying you through the Services. For clarity, such notice may be provided to any person designated as an administrator on your account. Your continued use of Noco AI after any change to these AI Terms becomes effective constitutes your acceptance of the new AI Terms. If you do not agree to any part of these AI Terms or any future AI Terms, you must not use or access Noco AI. If NocoDB fails to provide you with notice of material changes to these AI Terms in accordance with this Section, then your use of Noco AI will continue to be governed by the terms and conditions of these AI Terms as they were immediately prior to such changes, unless and until you consent to the new version of the AI Terms, after which the modified AI Terms will govern. For clarity, renewing your subscription to the Services subject to the new AI Terms or Service Terms that reference the new AI Terms (including by automatic renewal), or otherwise agreeing to the new AI Terms in accordance with this Section, constitutes consent for purposes of the preceding sentence.

0 commit comments

Comments
 (0)