Workspace Structure
βββ docs/ # Documentation
βββ deployment/ # Docker Compose configurations
βββ package.json # Root workspace configuration
βββ pnpm-workspace.yaml # pnpm workspace definition
βββ docker-compose.yml # Development compose file
ποΈ ApplicationsΒΆ
Backend (@eudiplo/backend)ΒΆ
- Technology: NestJS with TypeScript
- Purpose: Core API server for EUDI Wallet integration
- Port: 3000
- Key Features:
- OID4VCI, OID4VP, SD-JWT VC support
- OAuth2 authentication
- Pluggable key management
- Database abstraction
Client (@eudiplo/client)ΒΆ
- Technology: Angular with TypeScript
- Purpose: Web interface for EUDIPLO management
- Port: 4200
- Key Features:
- Credential issuance configuration
- Presentation request management
- Real-time monitoring
- Admin dashboard
Webhook (test-rp)ΒΆ
- Technology: Cloudflare Worker
- Purpose: Testing relying party implementation
- Key Features:
- Webhook endpoints for testing
- Presentation verification
- Development utilities
π§ Workspace CommandsΒΆ
The workspace provides several convenient commands:
DevelopmentΒΆ
ποΈ Applications & DomainsΒΆ
Backend (@eudiplo/backend)ΒΆ
- Technology: NestJS with TypeScript
- Purpose: Core API server for EUDI Wallet integration
- Port: 3000
- Structure: Domain-driven, modular
- core/: Platform infrastructure (health, metrics, app info)
- shared/: Utilities, guards, filters, helpers
- issuer/: Credential Issuer (configuration, issuance, lifecycle)
- verifier/: Presentation Verifier (presentation, offer, OID4VP)
- registrar/: Entity onboarding and registry
- auth/, crypto/, database/, session/, storage/: Infrastructure modules
Client (@eudiplo/client)ΒΆ
- Technology: Angular with TypeScript
- Purpose: Web interface for EUDIPLO management
- Port: 4200
- Features: Credential config, presentation management, monitoring, admin dashboard
Webhook (@eudiplo/webhook)ΒΆ
- Technology: Cloudflare Worker
- Purpose: Testing relying party implementation
- Features: Webhook endpoints, presentation verification
SDK (@eudiplo/eudiplo-sdk)ΒΆ
- Technology: TypeScript
- Purpose: Programmatic access to EUDIPLO APIs
Other PackagesΒΆ
- schemas/: JSON Schemas for API/data validation
- assets/: Static configuration, root trust lists, uploads
- monitor/: Prometheus/Grafana monitoring setup
# Check code quality across workspace
pnpm run lint
pnpm run format:check
# Fix issues automatically
pnpm run lint:fix
pnpm run format
π³ Docker & DeploymentΒΆ
Each application has its own optimized Dockerfile:
- Backend:
apps/backend/Dockerfile(multi-stage build) - Client:
apps/client/Dockerfile(Angular build, nginx serving) - Webhook:
apps/webhook/Dockerfile(Cloudflare Worker)
The root docker-compose.yml orchestrates all main services:
# Start both services
docker compose up -d
# Build and start
docker compose up -d --build
# View logs
docker compose logs -f
π¦ Dependency ManagementΒΆ
The workspace uses pnpm for efficient dependency management:
- Shared dependencies are hoisted to the root
node_modules - App-specific dependencies remain in their respective
node_modules - Lockfile (
pnpm-lock.yaml) ensures consistent installs across environments
Adding DependenciesΒΆ
# Add to workspace root (shared utilities)
pnpm add dependency-name
# Add to specific application
pnpm --filter @eudiplo/backend add dependency-name
pnpm --filter @eudiplo/client add dependency-name
π BenefitsΒΆ
This workspace structure provides:
- Domain-driven clarity: Business logic, infrastructure, and cross-cutting concerns are clearly separated
- Code Sharing: Common utilities and types can be shared between applications
- Unified Tooling: Single configuration for linting, formatting, and testing
- Atomic Changes: Related changes across applications can be made in single commits
- Efficient CI/CD: Build and test processes can be optimized for the entire workspace
- Developer Experience: Single repository clone with all related code