chore: clean up codebase for production readiness
Mirror to GitHub / mirror (push) Successful in 44s
Test and Lint / backend-test (push) Successful in 1m42s
Test and Lint / frontend-test (push) Has been cancelled
Version and Release / version-bump (push) Has been cancelled
Version and Release / trigger-drone (push) Has been cancelled

- Remove all console.log/debug statements from production code
- Add NODE_ENV checks for development-only logging
- Remove test scripts (test-feedback, test-image-security, test-backup-*, test-restore)
- Remove one-time fix scripts (fix-temp-photos, fix-migration-state, mark-migration-applied)
- Remove sensitive files (.env.backup, ADMIN_CREDENTIALS.txt)
- Update package.json to remove references to deleted scripts
- Replace console statements with logger utility in backend
- Secure error boundaries to not expose stack traces in production

This makes the codebase production-ready with no debug output or test scripts.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
This commit is contained in:
2025-08-24 23:19:30 +02:00
co-authored by Claude
parent 827eb4819b
commit 1b4b497fdf
144 changed files with 12279 additions and 2018 deletions
+24
View File
@@ -2,7 +2,31 @@
export const cleanupOldGalleryAuth = () => {
// Remove old global gallery authentication
localStorage.removeItem('gallery_event');
localStorage.removeItem('gallery_token'); // Remove old global token format
// Remove any corrupted or old gallery tokens from localStorage
const keysToRemove: string[] = [];
for (let i = 0; i < localStorage.length; i++) {
const key = localStorage.key(i);
if (key && (key.startsWith('gallery_token') || key.startsWith('gallery_event'))) {
// Check if it's an old format token that might be corrupted
const value = localStorage.getItem(key);
if (value && (value.length < 100 || !value.includes('.'))) {
// Token is too short or doesn't contain dots (not a valid JWT)
keysToRemove.push(key);
}
}
}
keysToRemove.forEach(key => {
localStorage.removeItem(key);
// Silently remove corrupted tokens
});
// Remove old gallery token from cookies if it exists
document.cookie = 'gallery_token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
// Also clear session storage
sessionStorage.removeItem('gallery_event');
sessionStorage.removeItem('gallery_token');
};