feat(api): require session authentication for admin routes and improve error handling
fix(api): streamline project image generation by fetching data directly from the database
fix(api): optimize project import/export functionality with session validation and improved error handling
fix(api): enhance analytics dashboard and email manager with session token for admin requests
fix(components): improve loading states and dynamic imports for better user experience
chore(security): update Content Security Policy to avoid unsafe-eval in production
chore(deps): update package.json scripts for consistent environment handling in linting and testing
- Integrate real page view data from the database for accurate analytics.
- Implement cache-busting for fresh data retrieval in analytics dashboard.
- Calculate and display bounce rate, average session duration, and unique users.
- Refactor performance metrics to ensure only real data is considered.
- Improve user experience with toast notifications for success and error messages.
- Update project editor with undo/redo functionality and enhanced content management.
- Created separate workflows for production and dev deployments
- Production branch → dk0.dev (port 3000)
- Dev branch → dev.dk0.dev (port 3002)
- Zero-downtime deployment pattern (start new, wait for health, remove old)
- Complete isolation between environments (separate containers, databases, networks)
- Cleaned up unused code and files:
- Removed unused GhostEditor and ResizableGhostEditor components
- Removed old/unused workflows and markdown files
- Fixed docker-compose references
- Upgraded dependencies to latest compatible versions
- Fixed TypeScript errors in editor page
- Updated staging to use dev.dk0.dev domain
- Remove merge conflict markers from AnalyticsDashboard.tsx
- Fix merge conflicts in email/respond/route.tsx
- Use dev versions of EmailManager and ModernAdminDashboard
- Add eslint-disable for Image icon in editor
✅ Updated Middleware Logic:
- Enhanced admin route protection with Basic Auth for legacy routes and session-based auth for `/manage` and `/editor`.
✅ Improved Admin Panel Styles:
- Added glassmorphism styles for admin components to enhance UI aesthetics.
✅ Refined Rate Limiting:
- Adjusted rate limits for admin dashboard requests to allow more generous access.
✅ Introduced Analytics Reset API:
- Added a new endpoint for resetting analytics data with rate limiting and admin authentication.
🎯 Overall Improvements:
- Strengthened security and user experience for admin functionalities.
- Enhanced visual design for better usability.
- Streamlined analytics management processes.