Docs
Development

Quick Start

Prerequisites

Clone Code

Clone the AFFiNE repository by https directly to experience developing quickly. If you want to contribute code to affine, please read Contributing.

git clone https://github.com/toeverything/AFFiNE.git

After the code is cloned to local successfully, the AFFiNE directory will be created and the code is there.

Install Dependencies

Enter the code directory and execute the following install command.

cd AFFiNE
yarn install

grmtitSYmMTwqYq-2pnzRtSUoSQtNDQ4VX7ieruqbDw=

Start Dev

After yarn installation was executed successfully, the whole mono repo dependencies were installed. Then we can run the dev command to start web development.

yarn dev

When executing the dev command, the follow options should be select to start web development:

  • Distribution: browser
  • Mode: development
  • Channel: canary
  • Enable coverage: No
  • Debug blocksuite locally?: No

p9w4aIik3PhzaHatE6H3MpSQcvxoL7Z9wyS3rfvt0XI=

Debug Web

After webpack built successfully, we can open http://localhost:3010/ in the browser to debug the AFFiNE web.

mTPzJXCbdfu_vswwY24GtCgsvVasRGoWCQSWxWrBLTE=

Now you can change the code in packages/frontend/coreand the web will reload after the change is saved. For further development, such as node server or electron client, you can find more tutorials in Dev Workflow.