mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 10:48:32 +07:00
bd2eb566dfb6f198d2c3f1053837c2227141ded1
* chore: update configuration and dependencies for improved performance and compatibility - Refactored \`next-env.d.ts` to use import syntax for route types. - Updated \`next.config.mjs\` to enable turbopack and removed ESLint ignore settings. - Modified \`package.json\` and \`pnpm-lock.yaml\` to upgrade dependencies, including Next.js to version 16.1.6 and ajv to version 8.18.0. - Adjusted build scripts in \`package.json\` to use webpack. - Added a new \`proxy.ts\` file for handling markdown requests. - Updated \`tsconfig.json\` to include additional TypeScript definitions for development. * chore: update Next.js bundle analysis workflow for improved compatibility and performance - Updated GitHub Actions workflow to use the latest versions of actions for better stability. - Changed Node.js version to 20 and updated pnpm setup to version 4. - Simplified ESLint command and build process by using `pnpm lint` and `pnpm build`. - Enhanced comment handling by consolidating create/update comment steps into a single action. - Removed deprecated steps and comments for a cleaner workflow configuration. * chore: update package manager version in package.json - Set packageManager to pnpm@9.5.0 for improved dependency management. * chore: enhance Next.js bundle analysis workflow with caching and telemetry settings - Added environment variable to disable Next.js telemetry for privacy. - Implemented caching for Next.js build to improve workflow performance by restoring build artifacts. * refactor: simplify credentials generation logic in credentialsGenerator.ts - Replaced crypto module with window.crypto for generating random hex values. - Streamlined the generateCredentials function to use concise object return syntax.
LibreChat Docs
The official documentation site for LibreChat, built with Next.js 15 and Fumadocs.
Tech Stack
- Framework: Next.js 15 (App Router)
- Docs Engine: Fumadocs (fumadocs-mdx + fumadocs-ui)
- Styling: Tailwind CSS
- Icons: Lucide React
- Package Manager: Bun
Local Development
Prerequisites: Bun 1.0+
- Clone the repository
- Copy
.env.templateto.env.localand fill in any optional values - Install dependencies:
bun i - Start the dev server (uses Turbopack):
bun dev - Open http://localhost:3333
Note: Always run bun run build before opening a PR to catch build errors early.
Project Structure
app/ # Next.js App Router pages (docs, blog, changelog, API routes)
content/
docs/ # Documentation pages (MDX)
blog/ # Blog posts (MDX)
changelog/ # Changelog entries (MDX)
components/ # React components (home, UI, icons, etc.)
lib/ # Utilities, icons, MDX components, Nextra shims
public/ # Static assets
pages/ # Legacy pages (migrating to app/)
source.config.ts # Fumadocs content collections config
Documentation Content
Docs live in content/docs/ and are organized by section. Each directory has a meta.json that controls sidebar navigation:
{
"title": "Section Title",
"icon": "Wrench",
"pages": ["index", "page-one", "page-two"]
}
Only pages listed in the pages array appear in the sidebar.
Scripts
| Command | Description |
|---|---|
bun dev |
Start dev server on port 3333 (Turbopack) |
bun run build |
Production build |
bun start |
Start production server on port 3333 |
bun run lint |
Run ESLint |
bun run prettier |
Format code with Prettier |
bun run analyze |
Analyze production bundle size |
License
Languages
MDX
83.8%
TypeScript
14.9%
CSS
0.6%
JavaScript
0.6%
Shell
0.1%