Datalumina

Build the handbook

Project structure

Find the content, website code, settings, and instructions for your coding agent.

Open the complete company-knowledge-base folder in your editor. This is the project root. The folders inside separate the content people read from the code that displays it and the tools that run the project.

Use this page as a map. You do not need to read every file before making your first change. The Sanity and chat code is already included, but you do not need to configure those features to browse the local handbook.

Explore the tree

This tree shows the main files in the complete example, rather than the plain Fumadocs starter. Each row explains what that folder or file does. Expand a folder to look inside.

page.tsx Company homepage
layout.tsx Shared page shell and fonts
global.css Colors, spacing, and styles
AGENTS.md Project instructions for coding agents
CLAUDE.md Point Claude Code to AGENTS.md
README.md Installation and usage guide
.env.example Template for local settings and API keys
.gitignore Files Git should leave out
package.json Dependencies and npm commands
package-lock.json Exact dependency versions for installs
proxy.ts Protect pages and APIs with the password gate
next.config.mjs Next.js build and runtime settings
tsconfig.json TypeScript settings
postcss.config.mjs Connect Tailwind to the CSS build
sanity.config.ts Studio project, dataset, and editor tools
sanity.cli.ts Sanity command-line settings

The tree includes one policy and one employee as examples. The repository has the other departments, people, and supporting scripts too.

What folders do

FolderWhy it exists
app/Website pages, shared layouts, styles, and server endpoints. Its folders help determine the URLs.
components/Reusable interface pieces, such as the logo, search overlay, and chat panel.
content/Markdown policies and employee JSON records used in local mode and for the initial Sanity import.
lib/Shared logic for loading content, building the sidebar, searching, and checking access.
public/Static assets served by the website, including employee avatars.
sanity/The document definitions for policies and employees. These determine the fields available in Studio.
scripts/Commands you run for tasks such as creating the Sanity dataset and importing content.
tests/Automated checks for content, links, access, and chat behavior.
docs/Notes about this repository, including the recording guide. The handbook's policy content lives in content/docs/.

The extension tells you what a file contains. .md is Markdown text, .json is structured data, and .css controls appearance. .ts is TypeScript code, .tsx can also describe React interfaces, and .mjs is JavaScript code using modules.

Instructions and settings

README.md is the starting guide for someone opening the repository. It explains how to install, configure, and run the app.

AGENTS.md gives a coding agent project-specific instructions. Ours asks it to read the README, keep the demo small, protect credentials, and run checks after code changes. It is a text document, not website code or an AI feature visitors use. You can adapt these instructions for your project; in this repository, CLAUDE.md points Claude Code to the same file.

FileWhat it controls
package.jsonThe required packages and named commands. For example, npm run dev runs the dev command defined here.
package-lock.jsonThe resolved package versions, so installs can use the same dependency versions. npm maintains this file.
.env.exampleA shareable template listing the settings the app expects.
.envYour local settings, including content mode and API keys. You create it during setup; keep its values private.
.gitignoreTells Git which untracked files to leave out, including .env and generated folders.
proxy.tsChecks the shared-password session before allowing access to protected pages and endpoints.
next.config.mjsSettings for Next.js, which runs and builds the website.
tsconfig.jsonTypeScript settings for checking code.
postcss.config.mjsConnects Tailwind to the stylesheet build.
sanity.config.ts and sanity.cli.tsConfigure the Sanity Studio editor and its command-line tools.

After installing and running the app, you will also see node_modules/ and .next/. These contain downloaded packages and generated build files. Edit the source files above; let the tools maintain these folders and the generated next-env.d.ts file.

Find an element

What you want to changeWhere to start
Homepage headline and sectionsapp/page.tsx
Department names, icons, and descriptionslib/company.ts
Policy text and metadata in local modecontent/docs/<department>/<page>.md
Sidebar hierarchy and page orderlib/content.ts, using each policy's department and order
Sidebar shell and footer controlsapp/docs/layout.tsx
Page title, owner link, and rendered bodyapp/docs/[[...slug]]/page.tsx
Employee records and team directorycontent/employees/*.json and app/docs/team/page.tsx
Colors, fonts, and spacingapp/global.css
Search interface and retrievalcomponents/search.tsx and lib/retrieval.ts
Chat panel and answer generationcomponents/chat.tsx and app/api/chat/route.ts

In Sanity mode, edit policy and employee content in Studio. The website still uses these same layout and interface files.

From file to page

For /docs/operations/travel-expenses, the local content starts in content/docs/operations/travel-expenses.md. lib/local-content.mjs reads its metadata and body. lib/content.ts groups the pages and builds the sidebar for Fumadocs.

In app/, a page.tsx file displays a page and a layout.tsx wraps pages in a shared shell. A route.ts handles a server request, such as a search, rather than displaying a page.

The unusual folder name [[...slug]] lets one page template handle different paths under /docs. It looks up the requested policy or employee profile and displays it inside the docs layout. You do not need a separate React file for every policy.

Checkpoint

Find AGENTS.md, the homepage, and Travel expenses in your editor. Ask your coding assistant to explain those files before changing anything.

Read AGENTS.md and README.md. Give me a short tour of this repository.
Show me which files control the homepage, a policy, and the sidebar.
Explain unfamiliar terms and do not change any files yet.

Next, understand the layout and make a small change to the handbook.

On this page