Skip to content

Instantly share code, notes, and snippets.

@coolsam726
Last active October 8, 2024 11:06
Show Gist options
  • Save coolsam726/7d480c32e71e0df32967bcaaeaf2e76d to your computer and use it in GitHub Desktop.
Save coolsam726/7d480c32e71e0df32967bcaaeaf2e76d to your computer and use it in GitHub Desktop.
SU - 2024 Q3 EAS INTERNSHIP CODING CHALLENGE

File Management System - Interview Coding Challenge

Description

The aim of this exercise is to implement a simple file management system. The system should be able to create files, delete files, and list all files in the system. The system should also be able to handle errors such as trying to delete a file that does not exist. All files should be organized into nested directories. The system should be able to create directories, delete directories, and list all directories in the system. The system should also be able to handle errors such as trying to delete a directory that is not empty.

Instructions

  1. Your project should have two apps: the Frontend and the backend.
  2. The backend should be implemented in any of the following languages:
    • Python (Django Framework)
    • Java (Spring Boot Framework)
    • Typescript (Node.js - Express Framework or its sub-frameworks such as Nest.js)
    • PHP (Laravel Framework)
  3. The frontend should be implemented in any of the following languages:
    • React
    • Angular
    • Vue
    • Alpine.js
    • Svelte
  4. The gateway to the backend should be via a RESTful API.
  5. Your backend should at least have the following endpoints, following the REST standards:
    • GET /api/files/ - List all files in the system
    • GET /api/files/:id - Get the details of a file
    • POST /api/files/ - Upload a new file
    • PUT /api/files/:id - Update a file
    • DELETE /api/files/:id - Delete a file
    • GET /api/directories/ - List all directories in the system
    • GET /api/directories/:id/sub-directories - Get Sub-directories of the current directory
    • GET /api/directories/:id/files - Get files in the current directory only
    • POST /api/directories/ - Create a new directory
    • PUT /api/directories/:id - Update a directory
    • DELETE /api/directories/:id - Delete a directory
  6. Your backend should use the local file system to store files and directories.
  7. Directories should be nested using a tree structure. For example, the following structure:
    root
    ├── dir1
    │   ├── dir2
    │   │   ├── file1
    │   │   └── file2
    │   └── file3
    └── file4
    
    Should be represented as:
    root
    ├── dir1
    │   ├── dir2
    │   │   ├── file1
    │   │   └── file2
    │   └── file3
    └── file4
    
    In the database.
  8. Your backend should store all the information about files and directories in a database. You must use one of the following as your database engine:
    • MySQL
    • MariaDB
    • PostgreSQL
    • SQLite
  9. Your frontend should have the following features:
    • A page to list all high level directories and files in the system
    • Clicking on a directory should take you to a page that lists all directories and files in that directory
    • Clicking on a file should open a dialog that shows the file details
    • The file details dialog should have a button to download the file
    • The file details dialog should have a button to delete the file
    • The file details dialog should have a button to navigate to the parent directory
    • The file details dialog should have a button to rename the file.
    • A button to create a new directory
    • A button to upload a new file in the current directory
    • A button to delete the current directory and its files
    • A button to delete a file
    • A button to navigate to the parent directory
  10. Your frontend should use TailwindCSS or Bootstrap for styling.
  11. Your project should have a README.md file with instructions on how to run the project.

Submission Instructions:

  1. You should work in a public GITHUB repository. The repository should clearly show a history of your commits.
  2. The README.md file should contain clear instructions on how to run the project.
  3. Respond to this email with a link to the repository, if you accept to attempt the project.
  4. If need be, you can commit a database dump file to the repository. The database dump file should be in a separate folder and should be clearly labeled.

Evaluation Criteria:

  1. The project should be implemented according to the instructions.
  2. The project should be well organized and easy to understand.
  3. The project should be well documented.
  4. The project should work as expected.
  5. The project should be visually appealing.
  6. The project should be bug-free.
  7. The project should be submitted on time.
  8. The project should be hosted on a public GITHUB repository.
  9. The project should have a clear history of commits.
  10. The project should have a README.md file with instructions on how to run the project.

Submission Deadline:

  1. The deadline for this project is on Friday 11th Oct, 2024 at 5:30PM EAT.
  2. You can continue committing changes to your project before the deadline. Your last commit before the deadline will be used for evaluation.
  3. Commits made after the deadline will not be considered for evaluation.
  4. Late submission of the project link will attract a penalty of 10% of the total score per hour.
  5. The project link should be submitted by email to [email protected], CC. [email protected].
  6. If you do not wish to proceed with this interview, no further action is required from your end.

Additional Information:

  1. If you have any questions or need clarification on any part of the project, please reply to this email.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment