Combat AI-generated misinformation with invisible watermarking technology
One-Click Deployment: Click the "Deploy with Vercel" button above to instantly deploy the frontend.
Full Documentation: See DEPLOYMENT_GUIDE.md for complete setup instructions.
A comprehensive, cloud-native service for proving digital content authenticity using invisible watermarking technology.
- Frontend: Next.js with TypeScript on Vercel Edge Network
- Backend: AWS SAM with serverless architecture
- Status: Production Ready
-
Generate Upload URL:
aws lambda invoke --function-name hatchmark-generate-url-dev \ --payload '{"file_name": "artwork.jpg"}' response.json -
Register Asset:
aws lambda invoke --function-name hatchmark-register-asset-dev \ --payload '{"bucket": "BUCKET_NAME", "key": "artwork.jpg"}' response.json -
Verify Asset:
aws lambda invoke --function-name hatchmark-verify-artwork-dev \ --payload '{"asset_id": "ASSET_ID"}' response.json
📋 View Complete Deployment Guide
Hatchmark addresses the escalating challenge of digital content authenticity in the age of generative AI. Our mission is to provide creators with an accessible, robust tool to prove the origin and timestamp of their digital works through immutable "hatch marks" recorded on a quantum ledger database.
- Serverless-First: Built on AWS Lambda, API Gateway, and Step Functions
- Immutable Ledger: Amazon DynamoDB with Point-in-Time Recovery for tamper-proof record keeping
- Dual Verification: Perceptual hashing + steganographic watermarking
- Scalable Processing: AWS Fargate for heavy watermarking tasks
- Cost-Efficient: Pay-per-use model with scale-to-zero capabilities
- AWS Lambda: Serverless compute for API endpoints
- Amazon DynamoDB: NoSQL database with Point-in-Time Recovery for immutable records
- AWS Step Functions: Workflow orchestration
- Amazon S3: Object storage for original and processed images
- AWS Fargate: Containerized watermarking service
- Amazon SQS: Message queuing for decoupled processing
- HTML5/CSS3/JavaScript: Simple, responsive web interface
- Drag & Drop API: Modern file upload experience
- Python: Core processing language
- Pillow (PIL): Image manipulation
- Steganography: Invisible watermark embedding
- ImageHash: Perceptual hash computation
hatchmark-authenticity-service/
├── backend/
│ └── src/
│ ├── handlers.py # Lambda function handlers
│ └── requirements.txt # Python dependencies
├── watermarker/
│ ├── main.py # Watermarking service
│ ├── Dockerfile # Container definition
│ └── requirements.txt # Python dependencies
├── frontend/
│ ├── index.html # Main web interface (Vite + React + Tailwind)
│ ├── src/ # React source code
│ ├── public/ # Static assets
│ └── ... # Modern frontend stack
├── deployment/
│ ├── cloudformation-template.yaml # Infrastructure as Code
│ ├── deploy.sh # Deployment script
│ └── step-functions-workflow.json # Step Functions definition
└── architecture/
└── (architecture diagrams)
- AWS Account with programmatic access
- AWS CLI configured with appropriate permissions
- Docker for containerized services
- Python 3.11+ for local development
-
Clone the repository
git clone https://github.com/MuhammadMaazA/hatchmark-authenticity-service.git cd hatchmark-authenticity-service -
Configure AWS credentials
aws configure
-
Deploy the infrastructure
chmod +x deployment/deploy.sh ./deployment/deploy.sh
-
Update frontend configuration
- Get API Gateway URL from deployment outputs
- Update the API base URL in the appropriate config or environment file in
frontend(see.envor Vite config if present)
-
Test the service
- Run the frontend locally:
cd frontend npm install npm run dev
- Open the local development URL in your browser (see terminal output) - Try registering and verifying an image - Run the frontend locally:
Everything needed to get started locally.
- DynamoDB table setup (replacing QLDB)
- Perceptual hashing Lambda
- Ledger-writing Lambda (now DynamoDB)
- Step Functions orchestration
- Steganography implementation
- Container registry (ECR)
- Fargate task definition
- SQS integration
- Verification Lambda
- Verdict logic implementation
- API Gateway route
- Basic UI framework
- Register page
- Verify page
- API integration testing
- Security audit
- Cost optimization
- Comprehensive documentation
- Presigned URLs: Secure, temporary file upload permissions
- IAM Roles: Principle of least privilege access
- Private S3 Buckets: No public access to stored images
- Encrypted Storage: Server-side encryption for all objects
- HTTPS Only: All API communications encrypted in transit
- Serverless Architecture: Pay only for actual usage
- Scale-to-Zero: Fargate tasks scale down when idle
- AWS Budgets: Automated cost alerts and monitoring
- Optimized Storage: S3 lifecycle policies for cost control
- User uploads image through web interface
- Backend generates secure presigned URL for S3
- Image uploaded directly to S3 bucket
- Step Functions workflow triggered:
- Compute perceptual hash
- Write registration to DynamoDB
- Queue watermarking task
- Fargate container processes invisible watermark
- Watermarked image stored in processed bucket
- User uploads image for verification
- System extracts watermark and computes hash
- Queries DynamoDB for matching records
- Returns verdict:
- Verified: Watermark found and valid
- Potentially Altered: Hash matches but no watermark
- Not Registered: No matching records found
# Test watermarker locally
cd watermarker
docker build -t hatchmark-watermarker .
docker run hatchmark-watermarker
# Test Lambda functions locally (requires sam-cli)
sam local start-api# Test upload URL generation
curl -X POST https://your-api-url/generate-upload-url \
-H "Content-Type: application/json" \
-d '{"filename": "test.png"}'
# Test verification endpoint
curl -X POST https://your-api-url/verify-artwork \
-F "file=@test-image.png"- CloudWatch Logs: Centralized logging for all services
- CloudWatch Metrics: Performance and cost monitoring
- Step Functions Console: Visual workflow execution tracking
- DynamoDB Console: Asset registry and transaction history
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add 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.
- Documentation: Check the
docs/directory for detailed guides - Issues: Report bugs and request features via GitHub Issues
- Discussions: Join community discussions in GitHub Discussions
- Multi-format support (video, audio, documents)
- User account management (Cognito integration)
- Public API for third-party integration
- Browser extension for web verification
- Mobile app for on-the-go verification
- < 60 seconds average notarization time
- < 2 seconds average verification time
- < $0.01 cost per transaction
- > 99.9% system reliability