microsoft/FluidFramework
TypeScript
Captured source
source ↗microsoft/FluidFramework
Description: Library for building distributed, real-time collaborative web applications
Language: TypeScript
License: MIT
Stars: 4927
Forks: 578
Open issues: 192
Created: 2019-08-22T17:37:57Z
Pushed: 2026-06-10T23:46:09Z
Default branch: main
Fork: no
Archived: no
README:
Fluid
The Fluid Framework is a library for building distributed, real-time collaborative web applications using JavaScript or TypeScript.
Getting started using the Fluid Framework
You may be here because you want to...
- Learn more about the Fluid Framework
- Build a Fluid object
Documentation and guides can be found at .
Hello World repo can be found at .
Core Examples repo can be found at .
Have questions? Engage with other Fluid Framework users and developers in the Discussions section of our GitHub repo.
Using Fluid Framework libraries
When taking a dependency on a Fluid Framework library's public APIs, we recommend using a ^ (caret) version range, such as ^1.3.4. While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries, library consumers should always prefer ^.
If using any of Fluid Framework's unstable APIs (for example, its beta APIs), we recommend using a more constrained version range, such as ~.
Code structure
The core code for both the Fluid client packages _and_ the reference ordering service is contained within this repo.
The repo structure is somewhat unique because it contains several pnpm workspaces: some for individual packages and some for larger collections which we call "release groups". The workspaces are versioned separately from one another, but internally all packages in a workspaces are versioned together.
These workspaces do not align with package namespaces, and also don't always correspond to a single directory of this repo.
Here's the list of release group workspaces:
- client (previously known as "Fluid Framework Client" or "core") (Rooted in [./](./). Configured by [./pnpm-workspace.yaml](./pnpm-workspace.yaml))
- [./packages](./packages) (Published in the
@fluidframework/namespace, but some in@fluid-toolsand unpublished packages in@fluid-internal/) - [./experimental](./experimental) (Published in the
@fluid-experimental/namespace) - [./examples](./examples) (Not published, live in the
@fluid-example/namespace) - [./azure](./azure). (Published in the
@fluidframework/namespace) - routerlicious (Reference Fluid Ordering Service) (Rooted in [./server/routerlicious](./server/routerlicious). Configured by [./server/routerlicious/pnpm-workspace.yaml](server/routerlicious/pnpm-workspace.yaml))
- [Packages](./server/routerlicious/packages) (Published in the
@fluidframework/namespace) - gitrest (Rooted in [./server/gitrest](./server/gitrest). Configured by [./server/gitrest/pnpm-workspace.yaml](./server/gitrest/pnpm-workspace.yaml))
- [Packages](./server/gitrest/packages) (Published in the
@fluidframework/namespace) - historian (Rooted in [./server/historian](./server/historian). Configured by [./server/historian/pnpm-workspace.yaml](./server/historian/pnpm-workspace.yaml))
- [Packages](./server/historian/packages) (Published in the
@fluidframework/namespace) - build-tools (Rooted in [./build-tools](./build-tools). Configured by [./build-tools/pnpm-workspace.yaml](./build-tools/pnpm-workspace.yaml))
- [Packages](./build-tools/packages) (Published in a mix of
@fluidframework/and@fluid-tools/namespaces)
Here's a list of other sets of other packages (each package within these groups is versioned independently, forming its own release group):
- "Common" Packages: miscellaneous packages in the [./common](./common) directory and published under the
@fluidframework/namespace. Most of these (but not all) have "common" in their package name.
Packages which are used by multiple other groups of packages (such as built tools, linter configs and protocol definitions) live here.
- "Tools" Packages: miscellaneous packages in the [./tools](./tools) directory and published under a variety of namespaces.
Logically about the same as "Common", but most of the names include "tools" instead of "common".
- Auxiliary Microservice Packages (supporting Routerlicious)
- [./server](./server) excluding routerlicious, gitrest and historian (Published in the
@fluidframework/namespace) - [./docs](./docs): The code and content for .
Dependencies between packages in various layers of the system are enforced via a build step called [layer-check](./build-tools/packages/build-tools/src/layerCheck). You can view the full list of packages and layers in [PACKAGES.md](./PACKAGES.md).
- Note: to update the contents of
PACKAGES.mdfor local package changes, runpnpm layer-check --md ..
Setup and Building
Install the required tools:
See [NodeJs Installation](#NodeJs-Installation) for details.
Clone a copy of the repo and change to the repo root directory:
git clone https://github.com/microsoft/FluidFramework.git cd FluidFramework
Enable NodeJs's corepack:
corepack enable
Run the following to build the client packages:
pnpm install npm run build
You can use the worker mode to get faster build time as well: npm run build:fast
See also: [Contributing](#Contributing)
Build in VSCode
To build Fluid Framework within VSCode, open the Fluid Framework repo folder as a work space and use Ctrl-Shift-B to activate the build task. It is the same as running npm run build on the command line.
NodeJs Installation
We recommend using nvm (for Windows or MacOS/Linux) or fnm to install Node.js. This ensures you stay at the correct version while allowing other uses of NodeJS to use the (possibly different) versions they need side-by-side.
Because of a transitive dependency on a native addon module, you'll also need to ensure that you have the prerequisites for node-gyp. Depending on your operating system, you'll have slightly different installation requirements (these are…
Excerpt shown — open the source for the full document.