A web-based file management system built with React and Node.js. This application allows users to navigate directories, create files/folders, and perform file operations like Cut, Paste, and Delete directly from the browser.
- Navigation: Browse through folders and files dynamically.
- Create: Create new text files and folders instantly.
- Delete: Remove files and directories with a confirmation safety check.
- Move (Cut/Paste): Move files or folders to different locations using a clipboard-style workflow.
- Open Files: View file content in a new browser tab.
- Context Menu: Custom "Three Dots" menu for file-specific actions.
- React.js: UI and state management.
- Axios: HTTP requests to the backend.
- CSS: Clean, functional styling.
- Node.js & Express: Server logic and API handling.
- File System (fs): Native Node.js module to interact with the operating system's files.
- CORS: Middleware to allow frontend-backend communication.
- Navigate to the backend folder.
- Install the required dependencies:
npm install
- Start the server:
The server will run on
node server.js
http://localhost:3004. Theuserdatafolder included in the repo serves as the root storage.
- Navigate to the frontend folder.
- Install dependencies:
npm install
- Start the React application:
The app will run on
npm run dev
http://localhost:5173(or your default Vite port)
- Open Folder: Click the folder icon or name to enter.
- Go Back: Click the
..folder to go to the parent directory. - Open File: Click a file to view its content in a new tab.
- Create: Use the + New Folder or + New File buttons in the top toolbar.
- Delete:
- Hover over a file/folder.
- Click the Three Dots (⋮) menu.
- Select Delete and confirm.
- Move (Cut & Paste):
- Click the Three Dots (⋮) menu on a file.
- Select Cut. (A brown "Paste" button will appear in the toolbar).
- Navigate to the destination folder.
- Click the Paste button in the toolbar.
| Method | Endpoint | Description |
|---|---|---|
GET |
/files |
Lists files in a specific path. |
GET |
/file |
Retrieves the content of a file. |
POST |
/createdir |
Creates a new directory. |
POST |
/createfile |
Creates a new empty file. |
DELETE |
/deletefile |
Deletes a specific file. |
DELETE |
/deletedir |
Deletes a directory recursively. |
PUT |
/move |
Moves (renames) a file or folder. |