Skip to content

GlazeBlox5/html-css-python-js-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local File Explorer — Template

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:

  1. python -m venv venv
  2. source venv/bin/activate (or venv\Scripts\activate on Windows)
  3. pip install -r requirements.txt
  4. mkdir shared
  5. python app.py
  6. 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published