This repository contains a small local-only file explorer template:
- app.py — Flask backend that lists files under a single "shared" directory and returns file contents for allowed text files.
- templates/index.html — Minimal frontend that requests the file list and shows a viewer.
- static/style.css, static/app.js — Frontend styling and logic.
- shared/ — (create this folder) put files you want to inspect locally.
Important security notes:
- This template is explicitly READ-ONLY and intended for local testing only on 127.0.0.1.
- The backend enforces:
- Only files inside the "shared" folder are accessible.
- Files with sensitive names (password, secret, token, email, etc.) are blocked.
- Only certain extensions are allowed for viewing (.py, .txt, .js, .html, .css, .md, .json, etc.).
- Files larger than 200 KB are not returned.
- Do NOT deploy this to the public internet. If you plan to modify for production, implement proper authentication, strong ACLs, remove debug mode, review logging and rate-limiting.
Run locally:
- python -m venv venv
- source venv/bin/activate (or venv\Scripts\activate on Windows)
- pip install -r requirements.txt
- mkdir shared
- python app.py
- Open http://127.0.0.1:5000
If you want changes (different folder, additional blocked names, or a more advanced viewer), tell me what to change and I can update the template.