Dev Workflow

Overview

AFFiNE repo includes web client, electron client, node server, plugin, and component. The different situation has different developing ways, and even more, some features, like cloud and login, need to mix more than one local development.

Prerequisites

Prepare Code

For AFFiNE team members, just clone code from the repository directly.

For others, fork the repository and clone to the local:

  • Using GitHub Desktop:

  • Using the command line:

    • Fork the repo so that you can make your changes without affecting the original project until you’re ready to merge them.

Develop in Local

For different purposes and features, we the following guides:

Web Dev Guide

Node Dev Guide

Electron Dev Guide

Component Dev Guide

Plugin Dev Guide

Integrate Codes

After development in local, you should do following steps to commit and merge codes:

  1. Read Testing Guide to make sure testing passing in CI. Running related tests around features you changes in local is the best way to ensure CI testing.

  2. Read Style Guide to make sure code changes meeting the style requirements. We will run prettier and eslint with staged changes before commit, and run prettier, eslint and commitlint with all codes.

  3. Read Commit Guide to know the PR merging process. We ask for using graphite to create PR in AFFiNE team. And for community contributors, fork repo and create PR is the way to create PR.

After Merge

After the codes are merged, we will release a hotfix version immediately if it is fatally fixed. Or, the next iteration version will contain those codes. You can keep eye on user release, more detail read Release Guide.