@geenius/docs
v0.16.1
Published
Geenius Docs — Provider-based documentation primitives and Storybook review apps for React, SolidJS, and Convex.
Maintainers
Readme
@geenius/docs
Provider-driven documentation primitives for Geenius products, including shared docs models, React and SolidJS UIs, vanilla CSS variants, and Convex-backed content storage.
Install
pnpm add @geenius/docsAdd the framework peers you actually consume:
pnpm add react react-dom
pnpm add solid-js
pnpm add convexImport Surface
import { configureDocs, extractToc } from '@geenius/docs'
import { AstroDocsProvider, InternalDocsProvider } from '@geenius/docs/shared/providers'
import { DocPage, DocsLayout, useDocs } from '@geenius/docs/react'
import { DocPage as DocPageCss, DocsLayout as DocsLayoutCss } from '@geenius/docs/react-css'
import { DocPage as SolidDocPage, createDocs } from '@geenius/docs/solidjs'
import { DocPage as SolidCssDocPage, createDocs as createCssDocs } from '@geenius/docs/solidjs-css'
import { docsTables, getFullTree, listSections } from '@geenius/docs/convex'Usage
import type { DocPage as DocsPage } from '@geenius/docs'
import { DocPage, DocsLayout, useDocs } from '@geenius/docs/react'
const tree = [
{
id: 'getting-started',
title: 'Getting Started',
slug: 'getting-started',
order: 0,
access: 'public',
pageCount: 1,
pages: [
{
id: 'intro',
title: 'Introduction',
slug: 'introduction',
content: '# Introduction\n\nWelcome to Geenius Docs.',
sectionId: 'getting-started',
order: 0,
author: { name: 'Mehdi Nabhani' },
access: 'public',
tags: ['overview'],
status: 'published',
createdAt: '2026-04-12T09:00:00.000Z',
updatedAt: '2026-04-12T09:00:00.000Z',
wordCount: 120,
readingTime: 1,
viewCount: 42,
} satisfies DocsPage,
],
},
]
export function DocsExample(): React.JSX.Element {
const docs = useDocs(tree, { siteName: 'Geenius Docs' })
return (
<DocsLayout
sections={docs.sections}
currentPageId={docs.currentPage?.id}
onNavigate={(page) => docs.setPage(page)}
>
<DocPage page={docs.flatPages[0]} />
</DocsLayout>
)
}Storybook Review Apps
Run them locally with:
pnpm storybook:react
pnpm storybook:solidjsLicense
See LICENSE.
