-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/user dashboard #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Sato-Isolated
wants to merge
10
commits into
main
Choose a base branch
from
feature/user-dashboard
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Integrate better-auth library for user authentication - Add user domain with entity and repository structure - Create auth API routes and dashboard pages - Add audit logging system with MongoDB repository - Update file upload component with auth status display - Enhance header with user session management - Update file and share entities with user associations
- Integrate optional user authentication in upload endpoint - Implement higher rate limits for authenticated users (20 vs 10) - Add comprehensive user dashboard with file management - Create user-specific API endpoints and file filtering - Add dashboard components for file operations and statistics - Include user metadata tracking in file uploads
- Configure ESLint to allow unused variables with underscore prefix - Replace unused parameters with underscore prefix across API routes - Add explicit type conversions to fix implicit any issues - Adjust ESLint rules to change errors to warnings for build compatibility
- Implement admin authentication check in admin page - Add access-denied redirect for non-admin users - Filter admin navigation link based on user role - Create auth utilities and middleware for protection
Replace French comments with English equivalents throughout API routes, components, services, and infrastructure files to improve code readability and maintainability.
- Add SerializedFile and FormattedUserFileStats types for better type safety - Replace 'any' types with proper interfaces in dashboard components - Fix React Hook dependency warnings in toast component using useCallback - Remove unused variables and improve error handling - Enhanced type safety across file management components
Phase 2 - Core Dashboard Features: - Add FilePreview component with support for images, PDFs, videos, and audio - Integrate preview modal in file cards with Preview button - Create BulkActions component for multi-file operations - Support bulk copy links, bulk download, and bulk delete - Enhanced user experience with preview capabilities - Improved file management workflow with batch operations
Major Security Enhancement: - Move file preview from dashboard to share pages (where encryption keys are available) - Create SecureFilePreview component with spoiler/warning system - Add explicit user consent mechanism with legal disclaimers - Implement audit logging for all preview actions (file.preview) Security Features: - Content warning screens with explicit consent requirement - Different warnings for sensitive content (images/videos) - Audit trail logging: IP address, user agent, file details, timestamps - MIME type validation and preview restrictions - Session-based consent (resets on page refresh) Technical Implementation: - New audit action 'file.preview' added to audit system - Preview consent API endpoint /api/audit/preview-consent - Integration with existing file download component - Proper error handling and fallback mechanisms - Support for images, PDFs, videos, audio, and text files Legal Protection: - 'By proceeding, you confirm you are authorized to view this content' - Logged evidence of explicit user consent - IP and timestamp tracking for accountability - Preview separate from download action for clear intent Dashboard Cleanup: - Remove inappropriate preview functionality from dashboard - Keep preview only where technically feasible (share pages) - Clean file-card component of preview references
Major Feature Enhancement: - Add support for 80+ file extensions and MIME types - Enhanced file type detection with extension fallback - Custom TextFilePreview component with syntax highlighting hints Supported File Types: - Data formats: JSON, XML, YAML, TOML, INI, CSV, TSV - Programming languages: JS/TS, Python, Java, C/C++, C#, PHP, Ruby, Go, Rust, Scala, Kotlin, Swift, Dart, Lua - Web technologies: HTML, CSS, SCSS, SASS, LESS, Vue, Svelte - Shell scripts: Bash, Zsh, Fish, PowerShell, Batch - Config files: Dockerfile, Nginx, Apache, .env, .properties - Documentation: Markdown, README, LICENSE, RST, AsciiDoc - SQL and GraphQL files - Log files and many more Technical Features: - File size limit (1MB) for text preview safety - Copy-to-clipboard functionality - Line count display - Language detection based on file extension - Proper monospace font rendering with word wrapping - Enhanced MIME type detection with fallback to extension analysis - Support for generic MIME types like application/octet-stream User Experience: - Clean header with file info (name, lines, detected language) - Optimized for code review and quick content inspection - Maintains same security model with spoiler warnings - Seamless integration with existing preview system
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.