Prepare for public distribution v1.0.0

- Remove all personal data from source code (HA IP, JWT tokens)
- Move secrets to .env configuration (gitignored)
- Create .env.example template for new installations
- Add centralized env() helper, eliminate code duplication (~120 lines removed)
- Add input validation on inventory operations (quantity bounds, location whitelist)
- Remove sensitive credential exposure in API responses
- Remove database and runtime files from Git tracking
- Disable database push-to-GitHub backup (local-only backup now)
- Update .gitignore for distribution
- Add comprehensive README with installation guide
- Add CHANGELOG.md for version tracking
- Add MIT LICENSE
- Add author/license headers to all source files
- TTS defaults now empty (configured per-installation via .env)
This commit is contained in:
dadaloop82
2026-04-10 05:24:27 +00:00
parent 35cf133be4
commit e0956c6043
16 changed files with 496 additions and 2768 deletions
View File
-2585
View File
File diff suppressed because it is too large Load Diff
-32
View File
@@ -1,32 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIFmTCCA4GgAwIBAgIUUH/pYPk0V275mGrJ3N8F1mPxotswDQYJKoZIhvcNAQEL
BQAwXDELMAkGA1UEBhMCSVQxDTALBgNVBAgMBEhvbWUxDTALBgNVBAcMBEhvbWUx
FDASBgNVBAoMC0Rpc3BlbnNhIENBMRkwFwYDVQQDDBBEaXNwZW5zYSBSb290IENB
MB4XDTI2MDMxMDEwNDk1NVoXDTM2MDMwNzEwNDk1NVowXDELMAkGA1UEBhMCSVQx
DTALBgNVBAgMBEhvbWUxDTALBgNVBAcMBEhvbWUxFDASBgNVBAoMC0Rpc3BlbnNh
IENBMRkwFwYDVQQDDBBEaXNwZW5zYSBSb290IENBMIICIjANBgkqhkiG9w0BAQEF
AAOCAg8AMIICCgKCAgEA5dgMhEqr5D0yyHltZWgvmDK9J9qukEgcHLxN98krgne1
P65plV5xWjsxPSOd1vrNWY5VKmDV3o91zANT9xkN//EREFwum8ozuIhsNTf69E+L
Nbshof0LKQE1/epOQzDOTy+OaGLXI4htN/W8FfJFhBw+xL6tCu9JM1jT5Qe/RoZ7
pljJL7lsHhnG0PkA7seXwKhQ6fZLPGXV+ixqrlsGmClczvM+9xYNLXF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umLC3W1UxL7Ncdspj5k0o0xAz/ugOYN44n1Oxth0WnRo4sA3YoTqScR
slSCfUnXrZmWl3mIIsf2UFjV2doM4EReKsgu6uzHTcG4AHQCFi1fhNY2LnIPcqmy
1C8iQCskEr24OKBQUmdJaIZhUB3IXUmVh0fi8R+BGBxC372WleopjN3BubsL+u7h
QxgNJom9SmeoTT/5FbUTr3kGOxLiAuwPAvMIbep+l1BSQbosOZtKxObHkcUN
-----END CERTIFICATE-----
BIN
View File
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"success":true,"items":[{"product_id":69,"name":"Cipolla Dorata","brand":"","category":"verdura","unit":"pz","current_qty":1,"default_qty":0,"package_unit":"","pct_left":11,"use_count":17,"buy_count":1,"daily_rate":0.36,"uses_per_month":16.6,"days_since_last_use":1,"days_left":3,"expiry_date":"2026-04-13","days_to_expiry":3,"is_opened":false,"urgency":"high","reasons":["Quasi finito (11%)","Scade tra 3gg"],"score":135,"on_bring":true,"locations":"frigo"},{"product_id":3,"name":"Cracker integrali","brand":"Barilla,Mulino Bianco","category":"en:snacks","unit":"conf","current_qty":2,"default_qty":25,"package_unit":"g","pct_left":12,"use_count":6,"buy_count":1,"daily_rate":0.46,"uses_per_month":5.9,"days_since_last_use":12,"days_left":4,"expiry_date":"2026-05-28","days_to_expiry":48,"is_opened":true,"urgency":"high","reasons":["Quasi finito (12%)"],"score":90,"on_bring":false,"locations":"dispensa"},{"product_id":47,"name":"Lenticchie","brand":"Primia","category":"en:plant-based-foods-and-beverages","unit":"conf","current_qty":2,"default_qty":400,"package_unit":"g","pct_left":1,"use_count":5,"buy_count":4,"daily_rate":29.32,"uses_per_month":4.9,"days_since_last_use":6,"days_left":0,"expiry_date":"2029-12-13","days_to_expiry":1343,"is_opened":false,"urgency":"high","reasons":["Quasi finito (1%)"],"score":90,"on_bring":false,"locations":"dispensa"},{"product_id":129,"name":"Latte di Montagna","brand":"Mila","category":"en:dairies","unit":"conf","current_qty":4,"default_qty":1000,"package_unit":"ml","pct_left":160,"use_count":17,"buy_count":6,"daily_rate":0.43,"uses_per_month":20,"days_since_last_use":1,"days_left":9,"expiry_date":"2026-04-11","days_to_expiry":1,"is_opened":true,"urgency":"medium","reasons":["Scade tra 1gg"],"score":55,"on_bring":false,"locations":"frigo"},{"product_id":122,"name":"Carote","brand":"Bell'orto","category":"en:plant-based-foods-and-beverages","unit":"g","current_qty":750,"default_qty":750,"package_unit":"","pct_left":100,"use_count":3,"buy_count":2,"daily_rate":29.42,"uses_per_month":3.5,"days_since_last_use":11,"days_left":25,"expiry_date":"2026-04-13","days_to_expiry":3,"is_opened":false,"urgency":"medium","reasons":["Scade tra 3gg"],"score":40,"on_bring":false,"locations":"dispensa"},{"product_id":188,"name":"Melone Retato","brand":"Iper Poli","category":"frutta","unit":"g","current_qty":498,"default_qty":1400,"package_unit":"","pct_left":36,"use_count":1,"buy_count":1,"daily_rate":332.81,"uses_per_month":0.5,"days_since_last_use":1,"days_left":1,"expiry_date":"2026-04-12","days_to_expiry":2,"is_opened":true,"urgency":"medium","reasons":["Scade tra 2gg"],"score":40,"on_bring":false,"locations":"frigo"},{"product_id":5,"name":"Fette biscottate Integrali","brand":"Primia","category":"en:plant-based-foods-and-beverages","unit":"conf","current_qty":2.5,"default_qty":36,"package_unit":"g","pct_left":21,"use_count":2,"buy_count":1,"daily_rate":0.24,"uses_per_month":2,"days_since_last_use":2,"days_left":10,"expiry_date":"2026-06-06","days_to_expiry":57,"is_opened":true,"urgency":"low","reasons":["Scorta bassa (21%)"],"score":30,"on_bring":false,"locations":"dispensa"},{"product_id":132,"name":"Noci sgusciate","brand":"Fruttbella","category":"conserve","unit":"g","current_qty":60,"default_qty":200,"package_unit":"","pct_left":30,"use_count":4,"buy_count":1,"daily_rate":5.49,"uses_per_month":4.7,"days_since_last_use":6,"days_left":11,"expiry_date":"2026-05-29","days_to_expiry":49,"is_opened":true,"urgency":"low","reasons":["Scorta bassa (30%)"],"score":30,"on_bring":false,"locations":"dispensa"},{"product_id":136,"name":"Biscotti Pastefrolle","brand":"Balocco","category":"snack","unit":"g","current_qty":350,"default_qty":700,"package_unit":"","pct_left":67,"use_count":4,"buy_count":2,"daily_rate":27.47,"uses_per_month":4.7,"days_since_last_use":6,"days_left":13,"expiry_date":null,"days_to_expiry":999,"is_opened":false,"urgency":"low","reasons":["Previsto esaurimento tra ~13gg"],"score":25,"on_bring":false,"locations":"dispensa"}],"cached_at":"2026-04-10T05:15:02+00:00","cached_ts":1775798102}