MCPcopy Index your code
hub / github.com/SocialGouv/archifiltre-docs

github.com/SocialGouv/archifiltre-docs @v13.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v13.1 ↗ · + Follow
663 symbols 1,465 edges 194 files 2 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Archifiltre

Contributing

Launching the app

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)

Writing code

  • Use JSDoc comments to document new functions.
  • Try to keep you methods simple using meaningful function names and variable names.

Comitting

For our commits message, we are following conventional commits.

Code state

  • We are migrating our data store from our custom framework to redux to make the code easier to apprehend by contributors.
  • We are reworking components to isolate business logic into redux operations. This will allow cleaner code structure to make the app more maintainable.
  • We are trying to change our components to functional components using hooks instead of class components.
  • We are migrating our code to typescript to make it easier to maintain.

Resource consuming tasks

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;

CI

Pull requests

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.

Building/releasing the app.

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.

Extension points exported contracts — how you extend this code

StoreState (Interface)
(no doc)
src/reducers/store.ts
DashboardContainerProps (Interface)
(no doc)
src/components/dashboard-container.tsx
ResipExportInitData (Interface)
(no doc)
src/exporters/resip/resipExportTypes.ts
FlattenLineOptions (Interface)
(no doc)
src/util/csv-util.ts
TestState (Interface)
(no doc)
src/reducers/enhancers/undoable/undoable-selectors.test.ts
WorkspaceContainerProps (Interface)
(no doc)
src/components/workspace-container.tsx
ResipExportProgress (Interface)
(no doc)
src/exporters/resip/resipExport.controller.ts
AsyncWorker (Interface)
(no doc)
src/util/async-worker-util.ts

Core symbols most depended-on inside this repo

makeObj
called by 43
src/exporters/mets/mets.js
createFilesAndFolders
called by 38
src/reducers/files-and-folders/files-and-folders-test-utils.ts
hook
called by 13
src/util/hook-utils.js
equal
called by 10
src/reducers/real-estate.js
wrapStoreWithUndoable
called by 10
src/reducers/store-test-utils.ts
tagsReducer
called by 10
src/reducers/tags/tags-reducer.ts
reducer
called by 9
src/datastore/files-and-folders.js
leftPadInt
called by 8
src/csv.js

Shape

Function 467
Method 102
Class 46
Interface 45
Enum 3

Languages

TypeScript100%

Modules by API surface

src/components/icicle/icicle-main.js28 symbols
src/exporters/mets/mets.js22 symbols
src/reducers/icicle-state.js18 symbols
src/datastore/files-and-folders.js18 symbols
src/exporters/resip/resipExporter.js15 symbols
src/reducers/tags/tags-selectors.ts14 symbols
src/reducers/real-estate.js14 symbols
src/reducers/files-and-folders/files-and-folders-selectors.ts14 symbols
src/reducers/database.js14 symbols
src/datastore/tags.js14 symbols
src/util/color-util.js13 symbols
src/components/window-resize.js13 symbols

For agents

$ claude mcp add archifiltre-docs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page