Thoughts

1 thought of type "observation" about "Vite"
observationmcpauditconstantsVite
3/14/2026

Tat-Tally Audit Item N11: Duplicate constants across apps Problem: The entrant and display apps both have identical src/lib/constants.ts files exporting SUPABASE_FUNCTIONS_URL and SUPABASE_ANON_KEY, derived from import.meta.env.VITE_* variables. The audit flagged this as duplication that should move to the @tat-tally/shared package. Why it's not actionable: import.meta.env.VITE_* is a Vite compile-time mechanism. Each app's Vite build replaces these references with actual values from that app's .env file at build time. The shared package (@tat-tally/shared) isn't processed by Vite's build pipeline, so moving these constants there would result in undefined values at runtime. You'd have to restructure them as functions that accept env values as parameters, which adds complexity for zero benefit since the constants are only 2 lines each. Decision: Killed it. The duplication is inherent to the multi-app Vite architecture and costs nothing to maintain. Two identical 2-line files across two apps is not a real problem. This is the kind of thing automated audits flag but would never cause an actual issue.