Skip to content

Repository files navigation

File Lite

中文 | English

File Lite    Node.js backend

Web file manager · Vue 3 + TypeScript


Dual backends

The project ships two server implementations that share the same frontend—pick one for your deployment:

Node.js backend (backend/) Go backend (backend-go/)
Stack Express.js + TypeScript, developed and bundled with Bun Echo, single static binary
Typical use npm i -g file-lite, rapid iteration, script-friendly workflows Low footprint, containers / edge, single-binary distribution
Docs Development & config below backend-go/README.md

Frontend for the Go build: run build:for-go first so static assets land in backend-go/frontend/ (see the Go README).


screenshot

  • Bundle size: single artifact stays around 20MB or less
  • Features
    • Files & folders: create, delete, rename, move, copy
    • Transfers: batch upload, upload folder, download, download folder as ZIP
    • Text editor
    • Preview: images, video, audio; music player with playlist, cover art, and lyrics
    • Video: toggle ArtPlayer.js vs native <video> from the app menu (preference persisted)
    • Endless Gallery: vertical, short-video-style feed of supported images / videos / audio in the current folder, with touch and keyboard / mouse navigation
    • Explorer: per-path layout & sort persistence, default app per file extension, and more
  • Security
    • Password login issues JWT session tokens with a 1-year expiry
    • Console URLs use a short-lived ticket login parameter with a 2-minute TTL; printing URLs again generates a new ticket
    • “Remember login status” supports persistent cookies or browser-session cookies
    • Optional IP ban after repeated failed logins
    • Configurable allowed root path scope
    • HTTPS including self-signed certificates
    • Request rate limiting

Installation

# Global install (Windows may require administrator privileges)
npm i -g file-lite

# Run
file-lite

# Uninstall
npm uninstall -g file-lite

Development

Use Bun for installs and scripts. The default build targets the Node.js runtime (backend embeds the frontend).

# Node.js backend
cd backend
bun i
bun run dev
bun run build
# Frontend
cd frontend
bun i
bun run dev
bun run build
# One-shot build (backend bundles frontend)
cd backend
bun run build:auto

cd dist
node file-lite.min.mjs

Configuration

  • Config file path: ${cwd}/data/config.json
  • Type reference: IConfig
  • Environment variables example: .env.development
  • Generate and trust self-signed certificates with mkcert
  • If password is empty, File Lite generates a random password; when the config file already exists, the generated password is written back
  • jwtToken is the JWT signing secret; when an existing config file has an empty value, it is generated and written back
  • The console does not print JWTs or signing secrets; check the config file for the login password

About

Web 文件管理器 | Web file manager powered by Node.js / Golang. Optional dual backends.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages