How sudeepmadare18/pragyanai_super30_python_pdfmerger_f-b works
This repository is a browser-based PDF merger backed by a FastAPI service. The main workflow is selecting PDFs in the frontend, submitting them to /merge, validating and combining their pages on the backend, then downloading the streamed PDF response. The backend also exposes health and home routes. Backend/utils.py contains PDF validation, merging, and inspection helpers, but the sampled main.py does not import or call them. Frontend markup and styling are present in the tree, but their relationships to the JavaScript could not be verified from the excerpts.
Main entry points: main.py Merge endpoint · script.js File selection and download · index.html Merger interface · config.json Service configuration
Components 12
Browser frontend
- Merger interface
Frontend/index.html - Interface styling
Frontend/style.css - File selection and download
Frontend/script.js
PDF API
- FastAPI service
Backend/main.py - Service configuration
Backend/config.json - Merge endpoint
Backend/main.py - Upload checks
Backend/main.py - Page combination
Backend/main.py - PDF response
Backend/main.py - Health and home routes
Backend/main.py
PDF helpers
- PDF helper functions
Backend/utils.py
Other components
- User
Connections 9
- User → Merger interface: uses
- Merger interface → File selection and download: interacts through
- File selection and download → FastAPI service: checks health
Frontend/script.js - File selection and download → Merge endpoint: posts files
Frontend/script.js - Merge endpoint → Upload checks: checks uploads
Backend/main.py - Merge endpoint → Page combination: combines pages
Backend/main.py - Merge endpoint → PDF response: streams PDF
Backend/main.py - FastAPI service → Service configuration: loads settings
Backend/main.py - FastAPI service → Health and home routes: serves routes
Backend/main.py