Skip to content

Far-200/folder-structure-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ Folder Structure Visualizer

Folder Structure Visualizer is a developer tool that converts ASCII folder trees into an interactive visual explorer and allows exporting the structure as a downloadable scaffold ZIP.

Instead of manually creating dozens of folders and files when starting a project, you can paste a tree structure and generate the entire scaffold instantly.


โœจ Features

  • ๐Ÿ“‚ ASCII โ†’ Visual Tree Paste a standard ASCII folder tree and instantly visualize it.

  • ๐ŸŒณ Collapsible Folder Explorer Expand or collapse folders like a real file explorer.

    • ๐Ÿ” Smart Search & Highlight Instantly search files and folders by name.
    • Highlights matching text in real-time
    • Automatically expands relevant folders
    • Filters out non-matching branches for clarity
  • ๐Ÿ“Š File & Folder Counters Automatically counts total files and directories.

    • ๐ŸŽจ Intelligent File Icons Automatically assigns icons based on file types and names.
    • Supports multiple languages (JS, TS, Python, Java, C/C++, etc.)
    • Recognizes config files (package.json, .env, vite.config)
    • Enhances readability like a real IDE file explorer
  • ๐Ÿ“‹ Copy Path Click any file or folder and copy its full path.

  • ๐Ÿ“„ Copy Tree as Markdown Export the folder structure as Markdown.

  • ๐Ÿ“ฆ Download Project Scaffold Generate and download a ZIP containing the entire folder structure.

    • โš›๏ธ React + Vite Preset Instantly generate a ready-to-run React + Vite frontend scaffold.
  • ๐ŸŽจ Tailwind CSS Preset Add Tailwind CSS configuration and generate a styled starter homepage.

  • ๐ŸŸฆ TypeScript (TSX) Preset Generate TSX-based React scaffolds with App.tsx, main.tsx, vite.config.ts, and TypeScript config files.

  • ๐Ÿงฉ Node + Express Preset Generate a backend starter with Express and a clean folder structure.

  • ๐Ÿ–ฅ Custom Starter Screens Generated React scaffolds include a branded startup homepage with setup instructions.

  • โš ๏ธ Vite 8 Node Warning Generated frontend scaffolds show a built-in Node.js version warning for Vite 8 compatibility.

  • ๐Ÿšซ Smart Ignore Rules Automatically filters out generated folders like node_modules, dist, build, .next, and coverage.

  • ๐Ÿ–ฑ Drag & Drop Input Drop ASCII trees directly into the editor.

  • ๐Ÿง  Flexible Parsing Supports both standard ASCII trees (โ”œโ”€โ”€, โ””โ”€โ”€, โ”‚) and indentation-based structures. Indentation is only valid under folders (lines ending with /).

  • โœจ Smooth UI Interactions

    • Animated folder expand/collapse
    • Rotating chevrons for visual feedback
    • Subtle hover and click effects for better UX

๐Ÿ–ผ Preview

๐Ÿงฉ Full Interface


๐Ÿ” Smart Search & Highlight


  • Real-time search filtering
  • Auto-expands matching folders
  • Highlights matched text for quick scanning

๐Ÿง  Scaffold Presets & Placement

  • Generate React, TSX, Tailwind, and Express setups
  • Choose custom folder placement dynamically

๐Ÿ“‚ Example Usage

  • Paste ASCII tree โ†’ instantly visualize structure
  • Explore like a real file system

Input

my-app/
โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ favicon.ico
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.jsx
โ”‚   โ”‚   โ””โ”€โ”€ Footer.jsx
โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ””โ”€โ”€ HomePage.jsx
โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ””โ”€โ”€ main.jsx
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

Result

This becomes an interactive visual tree inside the UI.


๐Ÿ“ฆ Scaffold Export

The Download ZIP feature creates a project scaffold where the ZIP file is automatically named after your root folder.

โš ๏ธ Important All files are generated as empty files, allowing developers to start coding immediately without manually creating folders and files.

โš ๏ธ Note The scaffold system may occasionally generate a few extra folders or files (e.g., src/utils/) that were not explicitly defined in the ASCII tree.

This happens because certain presets (React, Vite, Tailwind, etc.) include framework-required or helper directories to ensure the project runs out of the box.

