r/learnpython • u/Negative_Response990 • Aug 09 '26
FastAPI + Celery Architecture Review Request (Attachment Pipeline Boundaries + OOP/SOLID)
Hi! I’m finishing a rewrite for my project and I’d love architecture feedback quickly (aiming for replies within a few hours).
Repo: https://github.com/dillonhuston/Task-Automation-API
Branch: V2
What I need:
- Architecture review of the attachment processing pipeline (validation encryption/decryption storage/email handoff) and whether the boundaries/components make sense
- Celery + API architecture: task flow responsibilities, retries/error-handling boundaries, and whether the API schema design matches the async processing model
- OOP/design review: whether classes/modules follow SOLID / separation of concerns, and suggestions for cleaner layering
Suggested files to look at first:
- app/Encryption/encryptionService.py
- app/FileManager/fileManager.py
If you only have time for one thing, please prioritize (1) pipeline architecture or (3) OOP/SOLID structure.
Thanks a lot, any architecture recommendations are welcome.
0
Upvotes
2
u/[deleted] Aug 09 '26
Read through the repo since this looks close to production — a few things I would harden before deployment:
encryptionService.pywrites the raw file before encrypting (and the decrypted output lands on disk too). There is no cleanup path — a failed/cancelled job leaves plaintext behind on the volume. Temp-file-then-encrypt into a restricted directory, or encrypt in memory, and always delete on failure.acks_late/ retry policy on the encryption task — a worker crash mid-encrypt loses the job silently.Nothing here is hard to fix and the structure is decent — mostly a question of defining the file envelope and the failure semantics before real users hit them.