Files
FTP-Server/README.md
Toni 9f23fd42fa Add README for Simple File Server
Add a comprehensive README describing the Simple File Server project. Documents core features (file/folder management, drag-and-drop, bulk ZIP downloads, previews), UI/UX details (grid/list views, dark mode, breadcrumbs), security/backend (session-based auth, MariaDB), tech stack, project structure, and deployment instructions (Docker Compose and manual Node.js). Includes default credentials (admin/admin) and a recommendation to change them for production.
2026-02-09 10:14:01 +01:00

2.7 KiB

Simple File Server

A lightweight, self-hosted file server built with Node.js, Express, and Vanilla JS. Designed for easy deployment via Docker with a focus on a clean, modern user interface.

🚀 Features

Core Functionality

  • File Management: Upload (Drag & Drop), Download, Delete files.
  • Folder Management: Create, Delete, Move (Drag & Drop), and Navigate folders.
  • Bulk Actions: Select multiple files and download them as a single ZIP archive.
  • Previews:
    • Media: View images and videos directly in the browser.
    • Archives: Preview ZIP file contents without downloading.

UI / UX

  • Modern Interface: Clean design with a responsive layout.
  • Views: Toggle between Grid View (great for media) and List View (great for details).
  • Dark Mode: Automatically respects system preferences, with a manual toggle.
  • Breadcrumbs: Easy navigation through deep directory structures.
  • Search/Sort: (Planned/In-progress)

Security & Backend

  • Authentication: Simple session-based login system (Default: admin / admin).
  • Database Integration: Connects to MariaDB for persistent user management and action logging.
  • Dockerized: specific Dockerfile and docker-compose.yml included for instant deployment.

🛠️ Tech Stack

  • Frontend: HTML5, CSS3 (Variables, Flexbox/Grid), Vanilla JavaScript.
  • Backend: Node.js, Express.
  • Database: MariaDB.
  • Containerization: Docker, Docker Compose.

📦 Deployment

  1. Clone the repository:

    git clone <your-gitea-repo-url>
    cd simple-file-server
    
  2. Configure Environment: Create a .env file (or use default fallback) with your database credentials.

    PORT=3000
    SESSION_SECRET=your_secret_key
    DB_HOST=maria.casademm.de
    DB_USER=your_db_user
    DB_PASSWORD=your_db_password
    DB_NAME=fileserver
    
  3. Run with Docker Compose:

    docker-compose up --build -d
    

    The server will be available at http://localhost:8080.

Method 2: Manual (Node.js)

  1. Install Dependencies:

    npm install
    
  2. Start the Server:

    npm start
    

    The server will run on http://localhost:3000.

📁 Project Structure

  • public/: Frontend assets (HTML, CSS, JS).
  • routes/: Express API routes (auth.js, files.js).
  • db/: Database connection and queries.
  • uploads/: Default directory for stored files (mounted volume in Docker).

🔐 Default Credentials

  • Username: admin
  • Password: admin

Note: It is highly recommended to change these in the database or update the auth logic for production use.