diff --git a/.dockerignore b/.dockerignore index 7f595488e..c328aed4f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,8 +2,6 @@ # # SPDX-License-Identifier: CC0-1.0 -dist - # Yarn 2 without zero-installs .yarn/* !.yarn/patches @@ -11,4 +9,3 @@ dist !.yarn/plugins !.yarn/sdks !.yarn/versions -.pnp.* diff --git a/.github/workflows/docker.yml b/.github/workflows/backend-docker.yml similarity index 88% rename from .github/workflows/docker.yml rename to .github/workflows/backend-docker.yml index 6fbe52398..8b270076c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/backend-docker.yml @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: AGPL-3.0-only -name: Docker +name: Backend / Docker on: push: @@ -14,6 +14,8 @@ jobs: build-dev: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -28,15 +30,16 @@ jobs: uses: docker/build-push-action@v3 with: push: true - file: docker/Dockerfile + file: backend/docker/Dockerfile tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-ci:${{ github.sha }} target: development cache-from: type=gha cache-to: type=gha,mode=max + context: . sqlite-test: runs-on: ubuntu-latest - needs: [build-dev] + needs: [ build-dev ] container: image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-ci:${{ github.sha }} steps: @@ -44,7 +47,7 @@ jobs: sqlite-e2e: runs-on: ubuntu-latest - needs: [build-dev] + needs: [ build-dev ] container: image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-ci:${{ github.sha }} steps: @@ -52,8 +55,10 @@ jobs: build-prod: runs-on: ubuntu-latest - needs: [sqlite-test, sqlite-e2e] + needs: [ sqlite-test, sqlite-e2e ] steps: + - uses: actions/checkout@v3 + - name: Generate Docker metadata id: meta uses: docker/metadata-action@v4 @@ -83,8 +88,9 @@ jobs: uses: docker/build-push-action@v3 with: push: ${{ github.event_name != 'pull_request' }} - file: docker/Dockerfile + file: backend/docker/Dockerfile tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + context: . diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/backend-e2e-tests.yml similarity index 89% rename from .github/workflows/e2e-tests.yml rename to .github/workflows/backend-e2e-tests.yml index 6a6ab6987..e1c344fbd 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/backend-e2e-tests.yml @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: AGPL-3.0-only -name: E2E Tests +name: Backend / E2E Tests on: push: @@ -13,6 +13,9 @@ on: env: NODEJS_VERSION: 18 +defaults: + run: + working-directory: backend jobs: sqlite: # This run also collects coverage @@ -24,13 +27,14 @@ jobs: - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3 with: + cache-dependency-path: backend/yarn.lock node-version: ${{ env.NODEJS_VERSION }} cache: 'yarn' - run: yarn install --immutable - run: yarn run test:e2e:cov - uses: codecov/codecov-action@v3 with: - directory: coverage-e2e + directory: backend/coverage-e2e flags: e2e-tests mariadb: @@ -53,6 +57,7 @@ jobs: - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3 with: + cache-dependency-path: backend/yarn.lock node-version: ${{ env.NODEJS_VERSION }} cache: 'yarn' - run: yarn install --immutable @@ -78,6 +83,7 @@ jobs: - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3 with: + cache-dependency-path: backend/yarn.lock node-version: ${{ env.NODEJS_VERSION }} cache: 'yarn' - run: yarn install --immutable diff --git a/.github/workflows/nest.js.yml b/.github/workflows/backend-tests.yml similarity index 82% rename from .github/workflows/nest.js.yml rename to .github/workflows/backend-tests.yml index a88f42417..1c057c2c4 100644 --- a/.github/workflows/nest.js.yml +++ b/.github/workflows/backend-tests.yml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only -name: Nest.JS CI +name: Backend / Lint and Test on: push: @@ -14,23 +14,23 @@ on: env: NODEJS_VERSION: 18 +defaults: + run: + working-directory: backend + jobs: lint: runs-on: ubuntu-latest - strategy: - matrix: - command: - - yarn run lint - - yarn run format steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3 with: + cache-dependency-path: backend/yarn.lock node-version: ${{ env.NODEJS_VERSION }} cache: 'yarn' - run: yarn install --immutable - - run: ${{matrix.command}} + - run: yarn run lint build: runs-on: ubuntu-latest strategy: @@ -41,6 +41,7 @@ jobs: - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: + cache-dependency-path: backend/yarn.lock node-version: ${{ matrix.node-version }} cache: 'yarn' - run: yarn install --immutable @@ -55,11 +56,12 @@ jobs: - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3 with: + cache-dependency-path: backend/yarn.lock node-version: ${{ env.NODEJS_VERSION }} cache: 'yarn' - run: yarn install --immutable - run: yarn run test:cov - uses: codecov/codecov-action@v3 with: - directory: coverage + directory: backend/coverage flags: integration-tests diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 3dbac5fbf..93f5be626 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -6,9 +6,9 @@ name: REUSE Compliance Check on: push: - branches: [develop] + branches: [ develop ] pull_request: - branches: [develop] + branches: [ develop ] jobs: reuse: diff --git a/.gitignore b/.gitignore index f6848d765..5e460fbe6 100644 --- a/.gitignore +++ b/.gitignore @@ -21,32 +21,8 @@ backups/ *.log *.sqlite -# ignore config files -config.json -.sequelizerc -.env - -# ignore webpack build -public/build -public/views/build - -# ignore TypeScript built -built/ -dist - -# Tests -/coverage -/coverage-e2e -/.nyc_output - -public/uploads/* -!public/uploads/.gitkeep -!public/.gitkeep -uploads -test_uploads - # Yarn 2 without zero-installs -.yarn/* +.yarn !.yarn/patches !.yarn/releases !.yarn/plugins diff --git a/.reuse/dep5 b/.reuse/dep5 index 229dce4d6..390db8d92 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -63,6 +63,6 @@ Files: docs/content/theme/styles/Roboto/* Copyright: 2011 Christian Robertson License: Apache-2.0 -Files: public/*.md +Files: backend/public/*.md Copyright: 2021 The HedgeDoc developers (see AUTHORS file) License: CC0-1.0 diff --git a/.yarnrc.yml b/.yarnrc.yml deleted file mode 100644 index 4311df1b1..000000000 --- a/.yarnrc.yml +++ /dev/null @@ -1,11 +0,0 @@ -nodeLinker: node-modules - -plugins: - - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs - spec: "@yarnpkg/plugin-interactive-tools" - - path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs - spec: "@yarnpkg/plugin-typescript" - - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs - spec: "@yarnpkg/plugin-workspace-tools" - -yarnPath: .yarn/releases/yarn-3.2.4.cjs diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 000000000..1e5cc4be3 --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) +# +# SPDX-License-Identifier: CC0-1.0 + +dist +.pnp.* diff --git a/.editorconfig b/backend/.editorconfig similarity index 100% rename from .editorconfig rename to backend/.editorconfig diff --git a/.env.example b/backend/.env.example similarity index 100% rename from .env.example rename to backend/.env.example diff --git a/.eslintrc.js b/backend/.eslintrc.js similarity index 100% rename from .eslintrc.js rename to backend/.eslintrc.js diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 000000000..55e328560 --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) +# +# SPDX-License-Identifier: CC0-1.0 + +# ignore config files +config.json +.sequelizerc +.env + +# ignore webpack build +public/build +public/views/build + +# ignore TypeScript built +built/ +dist + +# Tests +coverage +coverage-e2e +.nyc_output + +public/uploads/* +!public/uploads/.gitkeep +!public/.gitkeep +uploads +test_uploads diff --git a/.prettierrc b/backend/.prettierrc similarity index 100% rename from .prettierrc rename to backend/.prettierrc diff --git a/.prettierrc.license b/backend/.prettierrc.license similarity index 100% rename from .prettierrc.license rename to backend/.prettierrc.license diff --git a/backend/.yarnrc.yml b/backend/.yarnrc.yml new file mode 100644 index 000000000..89ff62b94 --- /dev/null +++ b/backend/.yarnrc.yml @@ -0,0 +1,11 @@ +nodeLinker: node-modules + +plugins: + - path: ../.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs + spec: "@yarnpkg/plugin-interactive-tools" + - path: ../.yarn/plugins/@yarnpkg/plugin-typescript.cjs + spec: "@yarnpkg/plugin-typescript" + - path: ../.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs + spec: "@yarnpkg/plugin-workspace-tools" + +yarnPath: ../.yarn/releases/yarn-3.2.4.cjs diff --git a/.yarnrc.yml.license b/backend/.yarnrc.yml.license similarity index 100% rename from .yarnrc.yml.license rename to backend/.yarnrc.yml.license diff --git a/CHANGELOG.md b/backend/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to backend/CHANGELOG.md diff --git a/codecov.yml b/backend/codecov.yml similarity index 100% rename from codecov.yml rename to backend/codecov.yml diff --git a/docker/Dockerfile b/backend/docker/Dockerfile similarity index 84% rename from docker/Dockerfile rename to backend/docker/Dockerfile index 07e28f661..e24dcaf8f 100644 --- a/docker/Dockerfile +++ b/backend/docker/Dockerfile @@ -19,8 +19,8 @@ ENTRYPOINT ["tini"] USER node WORKDIR /usr/src/app -COPY --chown=node .yarn .yarn -COPY --chown=node package.json yarn.lock .yarnrc.yml ./ +COPY --chown=node .yarn ../.yarn +COPY --chown=node backend/package.json backend/yarn.lock backend/.yarnrc.yml ./ ## Stage 1: Code with all dependencies @@ -32,8 +32,8 @@ WORKDIR /usr/src/app RUN --mount=type=cache,sharing=locked,uid=1000,gid=1000,target=/tmp/.yarn \ YARN_CACHE_FOLDER=/tmp/.yarn yarn install --immutable -COPY --chown=node nest-cli.json tsconfig.json tsconfig.build.json ./ -COPY --chown=node src src +COPY --chown=node backend/nest-cli.json backend/tsconfig.json backend/tsconfig.build.json ./ +COPY --chown=node backend/src src ## Stage 2a: Dev config files and tests @@ -41,8 +41,8 @@ FROM code-with-deps as development USER node WORKDIR /usr/src/app -COPY --chown=node .eslintrc.js eslint-local-rules.js .prettierrc jest-e2e.json ./ -COPY --chown=node test test +COPY --chown=node backend/.eslintrc.js backend/eslint-local-rules.js backend/.prettierrc backend/jest-e2e.json ./ +COPY --chown=node backend/test test CMD ["node", "-r", "ts-node/register", "src/main.ts"] diff --git a/docker/README.md b/backend/docker/README.md similarity index 84% rename from docker/README.md rename to backend/docker/README.md index 873053756..a9c27d773 100644 --- a/docker/README.md +++ b/backend/docker/README.md @@ -16,17 +16,17 @@ It uses features which are only available in BuildKit - see https://docs.docker. **Note:** This does not include any frontend! To build a production image, run the following command *from the root of the repository*: -`docker build -t hedgedoc-prod -f docker/Dockerfile .` +`docker buildx build -t hedgedoc-prod -f backend/docker/Dockerfile .` When you run the image, you need to provide environment variables to configure HedgeDoc. -See [the config docs](../docs/content/config/index.md) for more information. +See [the config docs](../../docs/content/config/index.md) for more information. This example starts HedgeDoc on localhost, with non-persistent storage: `docker run -e HD_DOMAIN=http://localhost -e HD_MEDIA_BACKEND=filesystem -e HD_MEDIA_BACKEND_FILESYSTEM_UPLOAD_PATH=uploads -e HD_DATABASE_TYPE=sqlite -e HD_DATABASE_NAME=hedgedoc.sqlite -e HD_SESSION_SECRET=foobar -e HD_LOGLEVEL=debug -p 3000:3000 hedgedoc-prod` ## Build a development image You can build a development image using the `development` target: -`docker build -t hedgedoc-dev -f docker/Dockerfile --target development .` +`docker buildx build -t hedgedoc-dev -f backend/docker/Dockerfile --target development .` You can then, e.g. run tests inside the image: `docker run hedgedoc-dev yarn run test:e2e` diff --git a/eslint-local-rules.js b/backend/eslint-local-rules.js similarity index 100% rename from eslint-local-rules.js rename to backend/eslint-local-rules.js diff --git a/jest-e2e.json b/backend/jest-e2e.json similarity index 100% rename from jest-e2e.json rename to backend/jest-e2e.json diff --git a/jest-e2e.json.license b/backend/jest-e2e.json.license similarity index 100% rename from jest-e2e.json.license rename to backend/jest-e2e.json.license diff --git a/nest-cli.json b/backend/nest-cli.json similarity index 100% rename from nest-cli.json rename to backend/nest-cli.json diff --git a/nest-cli.json.license b/backend/nest-cli.json.license similarity index 100% rename from nest-cli.json.license rename to backend/nest-cli.json.license diff --git a/package.json b/backend/package.json similarity index 100% rename from package.json rename to backend/package.json diff --git a/package.json.license b/backend/package.json.license similarity index 100% rename from package.json.license rename to backend/package.json.license diff --git a/public/.gitkeep b/backend/public/.gitkeep similarity index 100% rename from public/.gitkeep rename to backend/public/.gitkeep diff --git a/public/intro.md b/backend/public/intro.md similarity index 100% rename from public/intro.md rename to backend/public/intro.md diff --git a/public/motd.md b/backend/public/motd.md similarity index 100% rename from public/motd.md rename to backend/public/motd.md diff --git a/src/api/private/alias/alias.controller.ts b/backend/src/api/private/alias/alias.controller.ts similarity index 100% rename from src/api/private/alias/alias.controller.ts rename to backend/src/api/private/alias/alias.controller.ts diff --git a/src/api/private/auth/auth.controller.ts b/backend/src/api/private/auth/auth.controller.ts similarity index 100% rename from src/api/private/auth/auth.controller.ts rename to backend/src/api/private/auth/auth.controller.ts diff --git a/src/api/private/config/config.controller.ts b/backend/src/api/private/config/config.controller.ts similarity index 100% rename from src/api/private/config/config.controller.ts rename to backend/src/api/private/config/config.controller.ts diff --git a/src/api/private/groups/groups.controller.ts b/backend/src/api/private/groups/groups.controller.ts similarity index 100% rename from src/api/private/groups/groups.controller.ts rename to backend/src/api/private/groups/groups.controller.ts diff --git a/src/api/private/me/history/history.controller.ts b/backend/src/api/private/me/history/history.controller.ts similarity index 100% rename from src/api/private/me/history/history.controller.ts rename to backend/src/api/private/me/history/history.controller.ts diff --git a/src/api/private/me/me.controller.ts b/backend/src/api/private/me/me.controller.ts similarity index 100% rename from src/api/private/me/me.controller.ts rename to backend/src/api/private/me/me.controller.ts diff --git a/src/api/private/media/media.controller.ts b/backend/src/api/private/media/media.controller.ts similarity index 100% rename from src/api/private/media/media.controller.ts rename to backend/src/api/private/media/media.controller.ts diff --git a/src/api/private/notes/notes.controller.ts b/backend/src/api/private/notes/notes.controller.ts similarity index 100% rename from src/api/private/notes/notes.controller.ts rename to backend/src/api/private/notes/notes.controller.ts diff --git a/src/api/private/private-api.module.ts b/backend/src/api/private/private-api.module.ts similarity index 100% rename from src/api/private/private-api.module.ts rename to backend/src/api/private/private-api.module.ts diff --git a/src/api/private/tokens/tokens.controller.ts b/backend/src/api/private/tokens/tokens.controller.ts similarity index 100% rename from src/api/private/tokens/tokens.controller.ts rename to backend/src/api/private/tokens/tokens.controller.ts diff --git a/src/api/private/users/users.controller.ts b/backend/src/api/private/users/users.controller.ts similarity index 100% rename from src/api/private/users/users.controller.ts rename to backend/src/api/private/users/users.controller.ts diff --git a/src/api/public/alias/alias.controller.ts b/backend/src/api/public/alias/alias.controller.ts similarity index 100% rename from src/api/public/alias/alias.controller.ts rename to backend/src/api/public/alias/alias.controller.ts diff --git a/src/api/public/me/me.controller.ts b/backend/src/api/public/me/me.controller.ts similarity index 100% rename from src/api/public/me/me.controller.ts rename to backend/src/api/public/me/me.controller.ts diff --git a/src/api/public/media/media.controller.ts b/backend/src/api/public/media/media.controller.ts similarity index 100% rename from src/api/public/media/media.controller.ts rename to backend/src/api/public/media/media.controller.ts diff --git a/src/api/public/monitoring/monitoring.controller.ts b/backend/src/api/public/monitoring/monitoring.controller.ts similarity index 100% rename from src/api/public/monitoring/monitoring.controller.ts rename to backend/src/api/public/monitoring/monitoring.controller.ts diff --git a/src/api/public/notes/notes.controller.ts b/backend/src/api/public/notes/notes.controller.ts similarity index 100% rename from src/api/public/notes/notes.controller.ts rename to backend/src/api/public/notes/notes.controller.ts diff --git a/src/api/public/public-api.module.ts b/backend/src/api/public/public-api.module.ts similarity index 100% rename from src/api/public/public-api.module.ts rename to backend/src/api/public/public-api.module.ts diff --git a/src/api/utils/descriptions.ts b/backend/src/api/utils/descriptions.ts similarity index 100% rename from src/api/utils/descriptions.ts rename to backend/src/api/utils/descriptions.ts diff --git a/src/api/utils/get-note.interceptor.ts b/backend/src/api/utils/get-note.interceptor.ts similarity index 100% rename from src/api/utils/get-note.interceptor.ts rename to backend/src/api/utils/get-note.interceptor.ts diff --git a/src/api/utils/login-enabled.guard.ts b/backend/src/api/utils/login-enabled.guard.ts similarity index 100% rename from src/api/utils/login-enabled.guard.ts rename to backend/src/api/utils/login-enabled.guard.ts diff --git a/src/api/utils/markdown-body.decorator.ts b/backend/src/api/utils/markdown-body.decorator.ts similarity index 100% rename from src/api/utils/markdown-body.decorator.ts rename to backend/src/api/utils/markdown-body.decorator.ts diff --git a/src/api/utils/note-header.interceptor.ts b/backend/src/api/utils/note-header.interceptor.ts similarity index 100% rename from src/api/utils/note-header.interceptor.ts rename to backend/src/api/utils/note-header.interceptor.ts diff --git a/src/api/utils/openapi.decorator.ts b/backend/src/api/utils/openapi.decorator.ts similarity index 100% rename from src/api/utils/openapi.decorator.ts rename to backend/src/api/utils/openapi.decorator.ts diff --git a/src/api/utils/permissions.decorator.ts b/backend/src/api/utils/permissions.decorator.ts similarity index 100% rename from src/api/utils/permissions.decorator.ts rename to backend/src/api/utils/permissions.decorator.ts diff --git a/src/api/utils/permissions.guard.ts b/backend/src/api/utils/permissions.guard.ts similarity index 100% rename from src/api/utils/permissions.guard.ts rename to backend/src/api/utils/permissions.guard.ts diff --git a/src/api/utils/registration-enabled.guard.ts b/backend/src/api/utils/registration-enabled.guard.ts similarity index 100% rename from src/api/utils/registration-enabled.guard.ts rename to backend/src/api/utils/registration-enabled.guard.ts diff --git a/src/api/utils/request-note.decorator.ts b/backend/src/api/utils/request-note.decorator.ts similarity index 100% rename from src/api/utils/request-note.decorator.ts rename to backend/src/api/utils/request-note.decorator.ts diff --git a/src/api/utils/request-user.decorator.ts b/backend/src/api/utils/request-user.decorator.ts similarity index 100% rename from src/api/utils/request-user.decorator.ts rename to backend/src/api/utils/request-user.decorator.ts diff --git a/src/api/utils/session-authprovider.decorator.ts b/backend/src/api/utils/session-authprovider.decorator.ts similarity index 100% rename from src/api/utils/session-authprovider.decorator.ts rename to backend/src/api/utils/session-authprovider.decorator.ts diff --git a/src/app-init.ts b/backend/src/app-init.ts similarity index 100% rename from src/app-init.ts rename to backend/src/app-init.ts diff --git a/src/app.module.ts b/backend/src/app.module.ts similarity index 100% rename from src/app.module.ts rename to backend/src/app.module.ts diff --git a/src/auth/auth-token.dto.ts b/backend/src/auth/auth-token.dto.ts similarity index 100% rename from src/auth/auth-token.dto.ts rename to backend/src/auth/auth-token.dto.ts diff --git a/src/auth/auth-token.entity.ts b/backend/src/auth/auth-token.entity.ts similarity index 100% rename from src/auth/auth-token.entity.ts rename to backend/src/auth/auth-token.entity.ts diff --git a/src/auth/auth.module.ts b/backend/src/auth/auth.module.ts similarity index 100% rename from src/auth/auth.module.ts rename to backend/src/auth/auth.module.ts diff --git a/src/auth/auth.service.spec.ts b/backend/src/auth/auth.service.spec.ts similarity index 100% rename from src/auth/auth.service.spec.ts rename to backend/src/auth/auth.service.spec.ts diff --git a/src/auth/auth.service.ts b/backend/src/auth/auth.service.ts similarity index 100% rename from src/auth/auth.service.ts rename to backend/src/auth/auth.service.ts diff --git a/src/auth/mock-auth.guard.ts b/backend/src/auth/mock-auth.guard.ts similarity index 100% rename from src/auth/mock-auth.guard.ts rename to backend/src/auth/mock-auth.guard.ts diff --git a/src/auth/token.strategy.ts b/backend/src/auth/token.strategy.ts similarity index 100% rename from src/auth/token.strategy.ts rename to backend/src/auth/token.strategy.ts diff --git a/src/authors/author.entity.ts b/backend/src/authors/author.entity.ts similarity index 100% rename from src/authors/author.entity.ts rename to backend/src/authors/author.entity.ts diff --git a/src/authors/authors.module.ts b/backend/src/authors/authors.module.ts similarity index 100% rename from src/authors/authors.module.ts rename to backend/src/authors/authors.module.ts diff --git a/src/config/app.config.spec.ts b/backend/src/config/app.config.spec.ts similarity index 100% rename from src/config/app.config.spec.ts rename to backend/src/config/app.config.spec.ts diff --git a/src/config/app.config.ts b/backend/src/config/app.config.ts similarity index 100% rename from src/config/app.config.ts rename to backend/src/config/app.config.ts diff --git a/src/config/auth.config.spec.ts b/backend/src/config/auth.config.spec.ts similarity index 100% rename from src/config/auth.config.spec.ts rename to backend/src/config/auth.config.spec.ts diff --git a/src/config/auth.config.ts b/backend/src/config/auth.config.ts similarity index 100% rename from src/config/auth.config.ts rename to backend/src/config/auth.config.ts diff --git a/src/config/csp.config.ts b/backend/src/config/csp.config.ts similarity index 100% rename from src/config/csp.config.ts rename to backend/src/config/csp.config.ts diff --git a/src/config/customization.config.ts b/backend/src/config/customization.config.ts similarity index 100% rename from src/config/customization.config.ts rename to backend/src/config/customization.config.ts diff --git a/src/config/database-type.enum.ts b/backend/src/config/database-type.enum.ts similarity index 100% rename from src/config/database-type.enum.ts rename to backend/src/config/database-type.enum.ts diff --git a/src/config/database.config.ts b/backend/src/config/database.config.ts similarity index 100% rename from src/config/database.config.ts rename to backend/src/config/database.config.ts diff --git a/src/config/default-access-permission.enum.ts b/backend/src/config/default-access-permission.enum.ts similarity index 100% rename from src/config/default-access-permission.enum.ts rename to backend/src/config/default-access-permission.enum.ts diff --git a/src/config/external-services.config.ts b/backend/src/config/external-services.config.ts similarity index 100% rename from src/config/external-services.config.ts rename to backend/src/config/external-services.config.ts diff --git a/src/config/gitlab.enum.ts b/backend/src/config/gitlab.enum.ts similarity index 100% rename from src/config/gitlab.enum.ts rename to backend/src/config/gitlab.enum.ts diff --git a/src/config/guest_access.enum.ts b/backend/src/config/guest_access.enum.ts similarity index 100% rename from src/config/guest_access.enum.ts rename to backend/src/config/guest_access.enum.ts diff --git a/src/config/hsts.config.ts b/backend/src/config/hsts.config.ts similarity index 100% rename from src/config/hsts.config.ts rename to backend/src/config/hsts.config.ts diff --git a/src/config/loglevel.enum.ts b/backend/src/config/loglevel.enum.ts similarity index 100% rename from src/config/loglevel.enum.ts rename to backend/src/config/loglevel.enum.ts diff --git a/src/config/media.config.spec.ts b/backend/src/config/media.config.spec.ts similarity index 100% rename from src/config/media.config.spec.ts rename to backend/src/config/media.config.spec.ts diff --git a/src/config/media.config.ts b/backend/src/config/media.config.ts similarity index 100% rename from src/config/media.config.ts rename to backend/src/config/media.config.ts diff --git a/src/config/mock/app.config.mock.ts b/backend/src/config/mock/app.config.mock.ts similarity index 100% rename from src/config/mock/app.config.mock.ts rename to backend/src/config/mock/app.config.mock.ts diff --git a/src/config/mock/auth.config.mock.ts b/backend/src/config/mock/auth.config.mock.ts similarity index 100% rename from src/config/mock/auth.config.mock.ts rename to backend/src/config/mock/auth.config.mock.ts diff --git a/src/config/mock/customization.config.mock.ts b/backend/src/config/mock/customization.config.mock.ts similarity index 100% rename from src/config/mock/customization.config.mock.ts rename to backend/src/config/mock/customization.config.mock.ts diff --git a/src/config/mock/database.config.mock.ts b/backend/src/config/mock/database.config.mock.ts similarity index 100% rename from src/config/mock/database.config.mock.ts rename to backend/src/config/mock/database.config.mock.ts diff --git a/src/config/mock/external-services.config.mock.ts b/backend/src/config/mock/external-services.config.mock.ts similarity index 100% rename from src/config/mock/external-services.config.mock.ts rename to backend/src/config/mock/external-services.config.mock.ts diff --git a/src/config/mock/media.config.mock.ts b/backend/src/config/mock/media.config.mock.ts similarity index 100% rename from src/config/mock/media.config.mock.ts rename to backend/src/config/mock/media.config.mock.ts diff --git a/src/config/mock/note.config.mock.ts b/backend/src/config/mock/note.config.mock.ts similarity index 100% rename from src/config/mock/note.config.mock.ts rename to backend/src/config/mock/note.config.mock.ts diff --git a/src/config/note.config.spec.ts b/backend/src/config/note.config.spec.ts similarity index 100% rename from src/config/note.config.spec.ts rename to backend/src/config/note.config.spec.ts diff --git a/src/config/note.config.ts b/backend/src/config/note.config.ts similarity index 100% rename from src/config/note.config.ts rename to backend/src/config/note.config.ts diff --git a/src/config/utils.spec.ts b/backend/src/config/utils.spec.ts similarity index 100% rename from src/config/utils.spec.ts rename to backend/src/config/utils.spec.ts diff --git a/src/config/utils.ts b/backend/src/config/utils.ts similarity index 100% rename from src/config/utils.ts rename to backend/src/config/utils.ts diff --git a/src/errors/error-mapping.ts b/backend/src/errors/error-mapping.ts similarity index 100% rename from src/errors/error-mapping.ts rename to backend/src/errors/error-mapping.ts diff --git a/src/errors/errors.ts b/backend/src/errors/errors.ts similarity index 100% rename from src/errors/errors.ts rename to backend/src/errors/errors.ts diff --git a/src/errors/http-exception-object.ts b/backend/src/errors/http-exception-object.ts similarity index 100% rename from src/errors/http-exception-object.ts rename to backend/src/errors/http-exception-object.ts diff --git a/src/events.ts b/backend/src/events.ts similarity index 100% rename from src/events.ts rename to backend/src/events.ts diff --git a/src/frontend-config/frontend-config.dto.ts b/backend/src/frontend-config/frontend-config.dto.ts similarity index 100% rename from src/frontend-config/frontend-config.dto.ts rename to backend/src/frontend-config/frontend-config.dto.ts diff --git a/src/frontend-config/frontend-config.module.ts b/backend/src/frontend-config/frontend-config.module.ts similarity index 100% rename from src/frontend-config/frontend-config.module.ts rename to backend/src/frontend-config/frontend-config.module.ts diff --git a/src/frontend-config/frontend-config.service.spec.ts b/backend/src/frontend-config/frontend-config.service.spec.ts similarity index 100% rename from src/frontend-config/frontend-config.service.spec.ts rename to backend/src/frontend-config/frontend-config.service.spec.ts diff --git a/src/frontend-config/frontend-config.service.ts b/backend/src/frontend-config/frontend-config.service.ts similarity index 100% rename from src/frontend-config/frontend-config.service.ts rename to backend/src/frontend-config/frontend-config.service.ts diff --git a/src/groups/group-info.dto.ts b/backend/src/groups/group-info.dto.ts similarity index 100% rename from src/groups/group-info.dto.ts rename to backend/src/groups/group-info.dto.ts diff --git a/src/groups/group.entity.ts b/backend/src/groups/group.entity.ts similarity index 100% rename from src/groups/group.entity.ts rename to backend/src/groups/group.entity.ts diff --git a/src/groups/groups.module.ts b/backend/src/groups/groups.module.ts similarity index 100% rename from src/groups/groups.module.ts rename to backend/src/groups/groups.module.ts diff --git a/src/groups/groups.service.spec.ts b/backend/src/groups/groups.service.spec.ts similarity index 100% rename from src/groups/groups.service.spec.ts rename to backend/src/groups/groups.service.spec.ts diff --git a/src/groups/groups.service.ts b/backend/src/groups/groups.service.ts similarity index 100% rename from src/groups/groups.service.ts rename to backend/src/groups/groups.service.ts diff --git a/src/groups/groups.special.ts b/backend/src/groups/groups.special.ts similarity index 100% rename from src/groups/groups.special.ts rename to backend/src/groups/groups.special.ts diff --git a/src/history/history-entry-import.dto.ts b/backend/src/history/history-entry-import.dto.ts similarity index 100% rename from src/history/history-entry-import.dto.ts rename to backend/src/history/history-entry-import.dto.ts diff --git a/src/history/history-entry-update.dto.ts b/backend/src/history/history-entry-update.dto.ts similarity index 100% rename from src/history/history-entry-update.dto.ts rename to backend/src/history/history-entry-update.dto.ts diff --git a/src/history/history-entry.dto.ts b/backend/src/history/history-entry.dto.ts similarity index 100% rename from src/history/history-entry.dto.ts rename to backend/src/history/history-entry.dto.ts diff --git a/src/history/history-entry.entity.ts b/backend/src/history/history-entry.entity.ts similarity index 100% rename from src/history/history-entry.entity.ts rename to backend/src/history/history-entry.entity.ts diff --git a/src/history/history.module.ts b/backend/src/history/history.module.ts similarity index 100% rename from src/history/history.module.ts rename to backend/src/history/history.module.ts diff --git a/src/history/history.service.spec.ts b/backend/src/history/history.service.spec.ts similarity index 100% rename from src/history/history.service.spec.ts rename to backend/src/history/history.service.spec.ts diff --git a/src/history/history.service.ts b/backend/src/history/history.service.ts similarity index 100% rename from src/history/history.service.ts rename to backend/src/history/history.service.ts diff --git a/src/history/utils.spec.ts b/backend/src/history/utils.spec.ts similarity index 100% rename from src/history/utils.spec.ts rename to backend/src/history/utils.spec.ts diff --git a/src/history/utils.ts b/backend/src/history/utils.ts similarity index 100% rename from src/history/utils.ts rename to backend/src/history/utils.ts diff --git a/src/identity/identity.entity.ts b/backend/src/identity/identity.entity.ts similarity index 100% rename from src/identity/identity.entity.ts rename to backend/src/identity/identity.entity.ts diff --git a/src/identity/identity.module.ts b/backend/src/identity/identity.module.ts similarity index 100% rename from src/identity/identity.module.ts rename to backend/src/identity/identity.module.ts diff --git a/src/identity/identity.service.spec.ts b/backend/src/identity/identity.service.spec.ts similarity index 100% rename from src/identity/identity.service.spec.ts rename to backend/src/identity/identity.service.spec.ts diff --git a/src/identity/identity.service.ts b/backend/src/identity/identity.service.ts similarity index 100% rename from src/identity/identity.service.ts rename to backend/src/identity/identity.service.ts diff --git a/src/identity/ldap/ldap-login.dto.ts b/backend/src/identity/ldap/ldap-login.dto.ts similarity index 100% rename from src/identity/ldap/ldap-login.dto.ts rename to backend/src/identity/ldap/ldap-login.dto.ts diff --git a/src/identity/ldap/ldap.strategy.ts b/backend/src/identity/ldap/ldap.strategy.ts similarity index 100% rename from src/identity/ldap/ldap.strategy.ts rename to backend/src/identity/ldap/ldap.strategy.ts diff --git a/src/identity/local/local.strategy.ts b/backend/src/identity/local/local.strategy.ts similarity index 100% rename from src/identity/local/local.strategy.ts rename to backend/src/identity/local/local.strategy.ts diff --git a/src/identity/local/login.dto.ts b/backend/src/identity/local/login.dto.ts similarity index 100% rename from src/identity/local/login.dto.ts rename to backend/src/identity/local/login.dto.ts diff --git a/src/identity/local/register.dto.ts b/backend/src/identity/local/register.dto.ts similarity index 100% rename from src/identity/local/register.dto.ts rename to backend/src/identity/local/register.dto.ts diff --git a/src/identity/local/update-password.dto.ts b/backend/src/identity/local/update-password.dto.ts similarity index 100% rename from src/identity/local/update-password.dto.ts rename to backend/src/identity/local/update-password.dto.ts diff --git a/src/identity/provider-type.enum.ts b/backend/src/identity/provider-type.enum.ts similarity index 100% rename from src/identity/provider-type.enum.ts rename to backend/src/identity/provider-type.enum.ts diff --git a/src/identity/session.guard.ts b/backend/src/identity/session.guard.ts similarity index 100% rename from src/identity/session.guard.ts rename to backend/src/identity/session.guard.ts diff --git a/src/identity/utils.ts b/backend/src/identity/utils.ts similarity index 100% rename from src/identity/utils.ts rename to backend/src/identity/utils.ts diff --git a/src/logger/console-logger.service.spec.ts b/backend/src/logger/console-logger.service.spec.ts similarity index 100% rename from src/logger/console-logger.service.spec.ts rename to backend/src/logger/console-logger.service.spec.ts diff --git a/src/logger/console-logger.service.ts b/backend/src/logger/console-logger.service.ts similarity index 100% rename from src/logger/console-logger.service.ts rename to backend/src/logger/console-logger.service.ts diff --git a/src/logger/logger.module.ts b/backend/src/logger/logger.module.ts similarity index 100% rename from src/logger/logger.module.ts rename to backend/src/logger/logger.module.ts diff --git a/src/logger/typeorm-logger.service.ts b/backend/src/logger/typeorm-logger.service.ts similarity index 100% rename from src/logger/typeorm-logger.service.ts rename to backend/src/logger/typeorm-logger.service.ts diff --git a/src/main.ts b/backend/src/main.ts similarity index 100% rename from src/main.ts rename to backend/src/main.ts diff --git a/src/media/backends/azure-backend.ts b/backend/src/media/backends/azure-backend.ts similarity index 100% rename from src/media/backends/azure-backend.ts rename to backend/src/media/backends/azure-backend.ts diff --git a/src/media/backends/backend-type.enum.ts b/backend/src/media/backends/backend-type.enum.ts similarity index 100% rename from src/media/backends/backend-type.enum.ts rename to backend/src/media/backends/backend-type.enum.ts diff --git a/src/media/backends/filesystem-backend.ts b/backend/src/media/backends/filesystem-backend.ts similarity index 100% rename from src/media/backends/filesystem-backend.ts rename to backend/src/media/backends/filesystem-backend.ts diff --git a/src/media/backends/imgur-backend.ts b/backend/src/media/backends/imgur-backend.ts similarity index 100% rename from src/media/backends/imgur-backend.ts rename to backend/src/media/backends/imgur-backend.ts diff --git a/src/media/backends/s3-backend.ts b/backend/src/media/backends/s3-backend.ts similarity index 100% rename from src/media/backends/s3-backend.ts rename to backend/src/media/backends/s3-backend.ts diff --git a/src/media/backends/webdav-backend.ts b/backend/src/media/backends/webdav-backend.ts similarity index 100% rename from src/media/backends/webdav-backend.ts rename to backend/src/media/backends/webdav-backend.ts diff --git a/src/media/media-backend.interface.ts b/backend/src/media/media-backend.interface.ts similarity index 100% rename from src/media/media-backend.interface.ts rename to backend/src/media/media-backend.interface.ts diff --git a/src/media/media-upload-url.dto.ts b/backend/src/media/media-upload-url.dto.ts similarity index 100% rename from src/media/media-upload-url.dto.ts rename to backend/src/media/media-upload-url.dto.ts diff --git a/src/media/media-upload.dto.ts b/backend/src/media/media-upload.dto.ts similarity index 100% rename from src/media/media-upload.dto.ts rename to backend/src/media/media-upload.dto.ts diff --git a/src/media/media-upload.entity.ts b/backend/src/media/media-upload.entity.ts similarity index 100% rename from src/media/media-upload.entity.ts rename to backend/src/media/media-upload.entity.ts diff --git a/src/media/media.module.ts b/backend/src/media/media.module.ts similarity index 100% rename from src/media/media.module.ts rename to backend/src/media/media.module.ts diff --git a/src/media/media.service.spec.ts b/backend/src/media/media.service.spec.ts similarity index 100% rename from src/media/media.service.spec.ts rename to backend/src/media/media.service.spec.ts diff --git a/src/media/media.service.ts b/backend/src/media/media.service.ts similarity index 100% rename from src/media/media.service.ts rename to backend/src/media/media.service.ts diff --git a/src/media/multer-file.interface.ts b/backend/src/media/multer-file.interface.ts similarity index 100% rename from src/media/multer-file.interface.ts rename to backend/src/media/multer-file.interface.ts diff --git a/src/monitoring/monitoring.module.ts b/backend/src/monitoring/monitoring.module.ts similarity index 100% rename from src/monitoring/monitoring.module.ts rename to backend/src/monitoring/monitoring.module.ts diff --git a/src/monitoring/monitoring.service.spec.ts b/backend/src/monitoring/monitoring.service.spec.ts similarity index 100% rename from src/monitoring/monitoring.service.spec.ts rename to backend/src/monitoring/monitoring.service.spec.ts diff --git a/src/monitoring/monitoring.service.ts b/backend/src/monitoring/monitoring.service.ts similarity index 100% rename from src/monitoring/monitoring.service.ts rename to backend/src/monitoring/monitoring.service.ts diff --git a/src/monitoring/server-status.dto.ts b/backend/src/monitoring/server-status.dto.ts similarity index 100% rename from src/monitoring/server-status.dto.ts rename to backend/src/monitoring/server-status.dto.ts diff --git a/src/notes/alias-create.dto.ts b/backend/src/notes/alias-create.dto.ts similarity index 100% rename from src/notes/alias-create.dto.ts rename to backend/src/notes/alias-create.dto.ts diff --git a/src/notes/alias-update.dto.ts b/backend/src/notes/alias-update.dto.ts similarity index 100% rename from src/notes/alias-update.dto.ts rename to backend/src/notes/alias-update.dto.ts diff --git a/src/notes/alias.dto.ts b/backend/src/notes/alias.dto.ts similarity index 100% rename from src/notes/alias.dto.ts rename to backend/src/notes/alias.dto.ts diff --git a/src/notes/alias.entity.ts b/backend/src/notes/alias.entity.ts similarity index 100% rename from src/notes/alias.entity.ts rename to backend/src/notes/alias.entity.ts diff --git a/src/notes/alias.service.spec.ts b/backend/src/notes/alias.service.spec.ts similarity index 100% rename from src/notes/alias.service.spec.ts rename to backend/src/notes/alias.service.spec.ts diff --git a/src/notes/alias.service.ts b/backend/src/notes/alias.service.ts similarity index 100% rename from src/notes/alias.service.ts rename to backend/src/notes/alias.service.ts diff --git a/src/notes/note-metadata.dto.ts b/backend/src/notes/note-metadata.dto.ts similarity index 100% rename from src/notes/note-metadata.dto.ts rename to backend/src/notes/note-metadata.dto.ts diff --git a/src/notes/note-permissions.dto.ts b/backend/src/notes/note-permissions.dto.ts similarity index 100% rename from src/notes/note-permissions.dto.ts rename to backend/src/notes/note-permissions.dto.ts diff --git a/src/notes/note.dto.ts b/backend/src/notes/note.dto.ts similarity index 100% rename from src/notes/note.dto.ts rename to backend/src/notes/note.dto.ts diff --git a/src/notes/note.entity.ts b/backend/src/notes/note.entity.ts similarity index 100% rename from src/notes/note.entity.ts rename to backend/src/notes/note.entity.ts diff --git a/src/notes/note.media-deletion.dto.ts b/backend/src/notes/note.media-deletion.dto.ts similarity index 100% rename from src/notes/note.media-deletion.dto.ts rename to backend/src/notes/note.media-deletion.dto.ts diff --git a/src/notes/notes.module.ts b/backend/src/notes/notes.module.ts similarity index 100% rename from src/notes/notes.module.ts rename to backend/src/notes/notes.module.ts diff --git a/src/notes/notes.service.spec.ts b/backend/src/notes/notes.service.spec.ts similarity index 100% rename from src/notes/notes.service.spec.ts rename to backend/src/notes/notes.service.spec.ts diff --git a/src/notes/notes.service.ts b/backend/src/notes/notes.service.ts similarity index 100% rename from src/notes/notes.service.ts rename to backend/src/notes/notes.service.ts diff --git a/src/notes/primary.value-transformer.ts b/backend/src/notes/primary.value-transformer.ts similarity index 100% rename from src/notes/primary.value-transformer.ts rename to backend/src/notes/primary.value-transformer.ts diff --git a/src/notes/tag.entity.ts b/backend/src/notes/tag.entity.ts similarity index 100% rename from src/notes/tag.entity.ts rename to backend/src/notes/tag.entity.ts diff --git a/src/notes/utils.spec.ts b/backend/src/notes/utils.spec.ts similarity index 100% rename from src/notes/utils.spec.ts rename to backend/src/notes/utils.spec.ts diff --git a/src/notes/utils.ts b/backend/src/notes/utils.ts similarity index 100% rename from src/notes/utils.ts rename to backend/src/notes/utils.ts diff --git a/src/permissions/note-group-permission.entity.ts b/backend/src/permissions/note-group-permission.entity.ts similarity index 100% rename from src/permissions/note-group-permission.entity.ts rename to backend/src/permissions/note-group-permission.entity.ts diff --git a/src/permissions/note-user-permission.entity.ts b/backend/src/permissions/note-user-permission.entity.ts similarity index 100% rename from src/permissions/note-user-permission.entity.ts rename to backend/src/permissions/note-user-permission.entity.ts diff --git a/src/permissions/permissions.enum.ts b/backend/src/permissions/permissions.enum.ts similarity index 100% rename from src/permissions/permissions.enum.ts rename to backend/src/permissions/permissions.enum.ts diff --git a/src/permissions/permissions.module.ts b/backend/src/permissions/permissions.module.ts similarity index 100% rename from src/permissions/permissions.module.ts rename to backend/src/permissions/permissions.module.ts diff --git a/src/permissions/permissions.service.spec.ts b/backend/src/permissions/permissions.service.spec.ts similarity index 100% rename from src/permissions/permissions.service.spec.ts rename to backend/src/permissions/permissions.service.spec.ts diff --git a/src/permissions/permissions.service.ts b/backend/src/permissions/permissions.service.ts similarity index 100% rename from src/permissions/permissions.service.ts rename to backend/src/permissions/permissions.service.ts diff --git a/src/realtime/realtime-note/realtime-note-store.spec.ts b/backend/src/realtime/realtime-note/realtime-note-store.spec.ts similarity index 100% rename from src/realtime/realtime-note/realtime-note-store.spec.ts rename to backend/src/realtime/realtime-note/realtime-note-store.spec.ts diff --git a/src/realtime/realtime-note/realtime-note-store.ts b/backend/src/realtime/realtime-note/realtime-note-store.ts similarity index 100% rename from src/realtime/realtime-note/realtime-note-store.ts rename to backend/src/realtime/realtime-note/realtime-note-store.ts diff --git a/src/realtime/realtime-note/realtime-note.module.ts b/backend/src/realtime/realtime-note/realtime-note.module.ts similarity index 100% rename from src/realtime/realtime-note/realtime-note.module.ts rename to backend/src/realtime/realtime-note/realtime-note.module.ts diff --git a/src/realtime/realtime-note/realtime-note.service.spec.ts b/backend/src/realtime/realtime-note/realtime-note.service.spec.ts similarity index 100% rename from src/realtime/realtime-note/realtime-note.service.spec.ts rename to backend/src/realtime/realtime-note/realtime-note.service.spec.ts diff --git a/src/realtime/realtime-note/realtime-note.service.ts b/backend/src/realtime/realtime-note/realtime-note.service.ts similarity index 100% rename from src/realtime/realtime-note/realtime-note.service.ts rename to backend/src/realtime/realtime-note/realtime-note.service.ts diff --git a/src/realtime/realtime-note/realtime-note.spec.ts b/backend/src/realtime/realtime-note/realtime-note.spec.ts similarity index 100% rename from src/realtime/realtime-note/realtime-note.spec.ts rename to backend/src/realtime/realtime-note/realtime-note.spec.ts diff --git a/src/realtime/realtime-note/realtime-note.ts b/backend/src/realtime/realtime-note/realtime-note.ts similarity index 100% rename from src/realtime/realtime-note/realtime-note.ts rename to backend/src/realtime/realtime-note/realtime-note.ts diff --git a/src/realtime/realtime-note/test-utils/mock-awareness.ts b/backend/src/realtime/realtime-note/test-utils/mock-awareness.ts similarity index 100% rename from src/realtime/realtime-note/test-utils/mock-awareness.ts rename to backend/src/realtime/realtime-note/test-utils/mock-awareness.ts diff --git a/src/realtime/realtime-note/test-utils/mock-connection.ts b/backend/src/realtime/realtime-note/test-utils/mock-connection.ts similarity index 100% rename from src/realtime/realtime-note/test-utils/mock-connection.ts rename to backend/src/realtime/realtime-note/test-utils/mock-connection.ts diff --git a/src/realtime/realtime-note/test-utils/mock-realtime-note.ts b/backend/src/realtime/realtime-note/test-utils/mock-realtime-note.ts similarity index 100% rename from src/realtime/realtime-note/test-utils/mock-realtime-note.ts rename to backend/src/realtime/realtime-note/test-utils/mock-realtime-note.ts diff --git a/src/realtime/realtime-note/test-utils/mock-websocket-doc.ts b/backend/src/realtime/realtime-note/test-utils/mock-websocket-doc.ts similarity index 100% rename from src/realtime/realtime-note/test-utils/mock-websocket-doc.ts rename to backend/src/realtime/realtime-note/test-utils/mock-websocket-doc.ts diff --git a/src/realtime/realtime-note/test-utils/mock-websocket-transporter.ts b/backend/src/realtime/realtime-note/test-utils/mock-websocket-transporter.ts similarity index 100% rename from src/realtime/realtime-note/test-utils/mock-websocket-transporter.ts rename to backend/src/realtime/realtime-note/test-utils/mock-websocket-transporter.ts diff --git a/src/realtime/realtime-note/test-utils/wait-for-other-promises-to-finish.ts b/backend/src/realtime/realtime-note/test-utils/wait-for-other-promises-to-finish.ts similarity index 100% rename from src/realtime/realtime-note/test-utils/wait-for-other-promises-to-finish.ts rename to backend/src/realtime/realtime-note/test-utils/wait-for-other-promises-to-finish.ts diff --git a/src/realtime/realtime-note/websocket-awareness.spec.ts b/backend/src/realtime/realtime-note/websocket-awareness.spec.ts similarity index 100% rename from src/realtime/realtime-note/websocket-awareness.spec.ts rename to backend/src/realtime/realtime-note/websocket-awareness.spec.ts diff --git a/src/realtime/realtime-note/websocket-awareness.ts b/backend/src/realtime/realtime-note/websocket-awareness.ts similarity index 100% rename from src/realtime/realtime-note/websocket-awareness.ts rename to backend/src/realtime/realtime-note/websocket-awareness.ts diff --git a/src/realtime/realtime-note/websocket-connection.spec.ts b/backend/src/realtime/realtime-note/websocket-connection.spec.ts similarity index 100% rename from src/realtime/realtime-note/websocket-connection.spec.ts rename to backend/src/realtime/realtime-note/websocket-connection.spec.ts diff --git a/src/realtime/realtime-note/websocket-connection.ts b/backend/src/realtime/realtime-note/websocket-connection.ts similarity index 100% rename from src/realtime/realtime-note/websocket-connection.ts rename to backend/src/realtime/realtime-note/websocket-connection.ts diff --git a/src/realtime/realtime-note/websocket-doc.spec.ts b/backend/src/realtime/realtime-note/websocket-doc.spec.ts similarity index 100% rename from src/realtime/realtime-note/websocket-doc.spec.ts rename to backend/src/realtime/realtime-note/websocket-doc.spec.ts diff --git a/src/realtime/realtime-note/websocket-doc.ts b/backend/src/realtime/realtime-note/websocket-doc.ts similarity index 100% rename from src/realtime/realtime-note/websocket-doc.ts rename to backend/src/realtime/realtime-note/websocket-doc.ts diff --git a/src/realtime/websocket/utils/extract-note-id-from-request-url.spec.ts b/backend/src/realtime/websocket/utils/extract-note-id-from-request-url.spec.ts similarity index 100% rename from src/realtime/websocket/utils/extract-note-id-from-request-url.spec.ts rename to backend/src/realtime/websocket/utils/extract-note-id-from-request-url.spec.ts diff --git a/src/realtime/websocket/utils/extract-note-id-from-request-url.ts b/backend/src/realtime/websocket/utils/extract-note-id-from-request-url.ts similarity index 100% rename from src/realtime/websocket/utils/extract-note-id-from-request-url.ts rename to backend/src/realtime/websocket/utils/extract-note-id-from-request-url.ts diff --git a/src/realtime/websocket/websocket.gateway.spec.ts b/backend/src/realtime/websocket/websocket.gateway.spec.ts similarity index 100% rename from src/realtime/websocket/websocket.gateway.spec.ts rename to backend/src/realtime/websocket/websocket.gateway.spec.ts diff --git a/src/realtime/websocket/websocket.gateway.ts b/backend/src/realtime/websocket/websocket.gateway.ts similarity index 100% rename from src/realtime/websocket/websocket.gateway.ts rename to backend/src/realtime/websocket/websocket.gateway.ts diff --git a/src/realtime/websocket/websocket.module.ts b/backend/src/realtime/websocket/websocket.module.ts similarity index 100% rename from src/realtime/websocket/websocket.module.ts rename to backend/src/realtime/websocket/websocket.module.ts diff --git a/src/revisions/edit.dto.ts b/backend/src/revisions/edit.dto.ts similarity index 100% rename from src/revisions/edit.dto.ts rename to backend/src/revisions/edit.dto.ts diff --git a/src/revisions/edit.entity.ts b/backend/src/revisions/edit.entity.ts similarity index 100% rename from src/revisions/edit.entity.ts rename to backend/src/revisions/edit.entity.ts diff --git a/src/revisions/edit.service.ts b/backend/src/revisions/edit.service.ts similarity index 100% rename from src/revisions/edit.service.ts rename to backend/src/revisions/edit.service.ts diff --git a/src/revisions/revision-metadata.dto.ts b/backend/src/revisions/revision-metadata.dto.ts similarity index 100% rename from src/revisions/revision-metadata.dto.ts rename to backend/src/revisions/revision-metadata.dto.ts diff --git a/src/revisions/revision.dto.ts b/backend/src/revisions/revision.dto.ts similarity index 100% rename from src/revisions/revision.dto.ts rename to backend/src/revisions/revision.dto.ts diff --git a/src/revisions/revision.entity.ts b/backend/src/revisions/revision.entity.ts similarity index 100% rename from src/revisions/revision.entity.ts rename to backend/src/revisions/revision.entity.ts diff --git a/src/revisions/revisions.module.ts b/backend/src/revisions/revisions.module.ts similarity index 100% rename from src/revisions/revisions.module.ts rename to backend/src/revisions/revisions.module.ts diff --git a/src/revisions/revisions.service.spec.ts b/backend/src/revisions/revisions.service.spec.ts similarity index 100% rename from src/revisions/revisions.service.spec.ts rename to backend/src/revisions/revisions.service.spec.ts diff --git a/src/revisions/revisions.service.ts b/backend/src/revisions/revisions.service.ts similarity index 100% rename from src/revisions/revisions.service.ts rename to backend/src/revisions/revisions.service.ts diff --git a/src/seed.ts b/backend/src/seed.ts similarity index 100% rename from src/seed.ts rename to backend/src/seed.ts diff --git a/src/session/session.module.ts b/backend/src/session/session.module.ts similarity index 100% rename from src/session/session.module.ts rename to backend/src/session/session.module.ts diff --git a/src/session/session.service.spec.ts b/backend/src/session/session.service.spec.ts similarity index 100% rename from src/session/session.service.spec.ts rename to backend/src/session/session.service.spec.ts diff --git a/src/session/session.service.ts b/backend/src/session/session.service.ts similarity index 100% rename from src/session/session.service.ts rename to backend/src/session/session.service.ts diff --git a/src/users/session.entity.ts b/backend/src/users/session.entity.ts similarity index 100% rename from src/users/session.entity.ts rename to backend/src/users/session.entity.ts diff --git a/src/users/user-info.dto.ts b/backend/src/users/user-info.dto.ts similarity index 100% rename from src/users/user-info.dto.ts rename to backend/src/users/user-info.dto.ts diff --git a/src/users/user-relation.enum.ts b/backend/src/users/user-relation.enum.ts similarity index 100% rename from src/users/user-relation.enum.ts rename to backend/src/users/user-relation.enum.ts diff --git a/src/users/user.entity.ts b/backend/src/users/user.entity.ts similarity index 100% rename from src/users/user.entity.ts rename to backend/src/users/user.entity.ts diff --git a/src/users/users.module.ts b/backend/src/users/users.module.ts similarity index 100% rename from src/users/users.module.ts rename to backend/src/users/users.module.ts diff --git a/src/users/users.service.spec.ts b/backend/src/users/users.service.spec.ts similarity index 100% rename from src/users/users.service.spec.ts rename to backend/src/users/users.service.spec.ts diff --git a/src/users/users.service.ts b/backend/src/users/users.service.ts similarity index 100% rename from src/users/users.service.ts rename to backend/src/users/users.service.ts diff --git a/src/utils/arrayDuplicatCheck.ts b/backend/src/utils/arrayDuplicatCheck.ts similarity index 100% rename from src/utils/arrayDuplicatCheck.ts rename to backend/src/utils/arrayDuplicatCheck.ts diff --git a/src/utils/base.dto..ts b/backend/src/utils/base.dto..ts similarity index 100% rename from src/utils/base.dto..ts rename to backend/src/utils/base.dto..ts diff --git a/src/utils/createSpecialGroups.ts b/backend/src/utils/createSpecialGroups.ts similarity index 100% rename from src/utils/createSpecialGroups.ts rename to backend/src/utils/createSpecialGroups.ts diff --git a/src/utils/password.spec.ts b/backend/src/utils/password.spec.ts similarity index 100% rename from src/utils/password.spec.ts rename to backend/src/utils/password.spec.ts diff --git a/src/utils/password.ts b/backend/src/utils/password.ts similarity index 100% rename from src/utils/password.ts rename to backend/src/utils/password.ts diff --git a/src/utils/serverVersion.spec.ts b/backend/src/utils/serverVersion.spec.ts similarity index 100% rename from src/utils/serverVersion.spec.ts rename to backend/src/utils/serverVersion.spec.ts diff --git a/src/utils/serverVersion.ts b/backend/src/utils/serverVersion.ts similarity index 100% rename from src/utils/serverVersion.ts rename to backend/src/utils/serverVersion.ts diff --git a/src/utils/session.ts b/backend/src/utils/session.ts similarity index 100% rename from src/utils/session.ts rename to backend/src/utils/session.ts diff --git a/src/utils/setup-pipes.ts b/backend/src/utils/setup-pipes.ts similarity index 100% rename from src/utils/setup-pipes.ts rename to backend/src/utils/setup-pipes.ts diff --git a/src/utils/swagger.ts b/backend/src/utils/swagger.ts similarity index 100% rename from src/utils/swagger.ts rename to backend/src/utils/swagger.ts diff --git a/src/utils/test-utils/mockSelectQueryBuilder.ts b/backend/src/utils/test-utils/mockSelectQueryBuilder.ts similarity index 100% rename from src/utils/test-utils/mockSelectQueryBuilder.ts rename to backend/src/utils/test-utils/mockSelectQueryBuilder.ts diff --git a/src/utils/timestamp.ts b/backend/src/utils/timestamp.ts similarity index 100% rename from src/utils/timestamp.ts rename to backend/src/utils/timestamp.ts diff --git a/test/app.e2e-spec.ts b/backend/test/app.e2e-spec.ts similarity index 100% rename from test/app.e2e-spec.ts rename to backend/test/app.e2e-spec.ts diff --git a/test/private-api/alias.e2e-spec.ts b/backend/test/private-api/alias.e2e-spec.ts similarity index 100% rename from test/private-api/alias.e2e-spec.ts rename to backend/test/private-api/alias.e2e-spec.ts diff --git a/test/private-api/auth.e2e-spec.ts b/backend/test/private-api/auth.e2e-spec.ts similarity index 100% rename from test/private-api/auth.e2e-spec.ts rename to backend/test/private-api/auth.e2e-spec.ts diff --git a/test/private-api/fixtures/hedgedoc.pem b/backend/test/private-api/fixtures/hedgedoc.pem similarity index 100% rename from test/private-api/fixtures/hedgedoc.pem rename to backend/test/private-api/fixtures/hedgedoc.pem diff --git a/test/private-api/fixtures/hedgedoc.pem.license b/backend/test/private-api/fixtures/hedgedoc.pem.license similarity index 100% rename from test/private-api/fixtures/hedgedoc.pem.license rename to backend/test/private-api/fixtures/hedgedoc.pem.license diff --git a/test/private-api/fixtures/test.png b/backend/test/private-api/fixtures/test.png similarity index 100% rename from test/private-api/fixtures/test.png rename to backend/test/private-api/fixtures/test.png diff --git a/test/private-api/fixtures/test.png.license b/backend/test/private-api/fixtures/test.png.license similarity index 100% rename from test/private-api/fixtures/test.png.license rename to backend/test/private-api/fixtures/test.png.license diff --git a/test/private-api/fixtures/test.zip b/backend/test/private-api/fixtures/test.zip similarity index 100% rename from test/private-api/fixtures/test.zip rename to backend/test/private-api/fixtures/test.zip diff --git a/test/private-api/fixtures/test.zip.license b/backend/test/private-api/fixtures/test.zip.license similarity index 100% rename from test/private-api/fixtures/test.zip.license rename to backend/test/private-api/fixtures/test.zip.license diff --git a/test/private-api/groups.e2e-spec.ts b/backend/test/private-api/groups.e2e-spec.ts similarity index 100% rename from test/private-api/groups.e2e-spec.ts rename to backend/test/private-api/groups.e2e-spec.ts diff --git a/test/private-api/history.e2e-spec.ts b/backend/test/private-api/history.e2e-spec.ts similarity index 100% rename from test/private-api/history.e2e-spec.ts rename to backend/test/private-api/history.e2e-spec.ts diff --git a/test/private-api/me.e2e-spec.ts b/backend/test/private-api/me.e2e-spec.ts similarity index 100% rename from test/private-api/me.e2e-spec.ts rename to backend/test/private-api/me.e2e-spec.ts diff --git a/test/private-api/media.e2e-spec.ts b/backend/test/private-api/media.e2e-spec.ts similarity index 100% rename from test/private-api/media.e2e-spec.ts rename to backend/test/private-api/media.e2e-spec.ts diff --git a/test/private-api/notes.e2e-spec.ts b/backend/test/private-api/notes.e2e-spec.ts similarity index 100% rename from test/private-api/notes.e2e-spec.ts rename to backend/test/private-api/notes.e2e-spec.ts diff --git a/test/private-api/register-and-login.e2e-spec.ts b/backend/test/private-api/register-and-login.e2e-spec.ts similarity index 100% rename from test/private-api/register-and-login.e2e-spec.ts rename to backend/test/private-api/register-and-login.e2e-spec.ts diff --git a/test/private-api/tokens.e2e-spec.ts b/backend/test/private-api/tokens.e2e-spec.ts similarity index 100% rename from test/private-api/tokens.e2e-spec.ts rename to backend/test/private-api/tokens.e2e-spec.ts diff --git a/test/private-api/users.e2e-spec.ts b/backend/test/private-api/users.e2e-spec.ts similarity index 100% rename from test/private-api/users.e2e-spec.ts rename to backend/test/private-api/users.e2e-spec.ts diff --git a/test/public-api/alias.e2e-spec.ts b/backend/test/public-api/alias.e2e-spec.ts similarity index 100% rename from test/public-api/alias.e2e-spec.ts rename to backend/test/public-api/alias.e2e-spec.ts diff --git a/test/public-api/fixtures/test.png b/backend/test/public-api/fixtures/test.png similarity index 100% rename from test/public-api/fixtures/test.png rename to backend/test/public-api/fixtures/test.png diff --git a/test/public-api/fixtures/test.png.license b/backend/test/public-api/fixtures/test.png.license similarity index 100% rename from test/public-api/fixtures/test.png.license rename to backend/test/public-api/fixtures/test.png.license diff --git a/test/public-api/fixtures/test.zip b/backend/test/public-api/fixtures/test.zip similarity index 100% rename from test/public-api/fixtures/test.zip rename to backend/test/public-api/fixtures/test.zip diff --git a/test/public-api/fixtures/test.zip.license b/backend/test/public-api/fixtures/test.zip.license similarity index 100% rename from test/public-api/fixtures/test.zip.license rename to backend/test/public-api/fixtures/test.zip.license diff --git a/test/public-api/me.e2e-spec.ts b/backend/test/public-api/me.e2e-spec.ts similarity index 100% rename from test/public-api/me.e2e-spec.ts rename to backend/test/public-api/me.e2e-spec.ts diff --git a/test/public-api/media.e2e-spec.ts b/backend/test/public-api/media.e2e-spec.ts similarity index 100% rename from test/public-api/media.e2e-spec.ts rename to backend/test/public-api/media.e2e-spec.ts diff --git a/test/public-api/notes.e2e-spec.ts b/backend/test/public-api/notes.e2e-spec.ts similarity index 100% rename from test/public-api/notes.e2e-spec.ts rename to backend/test/public-api/notes.e2e-spec.ts diff --git a/test/test-setup.ts b/backend/test/test-setup.ts similarity index 100% rename from test/test-setup.ts rename to backend/test/test-setup.ts diff --git a/test/tsconfig.json b/backend/test/tsconfig.json similarity index 100% rename from test/tsconfig.json rename to backend/test/tsconfig.json diff --git a/test/tsconfig.json.license b/backend/test/tsconfig.json.license similarity index 100% rename from test/tsconfig.json.license rename to backend/test/tsconfig.json.license diff --git a/test/utils.ts b/backend/test/utils.ts similarity index 100% rename from test/utils.ts rename to backend/test/utils.ts diff --git a/tsconfig.build.json b/backend/tsconfig.build.json similarity index 100% rename from tsconfig.build.json rename to backend/tsconfig.build.json diff --git a/tsconfig.build.json.license b/backend/tsconfig.build.json.license similarity index 100% rename from tsconfig.build.json.license rename to backend/tsconfig.build.json.license diff --git a/tsconfig.json b/backend/tsconfig.json similarity index 100% rename from tsconfig.json rename to backend/tsconfig.json diff --git a/tsconfig.json.license b/backend/tsconfig.json.license similarity index 100% rename from tsconfig.json.license rename to backend/tsconfig.json.license diff --git a/yarn.lock b/backend/yarn.lock similarity index 100% rename from yarn.lock rename to backend/yarn.lock diff --git a/yarn.lock.license b/backend/yarn.lock.license similarity index 100% rename from yarn.lock.license rename to backend/yarn.lock.license