Create a file upload and management system using Core PHP without using any frameworks or libraries (except for essential security functions like escaping user input). The system should allow users to upload files, manage their uploaded files, and perform various operations on them.
-
User Registration and Authentication:
- Users should be able to register and log in with their credentials.
- Implement proper authentication and authorization mechanisms to ensure only authenticated users can access their files.
-
File Upload:
- Authenticated users should be able to upload files from their local machine.
- Validate uploaded files to ensure they meet the allowed file types and size restrictions (e.g., only allow image files with a maximum size of 5MB).
- Store the uploaded files securely on the server.
-
File Management:
- Each user should have their own directory on the server to store their uploaded files.
- Implement functionalities to allow users to view, rename, move, and delete their files.
- Provide a search feature that allows users to search for files based on their names or tags.
-
File Sharing:
- Implement a feature that allows users to share their files with other registered users.
- Users with whom the file is shared should only have read-only access to the file.
-
Security:
- Ensure the application is protected against common security vulnerabilities like SQL injection, XSS attacks, CSRF attacks, etc.
- Implement proper input validation and sanitization.
-
User Interface:
- Design a clean and intuitive user interface for the file management system.
- The interface should be responsive and work well on different devices.
-
Performance Optimization:
- Optimize the application for performance, especially when dealing with large files or a large number of files.
Note: The candidate should also be prepared to explain their code and design decisions during the interview.
- Please create a public GitHub / BitBucket repository for your project.
- Your repository must have a detailed README.md with instructions on how to set up & run your code locally.
- We would like you to present your work no later than 3 days from the day you receive your task.
- Run your code locally
- Give us a UI and features walkthrough
- Explain your code
- Run tests, if any
Provide the source code of the app and any necessary instructions to run it.
Remember, you can modify or extend this challenge according to your specific requirements and the skills you want to evaluate.