The .dockerignore was excluding package-lock.json, causing npm ci to fail
with "The npm ci command can only install with an existing package-lock.json".
Commented out the package-lock.json line in .dockerignore to allow it to be
copied into the Docker build context.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
GitHub Actions cache (type=gha) is not available in Gitea, causing timeout errors.
Replaced with registry-based cache which works with any container registry.
Changes:
- Backend: cache-from/to type=registry,ref=backend:buildcache
- Frontend: cache-from/to type=registry,ref=frontend:buildcache
- Removed debug step that's no longer needed
This allows Docker layer caching while maintaining Gitea compatibility.
Images are successfully being pushed to rg.fr-par.scw.cloud/weworkstudio
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed invalid Docker tag format errors:
- Removed :preprod suffix from base image names in metadata action
- docker/metadata-action already adds branch-based tags automatically
- Unified registry to rg.fr-par.scw.cloud/weworkstudio for both backend and frontend
- This fixes "invalid reference format" error
Before: backend:preprod:preprod (invalid - duplicate tags)
After: backend:preprod (valid)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Set explicit "builder": "tsc" in nest-cli.json
- Simplified tsconfig.build.json to only extend base config
- Updated build script back to `nest build && tsc-alias`
This ensures NestJS uses the TypeScript compiler that properly respects path mappings in tsconfig.json.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed build script from `nest build` to `tsc -p tsconfig.build.json`
- This ensures TypeScript path aliases (@domain/*, @application/*, @infrastructure/*) are properly resolved during compilation
- tsc-alias then converts the resolved paths to relative imports in the output
- Reverted tsconfig.json to original baseUrl: "./" configuration
- Added explicit path aliases to tsconfig.build.json for clarity
Root cause: NestJS's `nest build` command doesn't fully support TypeScript path aliases out of the box. Using `tsc` directly ensures proper path resolution.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed baseUrl from "./" to "./src" and updated paths to be relative
to src directory. This allows TypeScript to correctly resolve imports
using @domain/*, @application/*, and @infrastructure/* aliases during
compilation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed the deploy-preprod.yml workflow to match the actual project structure.
## Problem
The workflow was configured for a monorepo structure (apps/backend/, apps/frontend/)
but the project is actually a single backend repository with all code at the root.
This caused the CI/CD pipeline to fail as it couldn't find files in apps/backend/.
## Changes Made
### Backend Job (backend-build-test)
- Removed `working-directory: ./apps/backend` directive
- Changed `cache-dependency-path` from `apps/backend/package-lock.json` to `package-lock.json`
- Changed artifact upload path from `apps/backend/dist` to `dist`
### Docker Build (backend-docker)
- Changed Dockerfile path from `./apps/backend/Dockerfile` to `./Dockerfile`
### Frontend Jobs Removed
- Deleted `frontend-build-test` job (no frontend in this repo)
- Deleted `frontend-docker` job
- Removed frontend deployment steps from `deploy-preprod` job
- Removed frontend health checks and smoke tests
- Updated deployment notifications to only show backend
### Dependencies
- Updated `deploy-preprod` job to only depend on `backend-docker`
- Removed all references to `frontend-build-test` and `frontend-docker`
## Verification
✅ Local build successful: `npm run build`
✅ All 102 unit tests passing: `npm test`
✅ ESLint validation passes: `npm run lint`
✅ dist/ directory created (3.7MB)
✅ Workflow file validates without errors
This fix ensures the CI/CD pipeline will work correctly with the actual project structure.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed the backend build failure that was causing 95 TypeScript compilation errors.
## Problem
TypeScript compiler could not resolve path aliases (@domain/*, @application/*,
@infrastructure/*) during the build process, resulting in "Cannot find module" errors.
## Root Cause
The tsconfig.json had `baseUrl: "."` instead of `baseUrl: "./"`, which caused
module resolution to fail when NestJS performed the build.
## Solution
Changed `baseUrl` from `"."` to `"./"` in apps/backend/tsconfig.json to ensure
TypeScript properly resolves the path aliases relative to the project root.
## Verification
- ✅ Build completes without errors
- ✅ All 102 unit tests passing
- ✅ ESLint validation passes
- ✅ tsc-alias correctly converts path aliases to relative imports in dist/
This fix unblocks the CI/CD pipeline for preprod deployment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace all ../../domain/ imports with @domain/ across 67 files
- Configure NestJS to use tsconfig.build.json with rootDir
- Add tsc-alias to resolve path aliases after build
- This fixes 'Cannot find module' TypeScript compilation errors
Fixed files:
- 30 files in application layer
- 37 files in infrastructure layer
- Replace all ../../domain/ imports with @domain/ across 67 files
- Configure NestJS to use tsconfig.build.json with rootDir
- Add tsc-alias to resolve path aliases after build
- This fixes 'Cannot find module' TypeScript compilation errors
Fixed files:
- 30 files in application layer
- 37 files in infrastructure layer
Replace all @domain/ports/out/* imports with relative paths to fix TypeScript
compilation errors in CI/CD environment.
The issue was that TypeScript compiler (tsc) used by nest build doesn't
resolve path aliases by default. While tsconfig-paths works at runtime and
in development, it doesn't help during compilation.
Changes:
- Convert @domain/ports/out/* to relative paths (../../domain/ports/out/, etc.)
- Remove tsc-alias dependency (no longer needed)
- Revert build script to "nest build" only
This ensures the build works consistently in both local and CI/CD environments.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add tsc-alias to resolve @domain/*, @application/*, and @infrastructure/*
path aliases to relative paths in the compiled JavaScript output.
This fixes the 95 TypeScript "Cannot find module" errors in CI/CD that
occurred because nest build (tsc) doesn't resolve path aliases by default.
Changes:
- Install tsc-alias as dev dependency
- Update build script to run tsc-alias after nest build
- Remove temporary fix-imports.js script
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>