An autonomous, modular maritime document verification pipeline combining Local LLMs, Frontier AI Models (Google Gemini), MCP Verifier Registries, and Playwright Browser Automation to ingest seafarer credentials (COC, CDC, FOC, Passport), discover official maritime administration portals, and execute verification in real time.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 1. INGESTION (PDF / JPG / Multiple Scans) โ
โ - Drop into 'incoming_docs/' โ
โ - Or upload via Web UI (127.0.0.1:8000) โ
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 2. PRIVATE DATA EXTRACTION (Local AI_Local) โ
โ - Extracts Seafarer Name, DOB, CDC, COC โ
โ - Strict privacy (No PII sent to cloud) โ
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 3. MARITIME REGISTRY LOOKUP โ
โ - IMO_STCW_Seafarer_Verification.xlsx โ
โ - Auto-resolves country & portal URL โ
โโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโ
โ โ
[Cached Verifier Found] [Unlisted Country]
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ 4A. MCP SERVER โ โ 4B. GEMINI FRONTIER โ
โ Cached Script โ โ Autonomous Research โ
โ Execution โ โ & Script Synthesis โ
โโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโโโโโ
โ โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 5. PLAYWRIGHT BROWSER AUTOMATION โ
โ - Real Chromium browser interaction โ
โ - Multimodal Vision CAPTCHA solving โ
โ - Certificate PDF file upload โ
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 6. REPORT GENERATION & AUDIT LOGS โ
โ - verified_reports/<SEAFARER_TIMESTAMP>/ โ
โ - JSON report + Full-page screenshot โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Launch the full-stack web UI with real-time model switching, drag-and-drop document upload, and interactive chat:
python web_app/server.pyOpen http://127.0.0.1:8000 in your browser.
The background service continuously monitors incoming_docs/ for new seafarer document folders:
python -u -m service.watcher- Create a subfolder in
incoming_docs/(e.g.incoming_docs/Captain_Smith/). - Drop in any number of PDF or JPG scans (COC, CDC, Passport, FOC).
- The watcher automatically classifies documents, executes verification, moves originals to
processed_docs/, and generates reports inverified_reports/.
You can test individual country portals directly with visible browser automation:
python run_visible_verification.py --country India
# Or interactive INDoS checker:
python indos_checker.py- Portal:
http://220.156.189.33/esamudraUI/jsp/examination/checker/COCSearch.jsp - Inputs: INDoS Number + Date of Birth
python verify_myanmar_aio.py- Portal:
https://www.dmamyanmar.org/AllInOneCertificate/SelfVerification - Inputs: CDC No., CoC Serial No., Passport No., Requester Email
# Visible browser on your screen:
python verify_indonesia_live.py --visible
# Headless background mode:
python verify_indonesia_live.py --headless- Portal:
https://pelaut.dephub.go.id/index.php/verifikasi - Features:
- Local Model (
AI_Local) extracts Seafarer Code & Blanko Serial No. - Attaches certificate PDF to
DOKUMEN_SERTIFIKAT - Captures live CAPTCHA and decodes with Frontier Gemini Vision
- Automatically fills
#captchaand submitsCek
- Local Model (
Run the full LangGraph pipeline on a specific PDF or custom seafarer parameters:
# Ingest PDF:
python main.py --pdf "path/to/document.pdf"
# Or manual profile:
python main.py --name "ANUP KAMBOJ" --nationality "India" --coc "09NL5250" --dob "07/09/1992"To research an unlisted maritime administration, discover its verification portal, and generate a new verification guide:
python research_country.py --country "Bahamas"The report is saved to verified_reports/research_reports/Bahamas_Verification_Guide.md.
Interact directly with the local LiteLLM model with text and image attachment support:
python chat_local_model.py- Type
/image path/to/image.pngto attach an image for analysis. - Type
exitto quit.
โโโ .env # API keys and local endpoint configs
โโโ README.md # This user guide
โโโ memory.md # Project state, history & handoff context
โโโ main.py # Master CLI pipeline orchestrator
โโโ IMO_STCW_Seafarer_Verification.xlsx # Master IMO maritime authority database
โ
โโโ core/ # Core schemas and configuration
โ โโโ config.py # Environment variables and URLs
โ โโโ schemas.py # Pydantic data contracts (SeafarerProfile, VerificationResult)
โ โโโ ocr_client.py # Document OCR client with retry logic
โ
โโโ local_llm/ # Private Local Model Layer (AI_Local)
โ โโโ extractor.py # Seafarer entity extraction from text
โ โโโ multi_doc_classifier.py # Multi-document classifier (COC, CDC, FOC)
โ
โโโ frontier_llm/ # Frontier Model Layer (Google Gemini)
โ โโโ gemini_client.py # Verifier script synthesis & CAPTCHA vision solving
โ
โโโ registry/ # Maritime Authority Registry
โ โโโ excel_registry.py # Excel country & portal lookup with ISO aliases
โ
โโโ mcp_server/ # MCP Verifier Tool Registry
โ โโโ server.py # FastMCP server definition
โ โโโ registry_service.py # Script discovery and registration service
โ
โโโ orchestrator/ # LangGraph Orchestration State Machine
โ โโโ workflow.py # Compiled LangGraph state machine
โ โโโ auto_scraper_agent.py # Playwright scraper generation agent
โ โโโ unlisted_country_researcher.py # Unlisted country web researcher
โ
โโโ verifiers/ # Country-Specific Playwright Verifiers
โ โโโ base_verifier.py # Abstract BaseVerifier class
โ โโโ india_verifier.py # Indian DG Shipping verifier
โ โโโ myanmar_verifier.py # Myanmar DMAOS verifier
โ โโโ indonesia_verifier.py # Indonesian Dephub verifier (with CAPTCHA + Upload)
โ
โโโ service/ # Background Services
โ โโโ watcher.py # Automated dropzone directory watcher
โ
โโโ web_app/ # Full-Stack Web Application
โ โโโ server.py # Threaded backend server & API proxy
โ โโโ static/ # Glassmorphism HTML/CSS/JS interface
โ
โโโ incoming_docs/ # Dropzone for incoming seafarer document folders
โโโ processed_docs/ # Archive of successfully processed documents
โโโ verified_reports/ # Output verification reports (JSON & screenshots)
โโโ screenshots/ # Reference verification screenshots
# Local Model Endpoint (LiteLLM OpenAI-Compatible)
LLM_URL=https://ai.edot-solutions.com/v1/chat/completions
LLM_MODEL=AI_Local
LLM_API_KEY=your_local_key_here
# Local Document OCR Endpoint
OCR_URL=http://192.168.1.34:8007/api/extract?mode=structured
# Google Gemini Frontier Model API Key
GEMINI_API_KEY=your_gemini_api_key_here- Strict Data Privacy: All private seafarer identification (names, DOB, document numbers) is processed exclusively by the in-house Local Model (
AI_Local). - Frontier Intelligence Isolation: Cloud Frontier models (Google Gemini
gemini-3.6-flash) are utilized strictly for non-sensitive technical operations (analyzing public DOM trees, generating Playwright verifier code, and solving visual challenge puzzles). - Physical Browser UI Automation: Verifications are conducted exclusively via real browser rendering (Playwright Chromium) matching official maritime authority requirements.