Overview
How to set up a productive LibreChat development workflow.
Docker is the preferred install path for most users, but local LibreChat development should use
npm. Running the app directly on your machine gives faster feedback, clearer debugging, and direct
access to the monorepo workspaces without rebuilding containers after each change.
Recommended Toolchain
Use this toolchain for npm-based development:
| Tool | Version |
|---|---|
| Node.js | v24.16.0 |
| npm | v11.16.0 |
| MongoDB | Atlas or Community Server |
Node 24 satisfies LibreChat's runtime needs for CommonJS interop with ESM-only packages, WebCrypto,
and the Fetch API. If your shell still reports an older Node version, run nvm use 24.16.0 from the
LibreChat repository before installing dependencies.
Work In The Right Workspace
LibreChat is a monorepo. Pick the smallest workspace that owns the behavior you are changing:
| Workspace | Use it for |
|---|---|
/packages/api | New backend TypeScript services, controllers, and shared server logic |
/api | Legacy Express server integration; keep changes thin |
/packages/data-schemas | Database models, schemas, and database-specific shared logic |
/packages/data-provider | Shared API types, endpoints, query keys, and data-service functions |
/client | React application code |
/packages/client | Shared frontend utilities |
Daily Commands
| Command | Purpose |
|---|---|
npm run smart-reinstall | Install dependencies when needed and build compiled workspaces |
npm run reinstall | Clean install after changing Node/npm versions or when dependency state is suspect |
npm run backend:dev | Start the backend with file watching |
npm run frontend:dev | Start the frontend dev server on port 3090 |
npm run build:data-provider | Rebuild shared data-provider code after API/type changes |
npm run build | Build all compiled workspaces through Turborepo |
Development Resources
Development Resources
- If you are new to repositories, forks, branches, and pull requests, start with GitHub's collaborative development guide.
- Read the Contributor Guidelines before opening a PR.
- Use Contributor Setup for the full local setup flow.
- Use Code Standards and Conventions for workspace boundaries, import order, typing, testing, and frontend rules.
How is this guide?