deckhearth/package.json

36 lines
880 B
JSON
Raw Normal View History

{
"name": "tcg-vault",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"setup-db": "node scripts/setup-neon-db.js",
"import-popular": "node scripts/import-popular-sets.js",
"import-all": "node scripts/bulk-import-all.js"
},
"dependencies": {
"@neondatabase/serverless": "^1.0.1",
🖼️ Complete Avatar Upload System with Vercel Blob 📤 Avatar Upload API (/api/user/avatar): - File upload with multipart form data parsing - Comprehensive validation (file type, size limits) - Support for JPEG, PNG, GIF, WebP images up to 5MB - Automatic cleanup of old avatars before new uploads - Vercel Blob integration with public access - Database tracking in user_avatars table - Error handling for upload failures 🎨 Avatar Generation API (/api/user/avatar/generate): - Custom avatar generation using DiceBear API - Fire-themed color scheme (matching app branding) - Personalized based on user initials/username/email - SVG format for crisp display at any size - Automatic fallback if generation fails - Same cleanup and storage workflow as uploads 🗑️ Account Deletion API (/api/user/delete): - Complete user data cleanup including Vercel Blob files - Cascading deletion respecting foreign key constraints - Admin account protection (prevents self-deletion) - Comprehensive cleanup order: * User avatars from Vercel Blob storage * Deck cards, decks, collection cards, collections * User cards, avatar records, settings * Finally the user account itself - Detailed logging for audit trail - Graceful error handling with specific error messages 🔧 Technical Features: - Custom multipart form data parser for file uploads - Vercel Blob put/del operations with error handling - Unique filename generation with timestamps - Database transaction-like cleanup for deletions - File type validation and size limits - Proper CORS headers for all endpoints 🎯 Integration Ready: - Works seamlessly with existing profile page UI - Supports both upload and generate avatar buttons - Returns avatar URLs for immediate display - Database consistency with user profile system - Production-ready error handling and validation The avatar system is now fully functional with Vercel Blob! 📸✨
2025-07-26 22:39:42 -04:00
"@vercel/blob": "^1.1.1",
"@vercel/postgres": "^0.10.0",
"bcryptjs": "^3.0.2",
"dotenv": "^17.2.1",
"jsonwebtoken": "^9.0.2",
"next": "^15.4.2",
"node-fetch": "^3.3.2",
"react": "^18.3.1",
2025-07-25 09:34:28 -04:00
"react-dom": "^18.3.1",
"resend": "^4.7.0"
},
"devDependencies": {
"autoprefixer": "^10.4.21",
"eslint": "^8",
"eslint-config-next": "15.4.2",
"postcss": "^8.5.6",
"tailwindcss": "^3.4.17"
}
}