Skip to content

Latest commit

Β 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

PCM Logo

PCM - Profile & Consent Manager

A privacy-first, open-source identity & GDPR consent platform

License Java Spring Boot CI/CD Security Policy


πŸš€ Quick Start

# Clone the repository
git clone https://github.com/Sympol/pcm.git
cd pcm

# Start infrastructure (PostgreSQL, Redis, Kafka, Vault)
docker-compose up -d

# Build all modules
mvn clean install -DskipTests

# Run the application
mvn spring-boot:run -pl pcm-infrastructure-spring

Refer to the Quick Start Guide for detailed onboarding.


πŸ“– Overview

PCM is a modular monolith that serves as the single source of truth for user profiles and GDPR-compliant consent management. It is built around four bounded contexts β€” Profile, Consent, Preference, and Segment β€” each with a pure domain layer that is completely free of framework dependencies.

  • βœ… Open source (Apache 2.0)
  • βœ… Privacy-by-design β€” immutable consent ledger, cryptographic erasure, AES-256-GCM PII encryption
  • βœ… Framework-agnostic domain β€” domain and application layers have zero Spring/JPA dependencies
  • βœ… Cloud-native β€” Kubernetes-ready, OpenTelemetry-native, stateless
  • βœ… Infrastructure portable β€” PostgreSQL/MySQL, Kafka/RabbitMQ, AWS/Azure/GCP KMS
  • βœ… GDPR-compliant β€” consent ledger, right to erasure, audit trail, blind indexing for encrypted search

πŸ“œ The Genesis: From Complexity to Clarity

PCM did not come from nowhere. It emerged from a concrete challenge within a social project for a startup.

1. The Initial Candidate: Apache Unomi

We initially chose Apache Unomi as our Customer Data Platform (CDP). It offered a comprehensive suite for profile tracking and real-time segmentation.

2. The Limits of Heavy Machinery

As our requirements for Data Sovereignty and Extreme Security grew, we encountered significant friction:

  • Operational Complexity: The Apache Karaf/OSGi architecture added heavy overhead and a steep learning curve for our team.
  • Security-by-Design: We needed native, transparent PII encryption (via HashiCorp Vault) as a foundational layer, which was difficult to "bolt on" to an existing engine.
  • Infrastructure Overhead: A mandatory Elasticsearch dependency for all profile operations was overkill for our primary identity management needs.

3. The Pivot to PCM

We decided to build a platform focused on the core: Identity, Consent, and Protection. By leveraging Spring Boot 3, Clean/Hexagonal Architecture, and HashiCorp Vault, we created a lean, high-performance alternative that prioritizes the security of citizens' data above all else.

Today, PCM is open-sourced to empower other developers facing similar challenges in building privacy-first applications.


🧩 Architecture

PCM is a modular monolith using Hexagonal Architecture with four bounded contexts deployed as a single Spring Boot application:

Bounded Context Responsibility Key Entities
Profile User identity, handle management, dynamic attributes Profile, ProfileId, Handle
Consent GDPR consent collection, immutable ledger, legal proof Consent, ConsentEvent, ConsentPurpose
Segment User classification and real-time segmentation Segment, SegmentCriteria
Preference UX preferences (language, theme, notifications) Preference, PreferenceKey

Module Structure

pcm/
β”œβ”€β”€ pcm-domain/                      # Shared domain concepts (encryption interfaces)
β”œβ”€β”€ preference-context/
β”‚   β”œβ”€β”€ preference-domain/           # Pure Java β€” zero framework deps
β”‚   β”œβ”€β”€ preference-application/      # Use cases β€” pure Java
β”‚   └── preference-infrastructure/   # JPA entities, Spring Data adapters
β”œβ”€β”€ profile-context/
β”‚   β”œβ”€β”€ profile-domain/
β”‚   β”œβ”€β”€ profile-application/
β”‚   └── profile-infrastructure/
β”œβ”€β”€ consent-context/
β”‚   β”œβ”€β”€ consent-domain/
β”‚   β”œβ”€β”€ consent-application/
β”‚   └── consent-infrastructure/
β”œβ”€β”€ segment-context/
β”‚   β”œβ”€β”€ segment-domain/
β”‚   β”œβ”€β”€ segment-application/
β”‚   └── segment-infrastructure/
β”œβ”€β”€ pcm-infrastructure-spring/       # Unified Spring Boot application
β”‚   β”œβ”€β”€ web/                         # REST controllers
β”‚   β”œβ”€β”€ config/                      # Spring configuration & DI wiring
β”‚   β”œβ”€β”€ encryption/                  # AES-256-GCM, KMS adapters, key management
β”‚   └── PcmApplication.java
β”œβ”€β”€ charts/                          # Helm charts for Kubernetes
β”œβ”€β”€ docs/                            # ADRs, guides, API reference
└── docker-compose.yml               # Local development environment

Communication

  • Inter-context: Internal Spring event bus (ApplicationEventPublisher) β€” synchronous, transactional, no network calls
  • Observability: OpenTelemetry native (traces & metrics exporters)
  • Security: JWT / OAuth2 resource server, mTLS between services, Keycloak for IAM

PII Encryption

All sensitive fields are encrypted at rest using AES-256-GCM with envelope encryption (DEK/KEK pattern). Keys are managed via HashiCorp Vault, AWS KMS, Azure Key Vault, or GCP Cloud KMS. See PII Encryption Architecture for details.


βš™οΈ Configuration

PCM uses environment variables for all configuration. No mandatory Config Server.

Key settings:

Variable Description Default
SPRING_DATASOURCE_URL Database connection URL jdbc:postgresql://localhost:5432/pcm_db
PCM_ENCRYPTION_PROVIDER KMS provider (vault, aws, azure, gcp, local) local
PCM_ENCRYPTION_KEY Master key (local mode only) β€”
VAULT_URI HashiCorp Vault address http://localhost:8200

See Infrastructure Portability for the full configuration reference.


πŸ“š Documentation


πŸ”Œ Ecosystem

PCM core is intentionally focused on generic GDPR consent management. After careful consideration, we decided to move IAB TCF support out of the core platform entirely.

Why TCF was removed from PCM core

The IAB Transparency & Consent Framework is an advertising-industry standard designed to legitimize large-scale tracking. This is fundamentally at odds with PCM's privacy-first mission. The Belgian Data Protection Authority (APD) ruled in 2022 that TCF does not satisfy GDPR requirements as designed. Keeping TCF in the core would send a contradictory signal about what PCM stands for.

The decision was not taken lightly β€” TCF support was initially built and tested as part of the consent context. After reflection, we concluded that the right architecture is a clean separation: PCM core handles generic GDPR consent, and TCF is an opt-in external module for organizations that specifically need it.

See ADR-004 for the full rationale and implementation details.

External modules

  • pcm-tcf-adapter (coming soon β€” deployed independently): IAB TCF 2.x support for organizations that need advertising consent management. Deployed as a standalone service that calls PCM's consent API to translate TC Strings into generic consent operations. It has no impact on PCM core and can be adopted without modifying the platform.

πŸ“ Notes

Note

The logo was generated using the following prompt: A modern, high-tech logo for an open-source platform named 'PCM' (Profile & Consent Manager). The design should feature a stylized digital profile head and a shield or padlock to represent privacy and consent. Use a professional color palette like deep blue, vibrant cyan, and slate grey. The aesthetic should be clean, minimalist, and premium, suitable for a GitHub header. No text other than 'PCM'. White background or transparent-like aesthetic.

About

PCM is a platform focused on identity, consent, and data protection. It prioritizes sovereignty, native security, and the confidentiality of citizens' data.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages