r/flask • u/lokecf120105 • Oct 22 '26
Ask r/Flask Looking for Technical Help Reviewing an Existing Flask/PostgreSQL Logistics ERP
Hi everyone,
I'm developing an existing Logistics & Inventory ERP for a wholesale business that uses its own trucks for deliveries. The application has been rebuilt as v5, and I'm trying to identify technical risks and resolve the remaining issues before using it in real business operations.
Technology stack
- Python / Flask
- SQLAlchemy / Alembic
- PostgreSQL (Neon)
- Render hosting
- GitHub Actions for scheduled background jobs
Areas where I need technical advice
1. Database and deployment reliability
How can I verify that database migrations, application redeployments and server restarts will not cause data loss? I also need a reliable backup and recovery process.
2. Order and inventory consistency
The system supports stock reservations, expiry-based batch selection (FEFO), order editing, cancellation and rescheduling. What are the most important concurrency and transaction tests to verify that stock cannot be oversold?
3. Weekly recurring orders
The staging deployment plan uses GitHub Actions for scheduled jobs because the current Render Free setup does not provide a built-in cron service. How should I ensure recurring orders are generated exactly once, even when a scheduled job is retried or runs twice?
4. Proof of delivery (POD)
The staging blueprint currently has photo storage disabled. What is a reliable, low-cost way to store delivery photos privately and ensure they remain available after redeployment?
5. Delivery routing
The current staging configuration uses heuristic route estimates and manual map-pin placement. I need advice on progressing towards reliable address handling, realistic travel-time estimates and route planning.
6. Multi-company security
The application uses PostgreSQL row-level security and role-based permissions. What tests should I run to verify that one company cannot access another company's customers, orders, inventory or delivery documents?
The documentation also reports different automated test counts in the README and changelog, so I need to verify the actual test suite and its passing status.
I'm not looking for a completely new application. I'm looking for practical technical explanations, recommended fixes and reproducible tests for an existing codebase.
My main question: Which areas would you investigate first, and what specific implementation patterns or tests would you recommend?
Thanks in advance!