Skip to content

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ΒΆ

# Install all dependencies
pnpm install

πŸ—οΈ 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:

  1. Domain-driven clarity: Business logic, infrastructure, and cross-cutting concerns are clearly separated
  2. Code Sharing: Common utilities and types can be shared between applications
  3. Unified Tooling: Single configuration for linting, formatting, and testing
  4. Atomic Changes: Related changes across applications can be made in single commits
  5. Efficient CI/CD: Build and test processes can be optimized for the entire workspace
  6. Developer Experience: Single repository clone with all related code