How soumilk/smart-package works
Perfect Package is a web-based food-packaging optimizer. A user enters product properties; the Python service reads them from Firebase, evaluates material suitability and package orientations, estimates costs, then writes recommendations and arrangement results for the website to display. The README documents this workflow and broader material-selection goals; sampled Python shows the Firebase reads, calculations, and writes. Front-end page roles and result-reading code are not sampled, so those links reflect documented behavior rather than verified client-side calls.
Main entry points: packing.py Packing service · codebase.py Material matching · new.html Product form · orientation.py Orientation analysis
Components 13
Web experience
- Landing page
index.html - Product form
new.html - Form controls
new.js - Results pages
secondary.html - Additional results
tertiary.html
Packaging analysis
- Material matching
codebase.py - Material properties
codebase.py - Orientation analysis
orientation.py - Arrangement results
orientation.py
Results service
- Packing service
packing.py - Cost ranking
packing.py
Other components
- Product designer
- Firebase data
Connections 17
- Product designer → Landing page: opens
- Landing page → Product form: opens
- Product form → Form controls: uses controls
- Product form → Firebase data: submits properties
- Packing service → Firebase data: polls inputs
- Packing service → Material matching: imports and uses
- Material matching → Firebase data: reads properties
- Material matching → Material properties: compares against
- Packing service → Orientation analysis: imports and uses
- Orientation analysis → Firebase data: reads properties
- Orientation analysis → Arrangement results: produces
- Packing service → Cost ranking: ranks costs
- Cost ranking → Material matching: uses candidates
- Cost ranking → Arrangement results: uses areas
- Packing service → Firebase data: writes results
- Results pages → Firebase data: reads results
- Additional results → Firebase data: reads results