How surajvarma1/file_conversion works
This is a Next.js/FastAPI file-conversion platform. Users choose a tool, select files, submit a conversion or extraction request, and receive a download link or extracted-file listing. The backend exposes separate image, PDF, and ZIP routes; application services validate inputs and dispatch operations through converter factories to format-specific strategies. Local storage and signed-download routes handle outputs. The README documents the broader tool set, though some route and service excerpts are incomplete; dashed edges mark the frontend-to-API connection that was not shown in source excerpts.
Main entry points: main.py FastAPI app · conversion_services.py Conversion services · factories.py Strategy factories · local_storage.py Local file storage
Components 19
Tool interface
- Tool catalog
frontend/src/app/page.tsx - Tool page
frontend/src/app/tools/[tool]/page.tsx - File picker
frontend/src/components/tool/DragDrop.tsx - Tool form
frontend/src/components/tool/ToolForm.tsx - API client
frontend/src/services/api.ts
API entry points
- Image routes
backend/app/api/v1/image_tools/routes.py - PDF routes
backend/app/api/v1/pdf_tools/routes.py - ZIP routes
backend/app/api/v1/zip_tools/routes.py - Download routes
backend/app/api/v1/downloads/routes.py
Conversion processing
- File validation
backend/app/core/security/validator.py - Conversion services
backend/app/application/services/conversion_services.py - Strategy factories
backend/app/infrastructure/converters/factories.py - Image strategies
backend/app/strategies/image/strategies.py - PDF strategies
backend/app/strategies/pdf/strategies.py - ZIP strategies
backend/app/strategies/zip/strategies.py
Files and downloads
- Local file storage
backend/app/infrastructure/file_storage/local_storage.py
Application runtime
- FastAPI app
backend/app/main.py - Configuration
backend/app/core/config/settings.py
Other components
- User
Connections 24
- User → Tool catalog: chooses tool
- Tool catalog → Tool page: opens tool
- Tool page → Tool form: presents form
- Tool form → File picker: renders picker
frontend/src/components/tool/ToolForm.tsx - User → File picker: selects files
frontend/src/components/tool/DragDrop.tsx - Tool form → API client: submits request
- API client → FastAPI app: sends request
- FastAPI app → Image routes: registers routes
backend/app/main.py - FastAPI app → PDF routes: registers routes
backend/app/main.py - FastAPI app → ZIP routes: registers routes
backend/app/main.py - FastAPI app → Download routes: registers routes
backend/app/main.py - Image routes → Conversion services: calls conversion
backend/app/api/v1/image_tools/routes.py - PDF routes → Conversion services: calls PDF service
backend/app/api/v1/pdf_tools/routes.py - ZIP routes → Conversion services: calls ZIP service
backend/app/api/v1/zip_tools/routes.py - Conversion services → File validation: validates inputs
backend/app/application/services/conversion_services.py - Conversion services → Strategy factories: gets strategy
backend/app/application/services/conversion_services.py - Strategy factories → Image strategies: dispatches image
backend/app/infrastructure/converters/factories.py - Strategy factories → PDF strategies: dispatches PDF
backend/app/infrastructure/converters/factories.py - Strategy factories → ZIP strategies: dispatches ZIP
backend/app/infrastructure/converters/factories.py - Image routes → Local file storage: creates download link
backend/app/api/v1/image_tools/routes.py - PDF routes → Local file storage: creates download link
backend/app/api/v1/pdf_tools/routes.py - ZIP routes → Local file storage: creates download link
backend/app/api/v1/zip_tools/routes.py - Download routes → Local file storage: verifies signature
backend/app/api/v1/downloads/routes.py - FastAPI app → Configuration: loads settings
backend/app/main.py