How 22321258muneermohamed/pdfeditor works
PDFEditor is a browser-based PDF editing application with an Express backend for PDF upload, text-block extraction, and applying text edits. The backend workflow is evidenced by sampled routes and services; frontend files indicate dashboard and editor capabilities, but their wiring is not established by the sampled source. The README provides no further capability details.
Main entry points: pdf.controller.ts PDF Controller · pdf.routes.ts PDF Routes · EditorPage.tsx Editor UI · Dashboard.tsx Dashboard
Components 18
Frontend
- Dashboard
frontend/src/pages/Dashboard.tsx - Upload UI
frontend/src/components/dashboard/UploadArea.tsx - Editor UI
frontend/src/pages/EditorPage.tsx - PDF Viewer
frontend/src/components/pdf/PdfViewer.tsx - Text Layer
frontend/src/components/pdf/PdfTextLayer.tsx - Edit Controls
frontend/src/components/editor/EditorToolbar.tsx - Editor State
frontend/src/stores/editorStore.ts - PDF API Client
frontend/src/services/pdfApi.ts
Backend API
- HTTP App
backend/src/app.ts - PDF Routes
backend/src/routes/pdf.routes.ts - PDF Controller
backend/src/controllers/pdf.controller.ts - Upload Middleware
backend/src/middleware/upload.middleware.ts - Edit Validation
backend/src/middleware/validation.middleware.ts
PDF Processing
- PDF Metadata
backend/src/services/pdf.service.ts - Text Extraction
backend/src/services/pdfText.service.ts - Edit Resolution
backend/src/services/pdfEdit.service.ts
Other components
- User
- PDF Document
Connections 19
- User → Dashboard: opens
- Dashboard → Upload UI: offers upload
- HTTP App → PDF Routes: mounts
- PDF Routes → Upload Middleware: uses
- PDF Routes → Edit Validation: validates edits
- PDF Routes → PDF Controller: dispatches
- PDF Controller → PDF Metadata: reads metadata
- PDF Controller → Text Extraction: extracts blocks
- PDF Controller → Edit Resolution: resolves and applies
- Edit Resolution → Text Extraction: re-extracts blocks
- User → Editor UI: edits PDF
- Editor UI → PDF Viewer: presents pages
- PDF Viewer → Text Layer: shows text
- Editor UI → Edit Controls: offers controls
- Edit Controls → Editor State: updates edits
- PDF API Client → PDF Routes: calls PDF endpoints
- Upload UI → PDF API Client: submits PDF
- PDF Document → Upload Middleware: uploaded file
- PDF Controller → PDF Document: returns edited PDF