Skip to content

Project Structure Overview

Spera Alfredo Jeshoua edited this page May 14, 2025 · 3 revisions

Static Badge Project Structure Badge

This project is organized into multiple files, each responsible for a key aspect of the application's functionality, supporting a web-based SSH terminal with secure credential handling and real-time communication.

Configurations

  • config.json: Contains configuration options for the server, such as the port.
  • package.json: Node.js project manifest. Lists dependencies, scripts, and metadata.

Backend

  • server.js: The main backend server file that implements the:
    • Express server.
    • SFTP logic.
    • API endpoints (see the API page for details).
    • Static file serving.
    • Download handlers.

Frontend

Contains all frontend code and assets.

  • web/file.html: Standalone file viewer/editor page for individual files.
  • web/icon.png: Application icon, used for favicon and manifest.
  • web/index.html: Main web interface for the file browser.
  • web/manifest.json: Web app manifest for PWA support.
  • web/worker.js: Service worker for improved offline capabilities by loading static assets from the cache.

Assets directory

Contains all JavaScript and CSS used by the main web interface.

  • web/assets/file.js: JavaScript logic for the file preview, editing, and download (web/file.html).
  • web/assets/index.js: Main JavaScript for the file browser UI (web/index.html). Handles navigation, file operations (upload, download, move, copy, delete), context menus, and UI updates.
    • web/assets/main.css: Main stylesheet for the frontend UI.
    • web/assets/main.js: Script that utilities and logic, such as API helpers, file type detection, and download helpers.
Clone this wiki locally