How vihanga-bandara/g9-ss works
Tatou is a web platform for uploading PDFs, issuing watermarked copies, and reading watermark secrets. Its main workflow runs from an authenticated browser request through Flask routes and service logic, into PDF storage and watermark processing, with results returned as PDFs or JSON. The repository also includes account flows, PDF structure exploration, a command-line watermarking interface, multiple watermark algorithms, and optional RMAP distribution. Relationships below use the shown source references and README; several route and algorithm details are indexed but not excerpted.
Main entry points: server.py Flask app · watermarking_utils.py Method registry · watermark_service.py Watermark service · document_service.py Document service
Components 22
Web application
- Flask app
server/src/server.py - Web pages
server/src/pages.py - Account routes
server/src/auth.py - Document routes
server/src/documents.py - Watermark routes
server/src/watermarks.py
Domain services
- Authentication
server/src/auth_service.py - Document service
server/src/document_service.py - Watermark service
server/src/watermark_service.py - Application database
db/tatou.sql - PDF storage
- Service errors
server/src/service_errors.py
Watermarking
- Method contract
server/src/watermarking_method.py - Method registry
server/src/watermarking_utils.py - DWT-SVD method
server/src/dwt_svd_v2.py - Repeated text method
server/src/TeosRepeatedWatermark.py - EOF methods
server/src/add_after_eof.py - Ghost text method
server/src/ghost_text.py - Watermark CLI
server/src/watermarking_cli.py - PDF explorer
server/src/watermarking_utils.py
Distribution tools
- RMAP routes
server/src/rmap_routes.py - RMAP client
server/clients
Other components
- Browser user
Connections 32
- Browser user → Flask app: sends requests
README.md - Flask app → Web pages: registers pages
server/src/server.py - Flask app → Account routes: registers routes
server/src/server.py - Flask app → Document routes: registers routes
server/src/server.py - Flask app → Watermark routes: registers routes
server/src/server.py - Flask app → Authentication: configures
server/src/server.py - Flask app → Document service: configures
server/src/server.py - Flask app → Watermark service: configures
server/src/server.py - Flask app → RMAP routes: optionally registers
server/src/server.py - Account routes → Authentication: calls
server/src/auth.py - Document routes → Document service: calls
server/src/documents.py - Document routes → Authentication: checks tokens
server/src/documents.py - Watermark routes → Watermark service: calls
server/src/watermarks.py - Authentication → Application database: reads and writes
server/src/auth_service.py - Document service → Application database: reads and writes
server/src/document_service.py - Document service → PDF storage: stores PDFs
server/src/document_service.py - Watermark service → Application database: reads and writes
server/src/watermark_service.py - Watermark service → Document service: gets source PDF
server/src/watermark_service.py - Watermark service → Method registry: applies methods
server/src/watermark_service.py - Watermark service → PDF storage: stores versions
server/src/watermark_service.py - Flask app → Service errors: handles
server/src/server.py - Authentication → Service errors: raises
server/src/auth_service.py - Document service → Method contract: validates PDFs
server/src/document_service.py - Method registry → Method contract: dispatches methods
server/src/watermarking_utils.py - Method registry → DWT-SVD method: registers method
server/src/watermarking_utils.py - Method registry → Repeated text method: registers method
server/src/watermarking_utils.py - Method registry → EOF methods: registers method
server/src/watermarking_utils.py - Method registry → Ghost text method: registers method
server/src/watermarking_utils.py - Watermark CLI → Method registry: uses registry
server/src/watermarking_cli.py - Method registry → PDF explorer: provides exploration
server/src/watermarking_utils.py - RMAP routes → Watermark service: issues watermark
server/src/rmap_routes.py - RMAP client → RMAP routes: exchanges messages