The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
chore: cleanup repository root structure (#17147)
Félix Malfait245bd510aeb1
diff --git a/crowdin-app.yml b/.github/crowdin-app.ymlsimilarity index 100%rename from crowdin-app.ymlrename to .github/crowdin-app.ymldiff --git a/crowdin-docs.yml b/.github/crowdin-docs.ymlsimilarity index 100%rename from crowdin-docs.ymlrename to .github/crowdin-docs.ymldiff --git a/.vale.ini b/.github/vale.inisimilarity index 100%rename from .vale.inirename to .github/vale.inidiff --git a/.github/workflows/docs-i18n-pull.yaml b/.github/workflows/docs-i18n-pull.yamlindex 919cc7bcd95..719cda6f654 100644--- a/.github/workflows/docs-i18n-pull.yaml+++ b/.github/workflows/docs-i18n-pull.yaml@@ -24,7 +24,7 @@ on:pull_request:paths:- 'packages/twenty-docs/**'- - 'crowdin-docs.yml'+ - '.github/crowdin-docs.yml'- '.github/workflows/docs-i18n-pull.yaml'concurrency:@@ -78,7 +78,7 @@ jobs:for lang in $LANGUAGES; doecho "=== Pulling translations for $lang ==="crowdin download \- --config crowdin-docs.yml \+ --config .github/crowdin-docs.yml \--token "$CROWDIN_PERSONAL_TOKEN" \--base-url "https://twenty.api.crowdin.com" \--language "$lang" \diff --git a/.github/workflows/docs-i18n-push.yaml b/.github/workflows/docs-i18n-push.yamlindex a3ccaa5b0c6..7a645338cbf 100644--- a/.github/workflows/docs-i18n-push.yaml+++ b/.github/workflows/docs-i18n-push.yaml@@ -12,7 +12,7 @@ on:- 'packages/twenty-docs/**/*.mdx'- '!packages/twenty-docs/l/**'- 'packages/twenty-docs/navigation/navigation.template.json'- - 'crowdin-docs.yml'+ - '.github/crowdin-docs.yml'concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}@@ -43,7 +43,7 @@ jobs:download_translations: falselocalization_branch_name: i18n-docsbase_url: 'https://twenty.api.crowdin.com'- config: 'crowdin-docs.yml'+ config: '.github/crowdin-docs.yml'env:# Docs translations projectCROWDIN_PROJECT_ID: '2'diff --git a/.github/workflows/i18n-pull.yaml b/.github/workflows/i18n-pull.yamlindex 0025e8ccddf..27e023af005 100644--- a/.github/workflows/i18n-pull.yaml+++ b/.github/workflows/i18n-pull.yaml@@ -89,7 +89,7 @@ jobs:create_pull_request: falseskip_ref_checkout: truedryrun_action: false- config: 'crowdin-app.yml'+ config: '.github/crowdin-app.yml'env:GITHUB_TOKEN: ${{ github.token }}# App translations projectdiff --git a/.github/workflows/i18n-push.yaml b/.github/workflows/i18n-push.yamlindex b003d7df2af..7b30d98bbe4 100644--- a/.github/workflows/i18n-push.yaml+++ b/.github/workflows/i18n-push.yaml@@ -87,7 +87,7 @@ jobs:download_translations: falselocalization_branch_name: i18nbase_url: 'https://twenty.api.crowdin.com'- config: 'crowdin-app.yml'+ config: '.github/crowdin-app.yml'env:# App translations projectCROWDIN_PROJECT_ID: '1'diff --git a/.prettierignore b/.prettierignoredeleted file mode 100644index d155fdbd59d..00000000000--- a/.prettierignore+++ /dev/null@@ -1,4 +0,0 @@-# Add files here to ignore them from prettier formatting-/dist-/coverage-/.nx/cache\ No newline at end of filediff --git a/.prettierrc b/.prettierrcdeleted file mode 100644index 6de9cff5b4c..00000000000--- a/.prettierrc+++ /dev/null@@ -1,5 +0,0 @@-{- "singleQuote": true,- "trailingComma": "all",- "endOfLine": "lf"-}diff --git a/Makefile b/Makefiledeleted file mode 100644index 830c7ab6d83..00000000000--- a/Makefile+++ /dev/null@@ -1,48 +0,0 @@-DOCKER_NETWORK=twenty_network--ensure-docker-network:- docker network inspect $(DOCKER_NETWORK) >/dev/null 2>&1 || docker network create $(DOCKER_NETWORK)--postgres-on-docker: ensure-docker-network- docker run -d --network $(DOCKER_NETWORK) \- --name twenty_pg \- -e POSTGRES_USER=postgres \- -e POSTGRES_PASSWORD=postgres \- -e ALLOW_NOSSL=true \- -v twenty_db_data:/var/lib/postgresql/data \- -p 5432:5432 \- postgres:16- @echo "Waiting for PostgreSQL to be ready..."- @until docker exec twenty_pg psql -U postgres -d postgres \- -c 'SELECT pg_is_in_recovery();' 2>/dev/null | grep -q 'f'; do \- sleep 1; \- done- docker exec twenty_pg psql -U postgres -d postgres \- -c "CREATE DATABASE \"default\" WITH OWNER postgres;" \- -c "CREATE DATABASE \"test\" WITH OWNER postgres;"--redis-on-docker: ensure-docker-network- docker run -d --network $(DOCKER_NETWORK) --name twenty_redis -p 6379:6379 redis/redis-stack-server:latest--clickhouse-on-docker: ensure-docker-network- docker run -d --network $(DOCKER_NETWORK) --name twenty_clickhouse -p 8123:8123 -p 9000:9000 -e CLICKHOUSE_PASSWORD=devPassword clickhouse/clickhouse-server:latest \--grafana-on-docker: ensure-docker-network- docker run -d --network $(DOCKER_NETWORK) \- --name twenty_grafana \- -p 4000:3000 \- -e GF_SECURITY_ADMIN_USER=admin \- -e GF_SECURITY_ADMIN_PASSWORD=admin \- -e GF_INSTALL_PLUGINS=grafana-clickhouse-datasource \- -v $(PWD)/packages/twenty-docker/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources \- grafana/grafana-oss:latest--opentelemetry-collector-on-docker: ensure-docker-network- docker run -d --network $(DOCKER_NETWORK) \- --name twenty_otlp_collector \- -p 4317:4317 \- -p 4318:4318 \- -p 13133:13133 \- -v $(PWD)/packages/twenty-docker/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml \- otel/opentelemetry-collector-contrib:latest \- --config /etc/otel-collector-config.yaml\ No newline at end of filediff --git a/jest.config.mjs b/jest.config.mjsdeleted file mode 100644index d0dbd1b889d..00000000000--- a/jest.config.mjs+++ /dev/null@@ -1,5 +0,0 @@-import { getJestProjects } from '@nx/jest';--export default {- projects: getJestProjects(),-};diff --git a/jest.preset.js b/jest.preset.jsindex f078ddcec1e..05984a2d534 100644--- a/jest.preset.js+++ b/jest.preset.js@@ -1,3 +1,4 @@const nxPreset = require('@nx/jest/preset').default;module.exports = { ...nxPreset };+diff --git a/nx b/nxdeleted file mode 100755index e94326e36a5..00000000000--- a/nx+++ /dev/null@@ -1,5 +0,0 @@-#!/bin/bash-command -v node >/dev/null 2>&1 || { echo >&2 "Nx requires NodeJS to be available. To install NodeJS and NPM, see: https://nodejs.org/en/download/ ."; exit 1; }-command -v npm >/dev/null 2>&1 || { echo >&2 "Nx requires npm to be available. To install NodeJS and NPM, see: https://nodejs.org/en/download/ ."; exit 1; }-path_to_root=$(dirname $BASH_SOURCE)-node $path_to_root/.nx/nxw.js $@\ No newline at end of filediff --git a/package.json b/package.jsonindex 2cf7e36daab..57883c8fc24 100644--- a/package.json+++ b/package.json@@ -222,5 +222,10 @@"packages/create-twenty-app","tools/eslint-rules"]+ },+ "prettier": {+ "singleQuote": true,+ "trailingComma": "all",+ "endOfLine": "lf"}}diff --git a/packages/twenty-apps/community/linkedin-browser-extension/browser-extension/eslint.config.mjs b/packages/twenty-apps/community/linkedin-browser-extension/browser-extension/eslint.config.mjsindex 42621cdcab6..f7f5688c3aa 100755--- a/packages/twenty-apps/community/linkedin-browser-extension/browser-extension/eslint.config.mjs+++ b/packages/twenty-apps/community/linkedin-browser-extension/browser-extension/eslint.config.mjs@@ -1,7 +1,7 @@import typescriptParser from '@typescript-eslint/parser';import path from 'path';import { fileURLToPath } from 'url';-import reactConfig from '../../eslint.config.react.mjs';+import reactConfig from '../../../../../tools/eslint-rules/eslint.config.react.mjs';const __filename = fileURLToPath(import.meta.url);const __dirname = path.dirname(__filename);diff --git a/packages/twenty-docker/Makefile b/packages/twenty-docker/Makefileindex bdda023dd5f..fbcbcf53022 100644--- a/packages/twenty-docker/Makefile+++ b/packages/twenty-docker/Makefile@@ -1,15 +1,21 @@-# Makefile for building Twenty CRM docker images.+# Makefile for building and running Twenty CRM docker containers.# Set the tag and/or target build platform using make command-line variables assignments.## Optional make variables:# PLATFORM - defaults to 'linux/amd64'# TAG - defaults to 'latest'#-# Example: make-# Example: make PLATFORM=linux/aarch64 TAG=my-tag+# Example: make prod-build+# Example: make PLATFORM=linux/aarch64 TAG=my-tag prod-build+# Example: make postgres-on-docker (for local development)PLATFORM ?= linux/amd64TAG ?= latest+DOCKER_NETWORK=twenty_network++# =============================================================================+# Production Image Building+# =============================================================================prod-build:@cd ../.. && docker build -f ./packages/twenty-docker/twenty/Dockerfile --platform $(PLATFORM) --tag twenty:$(TAG) . && cd -@@ -25,3 +31,55 @@ prod-website-build:prod-website-run:@docker run -d -p 3000:3000 --name twenty-website twenty-website:$(TAG)++# =============================================================================+# Local Development Services+# Run these from the repository root: make -C packages/twenty-docker <target>+# =============================================================================++ensure-docker-network:+ docker network inspect $(DOCKER_NETWORK) >/dev/null 2>&1 || docker network create $(DOCKER_NETWORK)++postgres-on-docker: ensure-docker-network+ docker run -d --network $(DOCKER_NETWORK) \+ --name twenty_pg \+ -e POSTGRES_USER=postgres \+ -e POSTGRES_PASSWORD=postgres \+ -e ALLOW_NOSSL=true \+ -v twenty_db_data:/var/lib/postgresql/data \+ -p 5432:5432 \+ postgres:16+ @echo "Waiting for PostgreSQL to be ready..."+ @until docker exec twenty_pg psql -U postgres -d postgres \+ -c 'SELECT pg_is_in_recovery();' 2>/dev/null | grep -q 'f'; do \+ sleep 1; \+ done+ docker exec twenty_pg psql -U postgres -d postgres \+ -c "CREATE DATABASE \"default\" WITH OWNER postgres;" \+ -c "CREATE DATABASE \"test\" WITH OWNER postgres;"++redis-on-docker: ensure-docker-network+ docker run -d --network $(DOCKER_NETWORK) --name twenty_redis -p 6379:6379 redis/redis-stack-server:latest++clickhouse-on-docker: ensure-docker-network+ docker run -d --network $(DOCKER_NETWORK) --name twenty_clickhouse -p 8123:8123 -p 9000:9000 -e CLICKHOUSE_PASSWORD=devPassword clickhouse/clickhouse-server:latest \++grafana-on-docker: ensure-docker-network+ docker run -d --network $(DOCKER_NETWORK) \+ --name twenty_grafana \+ -p 4000:3000 \+ -e GF_SECURITY_ADMIN_USER=admin \+ -e GF_SECURITY_ADMIN_PASSWORD=admin \+ -e GF_INSTALL_PLUGINS=grafana-clickhouse-datasource \+ -v $(PWD)/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources \+ grafana/grafana-oss:latest++opentelemetry-collector-on-docker: ensure-docker-network+ docker run -d --network $(DOCKER_NETWORK) \+ --name twenty_otlp_collector \+ -p 4317:4317 \+ -p 4318:4318 \+ -p 13133:13133 \+ -v $(PWD)/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml \+ otel/opentelemetry-collector-contrib:latest \+ --config /etc/otel-collector-config.yamldiff --git a/packages/twenty-docker/twenty-website/Dockerfile b/packages/twenty-docker/twenty-website/Dockerfileindex 2ff7cb808b7..3f9c69a413b 100644--- a/packages/twenty-docker/twenty-website/Dockerfile+++ b/packages/twenty-docker/twenty-website/Dockerfile@@ -40,4 +40,4 @@ RUN chown -R 1000 /app# Use non root user with uid 1000USER 1000-CMD ["/bin/sh", "-c", "npx nx start"]\ No newline at end of file+CMD ["/bin/sh", "-c", "npx nx start"]diff --git a/packages/twenty-docker/twenty/Dockerfile b/packages/twenty-docker/twenty/Dockerfileindex 84dae1ae4dc..2a913cc2c6f 100644--- a/packages/twenty-docker/twenty/Dockerfile+++ b/packages/twenty-docker/twenty/Dockerfile@@ -8,7 +8,6 @@ COPY ./package.json ./yarn.lock ./.yarnrc.yml ./tsconfig.base.json ./nx.json /apCOPY ./.yarn/releases /app/.yarn/releasesCOPY ./.yarn/patches /app/.yarn/patches-COPY ./.prettierrc /app/COPY ./packages/twenty-emails/package.json /app/packages/twenty-emails/COPY ./packages/twenty-server/package.json /app/packages/twenty-server/COPY ./packages/twenty-server/patches /app/packages/twenty-server/patchesdiff --git a/packages/twenty-docs/developers/contribute/capabilities/local-setup.mdx b/packages/twenty-docs/developers/contribute/capabilities/local-setup.mdxindex 54be4aef330..3ca4c3fe4b1 100644--- a/packages/twenty-docs/developers/contribute/capabilities/local-setup.mdx+++ b/packages/twenty-docs/developers/contribute/capabilities/local-setup.mdx@@ -112,7 +112,7 @@ You should run all commands in the following steps from the root of the project.**Option 2:** If you have docker installed:```bash- make postgres-on-docker+ make -C packages/twenty-docker postgres-on-docker```</Tab><Tab title="Mac OS">@@ -162,7 +162,7 @@ You should run all commands in the following steps from the root of the project.**Option 2:** If you have docker installed:```bash- make postgres-on-docker+ make -C packages/twenty-docker postgres-on-docker```</Tab><Tab title="Windows (WSL)">@@ -179,7 +179,7 @@ You should run all commands in the following steps from the root of the project.Running Docker on WSL adds an extra layer of complexity.Only use this option if you are comfortable with the extra steps involved, including turning on [Docker Desktop WSL2](https://docs.docker.com/desktop/wsl).```bash- make postgres-on-docker+ make -C packages/twenty-docker postgres-on-docker```</Tab></Tabs>@@ -196,7 +196,7 @@ Twenty requires a redis cache to provide the best performance**Option 2:** If you have docker installed:```bash- make redis-on-docker+ make -C packages/twenty-docker redis-on-docker```</Tab><Tab title="Mac OS">@@ -209,7 +209,7 @@ Twenty requires a redis cache to provide the best performance**Option 2:** If you have docker installed:```bash- make redis-on-docker+ make -C packages/twenty-docker redis-on-docker```</Tab><Tab title="Windows (WSL)">@@ -218,7 +218,7 @@ Twenty requires a redis cache to provide the best performance**Option 2:** If you have docker installed:```bash- make redis-on-docker+ make -C packages/twenty-docker redis-on-docker```</Tab></Tabs>diff --git a/packages/twenty-emails/eslint.config.mjs b/packages/twenty-emails/eslint.config.mjsindex 33e13bd330b..cfb3c390448 100644--- a/packages/twenty-emails/eslint.config.mjs+++ b/packages/twenty-emails/eslint.config.mjs@@ -1,7 +1,7 @@import typescriptParser from '@typescript-eslint/parser';import path from 'path';import { fileURLToPath } from 'url';-import reactConfig from '../../eslint.config.react.mjs';+import reactConfig from '../../tools/eslint-rules/eslint.config.react.mjs';const __filename = fileURLToPath(import.meta.url);const __dirname = path.dirname(__filename);diff --git a/packages/twenty-front/eslint.config.mjs b/packages/twenty-front/eslint.config.mjsindex 25acb896bee..81f1cd36a77 100644--- a/packages/twenty-front/eslint.config.mjs+++ b/packages/twenty-front/eslint.config.mjs@@ -1,7 +1,7 @@import typescriptParser from '@typescript-eslint/parser';import path from 'path';import { fileURLToPath } from 'url';-import reactConfig from '../../eslint.config.react.mjs';+import reactConfig from '../../tools/eslint-rules/eslint.config.react.mjs';const __filename = fileURLToPath(import.meta.url);const __dirname = path.dirname(__filename);diff --git a/packages/twenty-ui/eslint.config.mjs b/packages/twenty-ui/eslint.config.mjsindex de2b7ce81cb..564a3ae1ecd 100644--- a/packages/twenty-ui/eslint.config.mjs+++ b/packages/twenty-ui/eslint.config.mjs@@ -1,7 +1,7 @@import typescriptParser from '@typescript-eslint/parser';import path from 'path';import { fileURLToPath } from 'url';-import reactConfig from '../../eslint.config.react.mjs';+import reactConfig from '../../tools/eslint-rules/eslint.config.react.mjs';const __filename = fileURLToPath(import.meta.url);const __dirname = path.dirname(__filename);diff --git a/render.yaml b/render.yamldeleted file mode 100644index b7850996ffc..00000000000--- a/render.yaml+++ /dev/null@@ -1,83 +0,0 @@-services:-- type: web- name: server- runtime: image- image:- url: twentycrm/twenty:latest- dockerCommand: "sh -c ./scripts/render-run.sh"- autoDeploy: false- plan: standard- envVars:- - key: FRONT_BASE_URL- fromService:- name: server- type: web- envVarKey: RENDER_EXTERNAL_URL- - key: SERVER_URL- fromService:- name: server- type: web- envVarKey: RENDER_EXTERNAL_URL- - key: APP_SECRET- generateValue: true- - key: PG_DATABASE_HOST- fromService:- name: twenty_postgres- type: pserv- property: host- - key: PG_DATABASE_PORT- fromService:- name: twenty_postgres- type: pserv- property: port-- type: worker- name: worker- runtime: image- image:- url: twentycrm/twenty:latest- dockerCommand: "sh -c ./scripts/render-worker.sh"- autoDeploy: false- plan: standard- envVars:- - key: FRONT_BASE_URL- fromService:- name: server- type: web- envVarKey: RENDER_EXTERNAL_URL- - key: SERVER_URL- fromService:- name: server- type: web- envVarKey: RENDER_EXTERNAL_URL- - key: APP_SECRET- generateValue: true- - key: PG_DATABASE_HOST- fromService:- name: twenty_postgres- type: pserv- property: host- - key: PG_DATABASE_PORT- fromService:- name: twenty_postgres- type: pserv- property: port- disk:- name: twenty-disk- mountPath: /.local-storage- sizeGB: 5-- type: pserv- name: twenty_postgres- plan: starter- runtime: image- image:- url: twentycrm/twenty-postgres:latest- autoDeploy: false- disk:- name: data- mountPath: /var/lib/postgresql/data- sizeGB: 10- envVars:- - key: POSTGRES_USER- value: postgres- - key: POSTGRES_PASSWORD- value: postgresdiff --git a/eslint.config.react.mjs b/tools/eslint-rules/eslint.config.react.mjssimilarity index 100%rename from eslint.config.react.mjsrename to tools/eslint-rules/eslint.config.react.mjsdiff --git a/tools/eslint-rules/jest.config.mjs b/tools/eslint-rules/jest.config.mjsindex 58d5fe708db..83ef39037d8 100644--- a/tools/eslint-rules/jest.config.mjs+++ b/tools/eslint-rules/jest.config.mjs@@ -1,4 +1,4 @@-+export default {displayName: 'eslint-rules',silent: false,