Library for building distributed, real-time collaborative web applications
Перейти к файлу
Sasha Simic ab2952754c
Main branch bumped to 1.1.0 (#10565)
* Policy check.

* [bump] package version to 1.1.0 for development after client release

            @fluidframework/build-common:     0.24.0 (unchanged)
     @fluidframework/eslint-config-fluid:  0.29.1000 (unchanged)
      @fluidframework/common-definitions:  0.21.1000 (unchanged)
            @fluidframework/common-utils:  0.33.1000 (unchanged)
    @fluidframework/protocol-definitions: 0.1029.1000 (unchanged)
                                   Azure:  0.60.1000 (unchanged)
                                  Server: 0.1037.1000 (unchanged)
                                  Client:      1.0.0 -> 1.1.0
                  @fluid-tools/benchmark:     0.41.0 (unchanged)
                             tinylicious:      0.4.0 (unchanged)
     @fluidframework/azure-local-service:      0.1.0 (unchanged)

* lint fixes.
2022-06-06 18:32:49 -07:00
.devcontainer Integrate upto e53dca81fe (#10425) 2022-05-25 11:26:36 -07:00
.github Integrate upto e53dca81fe (#10425) 2022-05-25 11:26:36 -07:00
.md-magic-templates Docs system: Introduce new mechanisms to update and manage docs (#6819) 2021-07-23 17:18:25 -07:00
.vscode Integrate upto e53dca81fe (#10425) 2022-05-25 11:26:36 -07:00
api-report Support disconnect/reconnect with Quorum DDS (#10449) 2022-06-06 10:16:24 -07:00
azure Preparing for 1.1.0 bump on main (#10556) 2022-06-06 09:15:43 -07:00
common Merge branch 'next' into next-main-1.0 2022-06-03 23:27:11 -07:00
docs Merge remote-tracking branch 'upstream/main' into integrate/next 2022-05-30 12:45:43 -07:00
examples Main branch bumped to 1.1.0 (#10565) 2022-06-06 18:32:49 -07:00
experimental Main branch bumped to 1.1.0 (#10565) 2022-06-06 18:32:49 -07:00
packages Main branch bumped to 1.1.0 (#10565) 2022-06-06 18:32:49 -07:00
server Preparing for 1.1.0 bump on main (#10556) 2022-06-06 09:15:43 -07:00
tools Merge branch 'next' into next-main-1.0 2022-06-03 23:27:11 -07:00
.dockerignore Delete auspkn and verdaccio references (#6011) 2021-05-03 14:04:56 -07:00
.editorconfig Use typescript-formatter for code style formatting (#2393) 2020-06-06 18:29:42 -07:00
.gitattributes Recommend editorconfig and eslint plugins (#2288) 2020-05-26 12:04:11 -07:00
.gitignore Type Validation: Support Multiple Versions with Breaking Changes (#7799) 2021-10-11 13:52:13 -07:00
.gitmodules Update submodule branch to main (#3263) 2020-08-20 09:09:08 -07:00
.markdownlint.json Docs reorganization: first pass (#2284) 2020-06-09 11:50:48 -07:00
.npmpackagejsonlintrc.json Replace repository field in package.json with an object (#9410) 2022-03-09 15:52:04 -08:00
.nvmrc Upgrade repo to node 14 (#8360) 2021-12-15 15:55:43 -08:00
BREAKING.md Merge branch 'next' into next-main-1.0 2022-06-03 23:27:11 -07:00
CODE_OF_CONDUCT.md Add security and code of conduct (#3463) 2019-09-06 16:52:25 -07:00
CONTRIBUTING.md Add link to wiki from CONTRIBUTING.md (#2629) 2020-06-19 19:19:57 -07:00
LICENSE Policy-Check: Pick up and apply ^0.2.22453 (#5868) 2021-04-20 14:00:26 -07:00
NOTICE.md Mocha Benchmark Runner (#6183) 2021-06-10 14:51:49 -07:00
PACKAGES.md Integrate upto d0253a3761 (#10348) 2022-05-19 17:55:20 -07:00
README.md docs: Update repository README (#10360) 2022-05-23 16:04:53 -07:00
SECURITY.md Add security and code of conduct (#3463) 2019-09-06 16:52:25 -07:00
UPCOMING.md Improve documentation of telemetry tags (#6830) 2021-07-21 14:19:37 -07:00
lerna-package-lock.json Preparing for 1.1.0 bump on main (#10556) 2022-06-06 09:15:43 -07:00
lerna.json Main branch bumped to 1.1.0 (#10565) 2022-06-06 18:32:49 -07:00
package-lock.json Move container-definitions, core-interfaces, and driver-definitions into client release group (#10534) 2022-06-03 15:36:37 -07:00
package.json Merge branch 'next' into next-main-1.0 2022-06-03 23:27:11 -07:00
tsfmt.json Use typescript-formatter for code style formatting (#2393) 2020-06-06 18:29:42 -07:00

README.md

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 https://fluidframework.com/.

Hello World repo can be found at https://github.com/microsoft/FluidHelloWorld.

Core Examples repo can be found at https://github.com/microsoft/FluidExamples.

Have questions? Engage with other Fluid Framework users and developers in the [Discussions] section of our GitHub repo.

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 two monorepos as well as several standalone packages. The monorepos are managed using Lerna and are versioned separately from one another, but internally all packages in a monorepo are versioned together. Outside the monorepos there are plenty of packages which are versioned independently.

Here's the breakdown of the repo:

Dependencies between packages in various layers of the system are enforced via a build step called layer-check. You can view the full list of packages and layers in docs/PACKAGES.md.

Building

In order to build the Fluid Framework, ensure that you have installed Git and the version of Node.js noted in the .nvmrc file.

Note: we recommend using nvm (for Windows or MacOS/Linux) or fnm to install Node.js, in case you find yourself needing to install different versions of Node.js side-by-side.

Clone a copy of the repo and change to the repo root directory:

git clone https://github.com/microsoft/FluidFramework.git
cd FluidFramework

Run the following to build the client packages:

npm install
npm run build:fast

See also: Contributing

Other Build Requirements

  • Building server/Routerlicious
    • Refer to that package's README for additional requirements.
    • Note that these requirements do not affect all workflows (e.g. the one noted above), but will affect workflows that include the packages under server (e.g. fluid-build --symlink:full).

On Windows

  • Ensure that you have enabled running Powershell scripts by setting your environment's Execution Policy.

Testing

You can run all of our tests from the root of the repo, or you can run a scoped set of tests by running the test command from the package you're interested in.

Note: Some of the tests depend on test collateral that lives in a submodule here: https://github.com/microsoft/FluidFrameworkTestData. You may choose to fetch that collateral into your local repository, which is required to run all the tests - otherwise some will be skipped.

First install Git LFS from https://git-lfs.github.com/. Then, from the repo root:

git lfs install
git submodule init
git submodule update

Run the tests

npm run test

Include code coverage

npm run test:coverage

Mimic the official CI build

Our CI pipelines run on Linux machines, and the npm scripts all have the ci prefix. To replicate the test steps from the CI pipeline locally, run the following commands for the packages or Lerna monorepos:

Run Non-Windows Windows
PR npm run ci:test npm run test:report && npm run test:copyresults
Official npm run ci:test:coverage npm run test:coverage && npm run test:copyresults

Run tests from within VS Code

We've checked in VS Code configuration enabling F5 from a spec.ts file to run those tests if you set the debug configuration to "Debug Current Test".

Run it locally

Single browser window, two panes

This will use an in-memory implementation of the Fluid server to sync between the two panes in the browser window.

  • Choose an example under /examples
  • Navigate to the example's directory, e.g. /examples/data-objects/clicker
  • npm run start
  • Browse to http://localhost:8080 to interact with two copies of the example side-by-side

Multiple browser instances on the same device

This will run the local Fluid server implementation we call "Tinylicious", so you can sync between multiple browser instances.

First, start Tinylicious by running these commands from /server/tinylicious:

npm install
npm run build
npm run start

Then:

  • Navigate to the example of your choice (same as above)
  • npm run start:tinylicious
  • Browse to http://localhost:8080, copy the full URL you're redirected to, and open in a second window to collaborate

Contributing

There are many ways to contribute to Fluid.

Detailed instructions for working in the repo can be found in the Wiki.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services. Use of these trademarks or logos must follow Microsofts Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.