A comprehensive electronic signature backend service built with Spring Boot that provides a complete digital document signing workflow.
- Document Management: Upload, organize, and manage documents in folders
- Digital Signatures: Create and manage digital signatures with audit trails
- Signature Requests: Send signature requests to multiple recipients
- Form Fields: Dynamic form field creation and assignment
- Templates: Reusable document templates for common workflows
- Notifications: Real-time notifications for signature status updates
- Activity Logging: Comprehensive audit trail for all system activities
- Document Versioning: Track document changes and versions
- Annotations: Add comments and annotations to documents
- Shared Documents: Share documents with specific users or groups
- Framework: Spring Boot 3.5.3
- Java Version: 21
- Database: MySQL
- Caching: Redis
- Messaging: Apache Kafka
- Build Tool: Maven
- ORM: Spring Data JPA
- Development Tools: Spring Boot DevTools, Lombok
Before you begin, ensure you have the following installed:
- Java 21 or higher
- Maven 3.6+ (or use the included Maven wrapper)
- Docker and Docker Compose (for running dependencies)
- MySQL 8.0+ (or use Docker)
- Redis (or use Docker)
- Apache Kafka (optional, for messaging features)
git clone <repository-url>
cd E-SignatureThe project includes a compose.yaml file to quickly start MySQL and Redis:
docker-compose up -dThis will start:
- MySQL on port 3306 (database:
mydatabase, user:myuser, password:secret) - Redis on port 6379
Update the configuration files based on your environment:
# Database Configuration
spring.datasource.url=jdbc:mysql://localhost:3306/mydatabase
spring.datasource.username=myuser
spring.datasource.password=secret
# Redis Configuration
spring.data.redis.host=localhost
spring.data.redis.port=6379
spring.cache.type=redis
# Kafka Configuration (if using)
spring.kafka.bootstrap-servers=localhost:9092
spring.kafka.consumer.group-id=esignature-groupConfigure production-specific settings as needed.
Windows:
.\mvnw.cmd spring-boot:runUnix/Linux/macOS:
./mvnw spring-boot:runmvn spring-boot:runThe application will start on http://localhost:8080
src/
βββ main/
β βββ java/com/backend/esignature/
β β βββ ESignatureApplication.java # Main application class
β β βββ cache/ # Caching configurations
β β βββ config/ # Application configurations
β β βββ controllers/ # REST API controllers
β β βββ dto/ # Data Transfer Objects
β β β βββ requests/ # Request DTOs
β β β βββ responses/ # Response DTOs
β β βββ entities/ # JPA entities
β β βββ enums/ # Enumeration classes
β β βββ exceptions/ # Custom exceptions
β β βββ mapper/ # Entity-DTO mappers
β β βββ repositories/ # Data access layer
β β βββ services/ # Business logic layer
β β βββ utils/ # Utility classes
β βββ resources/
β βββ application.properties # Main configuration
β βββ application-dev.properties # Development configuration
β βββ application-prod.properties # Production configuration
β βββ static/ # Static resources
β βββ templates/ # Template files
βββ test/ # Test classes
The application manages the following core entities:
- Users: System users and signature recipients
- Documents: Electronic documents for signing
- DocumentPages: Individual pages of documents
- DocumentVersions: Version control for documents
- DocumentFolders: Document organization
- Folders: Document storage folders
- SignatureRequests: Signature workflow requests
- SignatureRecipients: Recipients of signature requests
- DigitalSignatures: Digital signature data
- SignatureAuditTrail: Signature process audit logs
- FormFields: Dynamic form elements
- AssignedFields: Field assignments to recipients
- Templates: Reusable document templates
- RequestTemplates: Template-based requests
- Annotations: Document annotations and comments
- Comments: User comments on documents
- SharedDocuments: Document sharing management
- RequestNotifications: Notification management
- ActivityLogs: System activity tracking
The application provides RESTful APIs for:
- Document management (upload, download, organize)
- Signature request workflows
- Digital signature creation and verification
- User management
- Template management
- Notification handling
- Activity tracking
Note: Detailed API documentation will be available once the controllers are implemented.
./mvnw test./mvnw clean packageThe JAR file will be created in the target/ directory.
The project uses:
- Lombok for reducing boilerplate code
- Spring Boot DevTools for development productivity
- JPA for database interactions
- Maven for dependency management
The project includes Docker Compose support for easy dependency management. You can extend this to containerize the entire application:
# Add to compose.yaml for the application
app:
build: .
ports:
- "8080:8080"
depends_on:
- mysql
- redis
environment:
- SPRING_PROFILES_ACTIVE=prodThe application supports multiple profiles:
- dev: Development environment (default)
- prod: Production environment
- test: Testing environment
Switch profiles by setting:
spring.profiles.active=prod- Configure proper database credentials
- Set up SSL/TLS for production
- Implement authentication and authorization
- Secure API endpoints
- Configure proper CORS settings
- Set up audit logging
The application includes:
- Spring Boot Actuator (when enabled)
- Comprehensive activity logging
- Audit trail for all signature operations
- Error tracking and reporting
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the documentation
- Review the application logs
This project is currently in development. Core features being implemented:
- API Controllers
- Service Layer Implementation
- Entity Relationships
- Authentication & Authorization
- File Upload/Download
- Digital Signature Processing
- Notification System
- Template Management
Happy Coding! π