Skip to content

Commit f30c97b

Browse files
committed
Merge branch 'main' of github.com:PROCEED-Labs/proceed into user-task-date-variable
2 parents 9492b17 + 3d07f56 commit f30c97b

File tree

134 files changed

+6929
-5920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+6929
-5920
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
//this is the project root dir, eslint will not include parent config files
33
root: true,
4-
parser: 'babel-eslint',
4+
parser: '@babel/eslint-parser',
55
parserOptions: {
66
ecmaVersion: 8,
77
},

.github/copilot-instructions.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copilot / AI Agent Instructions for PROCEED
2+
3+
Purpose: Give an AI coding agent the minimal, actionable context to be productive in this monorepo.
4+
5+
**Big Picture:**
6+
7+
- **Management System (MS):** Next.js frontend + server code in [src/management-system-v2](src/management-system-v2). Runs at `http://localhost:3000` in dev (first, start a local Postgres instance and then run `yarn dev-ms` from the repo root).
8+
- **Process Engine (PE / Engine):** Node/TS engine code in [src/engine](src/engine). Start the engine in dev from the repo root with `yarn dev`.
9+
- **Helpers:** Reusable helpers live under [src/helper-modules](src/helper-modules).
10+
- **Deprecated/Currrently not in development**: the code under [src/capabilities](src/capabilities) and [src/config-server](src/config-server) is not currently in active development and may be outdated. The focus is on the MS v2 and the engine.
11+
12+
**Monorepo facts & tooling:**
13+
14+
- Workspaces are defined in the root [package.json](package.json). Node >= 20.11 and Yarn v1.22 are expected (see `engines` and `packageManager`).
15+
- Scripts in the root `package.json` orchestrate common workflows (start MS, start engine, db setup, builds).
16+
17+
**Key developer workflows (commands you should use):**
18+
19+
- Install: `yarn install` at the repo root.
20+
- Initialize local Postgres for MS: `yarn dev-ms-db` (this uses [src/management-system-v2/docker-compose-dev.yml](src/management-system-v2/docker-compose-dev.yml) and runs `scripts/db-helper.mts`).
21+
- Run Management System (dev): `yarn dev-ms` (root) or `cd src/management-system-v2 && yarn dev`. (Requires the local Postgres from the previous step).
22+
- Create new DB structure during schema changes: `yarn dev-ms-db-new-structure --name "<desc>"`.
23+
- Build MS for production: `yarn build-ms` (root) or `cd src/management-system-v2 && yarn build`.
24+
- Run Engine in dev: `yarn dev` (root).
25+
- Tests: `yarn test-engine`, `yarn test-e2e`, or `cd src/management-system-v2 && yarn test:unit` for MS unit tests.
26+
27+
**Project-specific conventions & patterns:**
28+
29+
- MS v2 is a Next.js app using `prisma` and server-side code; database access and schema changes rely on `scripts/db-helper.mts` and prisma commands in [src/management-system-v2/package.json](src/management-system-v2/package.json).
30+
- Many repo scripts call `cd` into subfolders; prefer using the root scripts (e.g. `yarn dev-ms`) to ensure the correct environment.
31+
- Build/test scripts may use `ts-node` or `tsx` for short TS scripts (see `predev`, `prebuild`, `postinstall`).
32+
- The engine has a `universal` and `native` part under [src/engine/universal](src/engine/universal) and [src/engine/native](src/engine/native). The `universal` part contains pure Typescript/JavaScript and most business logic. The `native` part contains platform-specific code which is not standardized in JavaScript, e.g. Node.js code for Windows, Linux and Mac under [src/engine/native/node](src/engine/native/node). The universal part uses functionality in the native part via an abstraction layer.
33+
34+
**Integration points & external dependencies:**
35+
36+
- The MS talks to Postgres (local docker compose in dev) and expects environment variables from [src/management-system-v2/.env].
37+
- The MS uses `@proceed/bpmn-helper` and `bpmn-js` for BPMN editing and rendering.
38+
- The engine exposes runtime APIs used by the MS and E2E tests located under [src/engine/e2e_tests](src/engine/e2e_tests).
39+
40+
**Files to inspect for context when changing behavior:**
41+
42+
- Repo-level scripts and workflows: [package.json](package.json)
43+
- MS-specific: [src/management-system-v2/package.json](src/management-system-v2/package.json), [src/management-system-v2/docker-compose-dev.yml](src/management-system-v2/docker-compose-dev.yml), [src/management-system-v2/scripts/db-helper.mts](src/management-system-v2/scripts/db-helper.mts)
44+
- Engine: [src/engine/native](src/engine/native) and [src/engine/universal](src/engine/universal)
45+
46+
**When you change DB schema or Prisma models:**
47+
48+
- Run `yarn dev-ms-db-new-structure --name "<desc>"` to create a new DB instance and run migrations locally.
49+
- Run `yarn dev-ms-db-generate` to regenerate Prisma client if models changed.
50+
51+
If anything here is ambiguous or you want more details (run commands, CI hooks, or where to find specific APIs), tell me what area to expand and I will iterate.

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ services:
1313
- PROCEED_PUBLIC_GANTT_ACTIVE=true
1414
- PROCEED_PUBLIC_CONFIG_SERVER_ACTIVE=false
1515
- PROCEED_PUBLIC_PROCESS_AUTOMATION_ACTIVE=true
16+
- PROCEED_PUBLIC_PROCESS_AUTOMATION_TASK_EDITOR_ACTIVE=true
17+
- PROCEED_PUBLIC_COMPETENCE_MATCHING_ACTIVE=true
1618
ports:
1719
- '3002:33081'
1820
depends_on:

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"devDependencies": {
8181
"@babel/core": "^7.5.0",
8282
"@babel/eslint-plugin": "7.19.1",
83+
"@babel/eslint-parser": "7.28.5",
8384
"@babel/plugin-proposal-class-properties": "^7.5.0",
8485
"@babel/preset-env": "^7.5.2",
8586
"@open-wc/webpack-import-meta-loader": "0.4.7",

src/management-system-v2/.eslintrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/management-system-v2/app/(auth)/signin/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import db from '@/lib/data/db';
99
const dayInMS = 1000 * 60 * 60 * 24;
1010

1111
// take in search query
12-
const SignInPage = async ({ searchParams }: { searchParams: { callbackUrl: string } }) => {
12+
const SignInPage = async (props: { searchParams: Promise<{ callbackUrl: string }> }) => {
13+
const searchParams = await props.searchParams;
1314
const { session } = await getCurrentUser();
1415
const isGuest = session?.user.isGuest;
1516

src/management-system-v2/app/(dashboard)/[environmentId]/(automation)/engines/[dbEngineId]/page.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ import SpaceLink from '@/components/space-link';
1212

1313
export type TableEngine = Engine & { id: string };
1414

15-
export default async function EnginesPage({
16-
params,
17-
searchParams,
18-
}: {
19-
params: { dbEngineId: string; environmentId: string };
20-
searchParams: { engineId: string };
15+
export default async function EnginesPage(props: {
16+
params: Promise<{ dbEngineId: string; environmentId: string }>;
17+
searchParams: Promise<{ engineId: string }>;
2118
}) {
19+
const searchParams = await props.searchParams;
20+
const params = await props.params;
2221
const msConfig = await getMSConfig();
2322
if (!msConfig.PROCEED_PUBLIC_PROCESS_AUTOMATION_ACTIVE) return notFound();
2423

src/management-system-v2/app/(dashboard)/[environmentId]/(automation)/engines/engines-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const EnginesModal = ({
2424
onCancel={() => close()}
2525
title={title}
2626
onOk={() => close({ name: values.name, address: values.address })}
27-
destroyOnClose={true}
27+
destroyOnHidden={true}
2828
{...modalProps}
2929
>
3030
<Form

src/management-system-v2/app/(dashboard)/[environmentId]/(automation)/engines/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ const getEngineStatus = async (engine: DBEngine) => {
2121
}
2222
};
2323

24-
const EnginesPage = async ({ params }: { params: { environmentId: string } }) => {
24+
const EnginesPage = async (props: { params: Promise<{ environmentId: string }> }) => {
2525
const msConfig = await getMSConfig();
2626
if (!msConfig.PROCEED_PUBLIC_PROCESS_AUTOMATION_ACTIVE) return notFound();
2727

28+
const params = await props.params;
2829
const { activeEnvironment, ability } = await getCurrentEnvironment(params.environmentId);
2930

3031
const machinesSettings = await getSpaceSettingsValues(
@@ -57,7 +58,8 @@ const EnginesPage = async ({ params }: { params: { environmentId: string } }) =>
5758
);
5859
};
5960

60-
const Page = ({ params }: any) => {
61+
const Page = async (props: any) => {
62+
const params = await props.params;
6163
return (
6264
<Content title="Engines">
6365
<Suspense fallback={<Skeleton />}>

src/management-system-v2/app/(dashboard)/[environmentId]/(automation)/executions-dashboard/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { getMSConfig } from '@/lib/ms-config/ms-config';
55
import { getSpaceSettingsValues } from '@/lib/data/db/space-settings';
66
import DashboardView from './dashboard-view';
77

8-
const Page = async ({ params }: any) => {
8+
const Page = async (props: any) => {
9+
const params = await props.params;
910
const msConfig = await getMSConfig();
1011
if (!msConfig.PROCEED_PUBLIC_PROCESS_AUTOMATION_ACTIVE) return notFound();
1112

0 commit comments

Comments
 (0)