An open-source consent management system compliant with India's DPDP Act, 2023.
Note: This solution is currently in Public Preview. While we encourage developers to integrate it for sandbox testing and experimentation, please be aware it is not yet production-ready. We highly value your feedback. Please email us with any questions or issues you encounter.
Before you begin, ensure you have the following software installed on your development machine or server:
-
Java Development Kit (JDK) 17 or higher: Required to build and run the Java application.
- Installation Steps:
- Linux (Ubuntu/Debian):
sudo apt update sudo apt install openjdk-17-jdk
- Windows: Download the JDK 17 installer from Oracle (requires account) or Adoptium (Eclipse Temurin, recommended open-source distribution) and follow the installation wizard. Ensure
JAVA_HOMEenvironment variable is set and%JAVA_HOME%\binis in your system'sPath.
- Linux (Ubuntu/Debian):
- Verification:
java -version javac -version
- Installation Steps:
-
Apache Maven 3.6.0 or higher: Project build automation tool.
- Installation Steps:
- Linux (Ubuntu/Debian):
sudo apt install maven
- Windows: Download the Maven binary zip from the Apache Maven website, extract it, and add the
bindirectory to your system'sPathenvironment variable.
- Linux (Ubuntu/Debian):
- Verification:
mvn -v
- Installation Steps:
-
Docker Desktop (or Docker Engine + Docker Compose): Essential for containerizing and running the application and database locally.
- Installation Steps:
- Windows: Download and install Docker Desktop from the official Docker website.
- Linux: Follow the official Docker Engine installation guide for your specific distribution (e.g., Docker Docs). Install Docker Compose separately if using Docker Engine.
- Configuration & Verification (Windows Specific):
- Ensure WSL 2 is enabled and configured. Open PowerShell as Administrator and run
wsl --installorwsl --update. - Verify virtualization (Intel VT-x / AMD-V) is enabled in your computer's BIOS/UEFI settings.
- Start Docker Desktop and wait for the whale icon in the system tray to turn solid.
- Ensure WSL 2 is enabled and configured. Open PowerShell as Administrator and run
- Verification:
docker --version docker compose version # Or docker-compose --version for older installations
- Installation Steps:
-
Git: For cloning the repository.
- Installation Steps:
- Linux (Ubuntu/Debian):
sudo apt install git
- Windows: Download the Git for Windows installer from git-scm.com and follow the installation wizard.
- Linux (Ubuntu/Debian):
- Verification:
git --version
- Installation Steps:
Follow these steps to get the TSI Aadhaar Vault Plus solution running on your local machine using Docker Compose:
-
Clone the Repository:
git clone https://github.com/tsi-coop/tsi-dpdp-cms.git cd tsi-dpdp-cms -
Create
.envFile: This file stores sensitive configurations (passwords, API keys, etc.) and is NOT committed to Git.cp .example .env
Now, edit the newly created
.envfile and fill in the placeholder values. -
Build the Java WAR File: Navigate to the project root and build your Java application.
mvn clean package
This will create
target/tsi_dpdp_cms.war -
Initialize PostgreSQL Database Schema: The
postgresDocker image only runs initialization scripts on its first startup when the data directory is empty. To ensure your schema is loaded:docker-compose down -v
-
Build and Start Docker Services: This command will build your application's Docker image and start both the PostgreSQL database and the Jetty application.
docker-compose up --build -d
--build: Ensures Docker images are rebuilt, picking up any changes in your Java code or Dockerfile.-d: Runs the containers in detached mode (in the background).
-
Verify Services and Check Logs:
- Check if containers are running:
docker ps - Monitor PostgreSQL logs for schema initialization:
docker-compose logs -f postgres_db - Monitor Jetty application logs for successful deployment:
docker-compose logs -f jetty_app
- Check if containers are running:
These steps describe how to install and run the TSI DPDP CMS solution directly on a Linux/Windows server without using Docker.
-
Clone the Repository:
git clone https://github.com/tsi-coop/tsi-dpdp-cms.git cd tsi-dpdp-cms -
PostgreSQL Database Setup:
- Log in as the PostgreSQL superuser (e.g.,
postgresuser on Linux).
sudo -i -u postgres psql
- Create the database and user:
CREATE DATABASE <<your-db-name-here>>; CREATE USER <<your-db-user-here>> WITH ENCRYPTED PASSWORD '<<your_db_password_here>>'; GRANT ALL PRIVILEGES ON DATABASE <<your-db-name-here>> TO <<your-db-user-here>>;
- Exit the postgres user:
exit - Initialize Schema: Execute the
db/init.sqlscript to create the necessary tables.
psql -U <<your-db-user-here>> -d <<your-db-name-here>> -h localhost -f /path/to/tsi-dpdp-cms/db/init.sql - Log in as the PostgreSQL superuser (e.g.,
-
Build WAR:
cd /path/to/tsi-dpdp-cms mvn clean packageThis will generate
target/tsi-dpdp-cms.war. -
Deploy Solution (linux):
cd /path/to/tsi-dpdp-cms/server cp .example .envNow, edit the newly created
.envfile and fill in the placeholder values../set-base.sh #Sets the jetty base directory ./serve.sh # Copies the target/tsi-dpdp-cms.war to %JETTY_BASE%/webapps/ROOT.war. Starts the server in 8080
-
Deploy Solution (windows):
cd /path/to/tsi-dpdp-cms/server copy .example .envNow, edit the newly created
.envfile and fill in the placeholder values.set-base.bat #Sets the jetty base directory serve.bat # Copies the target/tsi_dpdp_cms.war to %JETTY_BASE%/webapps/ROOT.wat. Starts the server in 8080