Open Questions [TEAM_WHY_NEEDED] & Tech Debt
Use this board during engineering/product reviews to record the historical “Why?” behind non-obvious rules and track cleanup priorities.
A. [TEAM_WHY_NEEDED] Questions for the Team
proxy/conf.d/internal-email-templates.conf:11: Why do both PROD (supabase-auth) and DEV (supabase-auth-dev) fetch GoTrue email templates from/opt/vps-apps/microservices/dev/dealflow/email-templates/instead of separating PROD templates?proxy/conf.d/supabase.conf:188-247vsproxy/nginx.conf:120-124: Why are unreachable HTTPS port8445vhosts fortelemetry.planovi.appanddev-telemetry.planovi.appstill present when L4 SNI forwards them directly to:8444/:8443?proxy/nginx.conf:126-147: Why doesmqtt.planovi.approute tomosquitto-dev:8883instead of a dedicatedmosquitto-prodbroker, and should port8883remain IP-whitelisted?docker-compose.yml(PROD vs DEV): Should PROD and DEV eventually isolateJWT_SECRET,POSTGRES_PASSWORD,STRIPE_SECRET_KEY, andSTRIPE_WEBHOOK_SECRETinstead of sharing them?docker-compose.yml:551-553: Why arePUBLIC_SUPABASE_URL,SIGNING_PAGE_URL, andSIGNING_SECRETpresent onsupabase-edge-runtime-devbut omitted fromsupabase-edge-runtime(PROD)?docker-compose.yml:478&proxy/kong.yml: Why isproxy/kong-dev.ymluntracked in Git, and why doesproxy/kong.ymlomit/realtime/v1/?docker-compose.yml:295-307: Can the unusedflutter-webcontainer be removed?php-app/Dockerfile:27&.gitignore:22: ShouldCOPY index.phpbe removed or should a stubphp-app/index.phpbe tracked?deployer/deployer.py:24: Why is/opt/vps-stack/flutter-builderuntracked inplanovi-vps?.github/workflows/deploy.yml: Should this broken legacy workflow (referencing deleted./fastapi-app) be deleted or rewritten to deployplanovi-vpsconfigs?deployer/deployer.py:326-350: Was converter DB migration execution (added in commit6faaa16) intentionally moved into FastAPI app startup?scripts/backup.shvsscripts/backup_databases.sh: Which backup script is authoritative in live crontab, and when will off-site backup replication be automated?scripts/planovi-adduser.sh&setup-vps.sh: Should host group creation,/etc/sudoers.d/planovi-roles, andsshd_configSFTP-Jail blocks be versioned in this repo?setup-vps.sh:56-58&scripts/update-allowed-ip.sh:45-47: Should UFW also explicitly allow8883/tcp(MQTT TLS)?docs/: Should the local Starlightdocs/copy inplanovi-vpsbe retired oncePA-IDEAS/planovi-docsis updated from this blueprint?
B. Critical Security & Hardcoded Secret Anomalies (Action Required — Rotate & Clean)
.env.example:17-36: Contains real-looking API keys, database password, JWT secret, signed Supabase JWTs, and integration secrets committed in Git. Replace all values with dummy placeholders and rotate exposed keys.scripts/backup.sh:22&scripts/check-health.sh:16: Hardcoded fallbackGOOGLE_CHAT_WEBHOOK_URLcontaining live space key & token.scripts/backup_databases.sh:10: Hardcoded fallbackPOSTGRES_PASSWORD.scripts/migrate-storage-files.py:7: Hardcoded legacy Supabase CloudCLOUD_SERVICE_ROLE_KEY.docker-compose.yml:417: Hardcoded fallback token forASLANDI_EDGE_SHARED_TOKEN.proxy/conf.d/converters.conf:33-36,94-97: Regex static asset locations bypassallowed_ips.confIP whitelist oncloud.planovi.appanddev-cloud.planovi.app.proxy/conf.d/supabase.conf:40-67,110-137: Studio vhosts expose/rest/v1/,/auth/v1/,/storage/v1/,/functions/v1/withoutallowed_ips.conf(anddev-supabase-studioproxies/functions/v1/directly tosupabase-edge-runtime-dev:9000, bypassing Kong).proxy/conf.d/apps.conf:270-348:agreementsandoffersvhosts lack the sensitive-file blocking rules (^/(data|vendor),.env,.log, etc.) present ondealflowandscheduler.deployer/deployer.py:260: Temporary allowlistFLUTTER_TEMP_ALLOWED = {"DEALFLOW_API_SECRET", "SCHEDULER_API_SECRET"}still permits microservice secrets inside the public browser bundle (assets/env).
C. Bugs, Missing Tracked Configs & Dead/Legacy Artifacts
- Broken CI Workflow:
.github/workflows/deploy.yml:30,56-57references non-existent./fastapi-appcontext andfastapi-appservice. - Missing Tracked Host Files Referenced by Runtime:
proxy/kong-dev.yml(docker-compose.yml:478),/opt/vps-stack/mosquitto-dev/mosquitto.conf(docker-compose.yml:389),/opt/vps-stack/flutter-builder(deployer/deployer.py:24), andphp-app/index.php(php-app/Dockerfile:27). - Missing
.env.exampleKeys: 11 keys read bydocker-compose.ymlare missing from.env.example:FROM_EMAIL,UNSUBSCRIBE_BASE_URL,PORTAL_URL,STRIPE_SECRET_KEY,STRIPE_WEBHOOK_SECRET,STRIPE_INQUIRY_WEBHOOK_SECRET,SIGNING_SECRET_DEV,WEBHOOK_SECRET,GOOGLE_CHAT_WEBHOOK_URL,ASLANDI_EDGE_SHARED_TOKEN,ASLANDI_CARD_MASTER_KEY_B64. - Studio Edge Functions Mount Bug:
docker-compose.yml:109-110,511-512mounts./supabase/functionsinstead of./supabase/functions-prod/./supabase/functions-dev. - HTML Typo & Legacy Branding:
proxy/html/50x.html:217,231,237uses厺(厺) instead of↻(↻);404.html,50x.html,default.htmlstill use deprecated navy/purple/blue colors andOutfitfont. - Dead / Orphaned Files & Containers:
supabase_cloud_dump.sql(0-byte empty file),proxy/html/default.html(unreferenced),scripts/migrate-storage-files.py(one-off legacy cloud migration script),flutter-webcontainer (docker-compose.yml:295-307),/app/deployer.pyinside image (deployer/Dockerfile:10unused becauseCMDruns mounted/opt/vps-stack/deployer/deployer.py), unreachabletelemetryvhosts inproxy/conf.d/supabase.conf:188-247. - Edge Cases in Operational Scripts:
scripts/planovi-adduser.sh:16has typo\docker'; Role 4 (SFTP-Jail) overwrites.ssh/authorized_keysanduploads/ownership if two users share oneSFTP_DIR.scripts/planovi-dev-docker.sh:18allows arbitrary-f <path>without restricting compose file location.scripts/update-allowed-ip.sh:19,31-36overwrites all existing whitelisted IPs with one IPv4 address and allows octets > 255.scripts/check-health.sh:3claims to monitor RAM, but checks only disk/(> 85%) anddocker ps -a.deployer/deployer.py:396-401auto-rollback reverts Git checkout only, not rebuilt containers,rsync-ed Edge Functions, or Flutterbuild/webartifacts.