These additions are non-breaking and safe to remove.
If they are not needed for your project, feel free to delete them ("yeet them") without affecting functionality.

Included Scaffold Presets

The scaffold system can optionally generate starter files for:

  • React + Vite
  • React + Vite + Tailwind CSS
  • React + Vite + TypeScript (TSX)
  • React + Vite + TypeScript (TSX) + Tailwind CSS
  • Node + Express API
  • Root .gitignore

These presets are merged into the parsed folder tree and exported as part of the ZIP.


๐Ÿ›  Tech Stack

  • Framework: React (Vite)
  • Languages: JavaScript, TypeScript
  • Styling: CSS, Tailwind CSS
  • Backend Preset: Node.js, Express
  • Icons: Lucide React & React Icons
  • ZIP Generation: JSZip

โš›๏ธ Generated Frontend Presets

When scaffold options are selected, the exported ZIP can generate frontend starter projects with:

JSX Preset

  • App.jsx
  • main.jsx
  • vite.config.js

TSX Preset

  • App.tsx
  • main.tsx
  • vite.config.ts
  • vite-env.d.ts
  • tsconfig.json
  • tsconfig.app.json
  • tsconfig.node.json

Tailwind Support

When Tailwind is enabled, the scaffold also includes:

  • tailwind.config.js

  • postcss.config.js

    Styling Behavior

The scaffold intelligently adapts styling based on selected options:

  • With Tailwind CSS enabled

    • Uses utility-first styling
    • Does NOT generate App.css
    • Includes Tailwind config and directives in index.css
  • Without Tailwind

    • Generates a standard App.css
    • Uses traditional CSS styling

This ensures clean, minimal, and relevant project output without unused files.

Vite 8 Compatibility Note

Generated frontend starter pages include a visible warning that Vite 8 requires:

  • Node.js 20.19+, or
  • Node.js 22.12+

๐Ÿš€ Installation

Clone the repository:

git clone https://github.com/<your-username>/folder-structure-visualizer.git

Navigate into the project:

cd folder-structure-visualizer

Install dependencies:

npm install

Start the development server:

npm run dev

Open in browser:

http://localhost:5173

๐Ÿง  How It Works

  1. Input โ€“ User pastes an ASCII folder tree.
  2. Parsing โ€“ The parser converts the text into a nested JSON data structure.
  3. Visualization โ€“ The UI renders the structure as a collapsible file explorer.
  4. Action โ€“ The structure can then be:
    • copied as Markdown
    • explored visually
    • exported as a ZIP scaffold (ignoring build artifacts)

โšก Performance Considerations

The application is optimized for responsiveness and smooth interaction:

  • Efficient tree rendering using recursive components
  • Search operates with lightweight string matching (includes)
  • Only relevant branches are displayed during filtering
  • Minimal DOM updates ensure good performance even on mobile devices

For extremely large folder trees, performance remains stable due to controlled rendering and state management.



๐Ÿ† Highlights

  • Built a recursive tree rendering system from scratch
  • Designed a dynamic scaffold generator with conditional file creation
  • Implemented intelligent file-type recognition and icon mapping
  • Created a responsive and animated file explorer UI
  • Developed a real-world developer utility tool with practical use cases

๐ŸŽฏ Use Cases

  • Quick Scaffolding โ€“ Set up new projects in seconds.
  • Repo Visualization โ€“ Understand complex repository structures instantly.
  • Architecture Sharing โ€“ Share project designs with teammates.
  • Documentation โ€“ Generate clean trees for README files.
  • Preset-Based Project Bootstrapping โ€“ Generate React, TSX, Tailwind, and Express starter structures instantly.

๐Ÿ”ฎ Future Improvements

  • README auto-generation for exported projects
  • Preset variants (Minimal / Standard / Production-ish)
  • Custom starter pages and branding options
  • Export GitHub-ready repository metadata

๐Ÿ“œ License

This project is licensed under the MIT License.


๐Ÿ‘จโ€๐Ÿ’ป Author

Farhaan Khan Computer Science Engineering student passionate about building developer tools and learning through projects.


โญ Support

If you found this project useful, consider starring the repository to support development!

Releases

No releases published

Packages

 
 
 

Contributors