Problem
config.ts exports a single config object with lazy getters for both client-side (apiBaseUrl) and server-only (awsS3Bucket) values. If any client-side code path accidentally imports and accesses config.awsS3Bucket, it throws because AWS_S3_BUCKET is not exposed to the browser.
The getter is publicly exported with no guard, making this a latent error.
Suggested fix
Split server-only config into a separate file (e.g., config.server.ts) and add import 'server-only' at the top to get a build-time error if it's ever imported in a client component.
Problem
config.tsexports a singleconfigobject with lazy getters for both client-side (apiBaseUrl) and server-only (awsS3Bucket) values. If any client-side code path accidentally imports and accessesconfig.awsS3Bucket, it throws becauseAWS_S3_BUCKETis not exposed to the browser.The getter is publicly exported with no guard, making this a latent error.
Suggested fix
Split server-only config into a separate file (e.g.,
config.server.ts) and addimport 'server-only'at the top to get a build-time error if it's ever imported in a client component.