Aadhaar-based Digital Document Signing SDK for Java, Android, and JavaScript. Supports India's eSign framework (both v2.1 OTP-based and v3.2 eKYC-based flows).
IMPORTANT: This repository contains configuration files that require sensitive credentials. Never commit actual credentials, certificates, or license files to version control.
- All configuration files ending in
.propertiesandconfig.jsare gitignored - Use the provided
.exampletemplate files as references - Store credentials securely using environment variables or secret managers
- See SECURITY.md for complete security guidelines
- Features
- Quick Start
- Package Contents
- Configuration
- Architecture
- Development Workflow
- API Documentation
- Security Guidelines
- Contributing
- License
- eSign 2.1 Support: OTP-based digital document signing
- eSign 3.2 Support: eKYC-based signing flow with enhanced verification
- Multi-Platform SDKs: Java/Spring Boot, Android AAR, JavaScript/Node.js
- REST API: Full-featured API with webhook support
- Web UI: Browser-based signing interface
- PDF Signing: iText-based digital signatures compliant with Indian standards
- Transaction Management: Complete audit trail and transaction tracking
- Async Processing: Optional Kafka integration for high-throughput scenarios
# Windows (Run as Administrator)
install-prerequisites.bat
# Linux/Mac
chmod +x *.sh
./install-prerequisites.sh# Windows
build.bat
# Linux/Mac
./build.shCopy the example configuration files and add your credentials:
# eSign API
cp esign-api/src/main/resources/application.properties.example esign-api/src/main/resources/application.properties
# Tomcat eSign (Web UI)
cp tomcat_esign/src/main/resources/application.properties.example tomcat_esign/src/main/resources/application.properties
# Sample Node.js App
cp "SampleSign2_Single Sign/config.js.example" "SampleSign2_Single Sign/config.js"Edit the files with your actual credentials (ASP ID, certificate password, etc.)
# Windows
start.bat
# Linux/Mac
./start.shngrok http 8081Copy the ngrok URL and update api.base-url in application.properties, then restart the server (no rebuild needed!).
| What Changed | Action |
|---|---|
application.properties |
Just restart! |
| ngrok URL | Just restart! |
| License files | Just restart! |
| Java code (.java) | Rebuild required |
Configuration files to edit:
esign-api/src/main/resources/application.properties ← Main config (edit this)
tomcat_esign/src/main/resources/application.properties ← Web UI config (if needed)
esign_github/
├── esign-api/ # REST API Layer (Spring Boot, Port 8081)
│ ├── src/main/java/ # Java source files
│ ├── src/main/resources/ # Configuration files
│ └── pom.xml # Maven build file
│
├── tomcat_esign/ # Core SDK + Web UI (Spring Boot, Port 8080)
│ ├── src/main/java/ # Java source files
│ ├── src/main/resources/ # Configuration files
│ └── pom.xml # Maven build file
│
├── esign-javascript-sdk-complete/ # JavaScript SDK (Browser & Node.js)
│ ├── src/ # Source code
│ ├── examples/ # Usage examples
│ └── package.json # npm package config
│
├── esign-android-sdk-complete/ # Android SDK
│ ├── esign-sdk/ # Android library project
│ ├── samples/ # Integration examples
│ └── docs/ # Documentation
│
├── SampleSign2_Single Sign/ # Standalone Node.js eSign sample app
│ ├── server.js # Express server
│ ├── services/ # Service modules
│ └── routes/ # API routes
│
├── documentation/ # MkDocs documentation site
│ ├── docs/ # Documentation markdown
│ └── mkdocs.yml # MkDocs config
│
├── test-requests/ # API test request payloads
├── build.bat / build.sh # Build scripts
├── start.bat / start.sh # Start REST API
├── start-ui.bat / start-ui.sh # Start Web UI (optional)
└── install-prerequisites.* # Auto-install Java, Maven, ngrok
Obtain these from your eSign service provider (Capricorn Technologies):
| Credential | Description | Example |
|---|---|---|
esign.asp.id |
Your assigned ASP ID | youraspid |
esign.certificate.password |
PFX certificate password | yourpassword |
api.auth.token |
API authentication token | YOUR_TOKEN |
api.auth.key |
API authentication key | YOUR_KEY |
esign.3_2.signer.id |
eSign 3.2 signer ID | user@domain.Provider |
Place your certificate and license files in:
esign-api/config/privatekey.pfx # PFX certificate file
esign-api/config/eSignLicense # Binary license file
tomcat_esign/config/privatekey.pfx # PFX certificate file
tomcat_esign/config/eSignLicense # Binary license file
These files are gitignored and must never be committed!
┌──────────────────────────────────────────────────────┐
│ Client Applications │
│ (Web UI, Mobile Apps, Third-party APIs) │
└────────────────┬─────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────┐
│ eSign REST API (Port 8081) │
│ Spring Boot + eSign SDK + iText │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ eSign 2.1 │ │ eSign 3.2 │ │ Webhook │ │
│ │ (OTP) │ │ (eKYC) │ │ Callbacks │ │
│ └─────────────┘ └──────────────┘ └──────────────┘ │
└────────────────┬─────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────┐
│ eSign Service Provider (ESP) │
│ (Aadhaar eSign Infrastructure) │
└──────────────────────────────────────────────────────┘
| Component | Technology |
|---|---|
| Backend | Java 17, Spring Boot 3.2.0 |
| PDF Signing | iText 5.5.13.3 |
| Cryptography | Bouncy Castle 1.64 |
| HTTP Client | OkHttp 4.12.0 |
| Android SDK | minSdk 21, compileSdk 34 |
| JavaScript SDK | Node.js + Browser |
First time setup:
install-prerequisites → build → configure → start
After config changes:
Edit application.properties → restart (NO rebuild!)
After code changes:
build → start
After adding new dependencies:
build → start
# Windows
api-test.bat
# Linux/Mac
./api-test.shSee API_TESTING_GUIDE.md for detailed API examples.
Test request payloads are in test-requests/ directory.
- ✅ Source code
- ✅ Configuration templates (
.examplefiles) - ✅ Documentation
- ✅ Build scripts
- ✅ Example/test files (without credentials)
- ❌ Actual credentials, tokens, or passwords
- ❌
.pfxor.p12certificate files - ❌ License files (
eSignLicense) - ❌
application.propertieswith real credentials - ❌
node_modules/,target/,.gradle/ - ❌ Uploaded documents or signed PDFs
- ❌ Transaction data or logs
- Use environment variables for sensitive data in production
- Rotate credentials regularly
- Use separate credentials for development/production
- Never log sensitive information
- Use
.gitignoreto prevent accidental commits
See SECURITY.md for complete guidelines.
We welcome contributions! Please see CONTRIBUTING.md for details on:
- Code of Conduct
- Development process
- Submitting pull requests
- Coding standards
This project is proprietary software. All rights reserved.
© 2025 Capricorn Technologies
Unauthorized copying, distribution, or modification of this software is strictly prohibited without express written permission from Capricorn Technologies.
- Documentation: See documentation/docs/
- Issues: Open a GitHub Issue
- Email: support@capricorn.online
- Version: 1.0.0
- Release Date: December 15, 2025
- Status: Stable
See CHANGELOG.md for version history.