First install the dependencies
yarn
You should use autoreloading when developping, using
yarn dev
and in another terminal, to launch the electron app:
yarn dev-app
and then, reload your electron app with the refresh command (CMD + R on OS X)
For our commits message, we are following conventional commits.
When doing heavy resource consuming tasks, we use NodeJS childProcess.fork method to keep the UI reactive. To do so,
we use webpack-fork-loader, which will wrap every *.fork.js or
*.fork.ts file into a ChildProcess constructor that will build a nodeJS ChildProcess element.
We added some utility classes to adapt the ChildProcess API to the formerly used WebWorkers API which can be found in
the src/util/async-worker-util.ts file.
A basic new ChildProcess would look like :
// child-process.controller.ts
import MyChildProcess from "./child-process.fork.ts";
import { createAsyncWorkerControllerClass, AsyncWorkerEvent } from "../util/async-worker-util";
import { MessageTypes } from "../util/batch-process/batch-process-util-types";
export const runMyChildProcess = () => {
// We build a "newable" entity which is easier to use if you need to spawn mutliple process
const AsyncProcess = createAsyncWorkerControllerClass(MyChildProcess);
const asyncProcess = new AsyncProcess();
asyncProcess.postMessage({ type: MessageTypes.INITIALIZE, data: "hello" });
asyncProcess.addEventListener(AsyncWorkerEvent.MESSAGE, (message) => { console.log("messageReceived", message) });
}
// child-process.fork.ts
import {
AsyncWorkerEvent,
createAsyncWorkerForChildProcess,
fakeChildProcess
} from "../util/async-worker-util";
import { MessageTypes } from "../util/batch-process/batch-process-util-types";
const asyncWorker = createAsyncWorkerForChildProcess();
asyncWorker.addEventListener(AsyncWorkerEvent.MESSAGE, ({ data, type }) => {
if (type === MessageTypes.INITIALIZE) {
asyncWorker.postMessage({ type: MessageTypes.RESULT, result: "hello" });
}
});
// This export allows typescript compiler to not throw type errors. It will not really be used
// as it will be replaced by webpack-fork-loader
export default fakeChildProcess;
If you want to contribute, you must respect our linter specs. You can run yarn lint for compliance test.
You are welcome to open pull requests to add features to the project.
We are trying to improve our test coverage, so you are welcome to test the services you are adding.
First, prepare the build in production mode
yarn prepare-prod
Then you can package the app for the right platform:
yarn win32
yarn win64
yarn mac
yarn linux
Or you can prepare the build and build for all four platforms with one command:
yarn build-prod
Once built, production binaries are found in the dist folder, each in their corresponding platform's subfolder.
$ claude mcp add archifiltre-docs \
-- python -m otcore.mcp_server <graph>