How sowpnil-roy/openplag works
OpenPlag is a self-hosted English and Bangla plagiarism-detection product with a web UI and REST API. A user submits a document or pasted text; the backend extracts text, runs detection and source search, then stores a report that can be reviewed in the UI or exported. Separate branches support corpus administration, teacher/class workflows, and developer integrations such as API keys and signed webhooks. The graph reflects documented capabilities and indexed references; several internal stage-to-stage calls are not shown in the excerpts, so those links are omitted.
Main entry points: pipeline.py Scan pipeline · __init__.py API routes · api.ts API client · tasks.py Worker tasks
Components 23
Web experience
- Web workflows
frontend/app/check/page.tsx - Report review
frontend/app/reports/[id]/page.tsx - Class workflows
frontend/app/classes/[id]/page.tsx - API client
frontend/lib/api.ts
API and orchestration
- REST API
backend/app/main.py - API routes
backend/app/api/v1/__init__.py - Submission endpoints
backend/app/api/v1/submissions.py - Class endpoints
backend/app/api/v1/classes.py - Report endpoints
backend/app/api/v1/reports.py - Worker tasks
backend/app/workers/tasks.py - Scan pipeline
backend/app/workers/pipeline.py - Report generation
backend/app/reports/pdf.py - Webhook management
backend/app/api/v1/webhooks.py
Detection and corpus
- Text extraction
backend/app/detection/extract.py - Fingerprint matching
backend/app/detection/align.py - Web and scholarly search
backend/app/detection/providers - Paraphrase detection
backend/app/detection/embeddings.py - Corpus import and indexing
backend/app/corpus/jobs.py
State and integrations
- Relational database
backend/app/db.py - Object storage
backend/app/storage/minio.py - Signed webhook delivery
backend/app/workers/webhooks.py
Other components
- User
- Search and scholarly services
Connections 26
- User → Web workflows: submits work
- User → API client: uses API
- Web workflows → API client: requests API
- API client → REST API: calls REST API
- REST API → API routes: mounts routes
backend/app/main.py - API routes → Submission endpoints: registers
backend/app/api/v1/__init__.py - API routes → Class endpoints: registers
backend/app/api/v1/__init__.py - API routes → Report endpoints: registers
backend/app/api/v1/__init__.py - Submission endpoints → Worker tasks: dispatches scans
- Worker tasks → Scan pipeline: runs stages
backend/app/workers/tasks.py - Scan pipeline → Text extraction: extracts text
backend/app/workers/pipeline.py - Scan pipeline → Fingerprint matching: matches passages
backend/app/workers/pipeline.py - Scan pipeline → Web and scholarly search: queries sources
backend/app/workers/pipeline.py - Scan pipeline → Paraphrase detection: checks paraphrases
backend/app/workers/pipeline.py - Search and scholarly services → Web and scholarly search: returns candidates
- Corpus import and indexing → Object storage: stores corpus text
backend/app/corpus/jobs.py - Corpus import and indexing → Relational database: indexes corpus
- Scan pipeline → Relational database: records scan data
- Scan pipeline → Object storage: reads document text
backend/app/workers/pipeline.py - Report endpoints → Report review: serves reports
- Report review → API client: loads report data
- Class workflows → Class endpoints: manages classes
- Scan pipeline → Report generation: produces report
- Webhook management → Signed webhook delivery: tests delivery
backend/app/api/v1/webhooks.py - Worker tasks → Signed webhook delivery: queues delivery
backend/app/workers/tasks.py - Signed webhook delivery → Search and scholarly services: posts events