Skip to content

Latest commit

Β 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Localhost Explorer

Screenshot 1 Screenshot 2

🧭 Clean, modern, and developer-friendly localhost dashboard Stop scrolling through folders. Instantly see, detect, and open your local projects with the correct entry point.


✨ Why Localhost Explorer?

If you work with many local projects (Laravel, Yii2, React, WordPress, etc.), the default Apache index quickly becomes messy and unproductive.

Localhost Explorer replaces it with a smart dashboard that:

βœ… Detects frameworks automatically
βœ… Routes to the correct entry point
βœ… Looks clean, modern, and fast
βœ… Requires zero configuration


πŸ”₯ Features

πŸ“ Project Explorer

  • Browse all local project folders (personal, work, experiments)
  • Clean card-based UI with project grouping

πŸ” Automatic Framework Detection

Supports popular frameworks out of the box:

  • 🟣 Yii2 β†’ /web
  • πŸ”΄ Laravel β†’ /public
  • 🟒 CodeIgniter 4 β†’ /public
  • πŸ”΅ Symfony β†’ /public
  • 🍰 CakePHP β†’ /webroot
  • πŸ“° WordPress β†’ root
  • πŸ“„ Plain PHP projects
  • βš›οΈ JavaScript projects (React, Vue, Next, Vite, etc.)

πŸš€ Smart Entry Point Routing

Automatically redirects to:

  • public/
  • web/
  • webroot/
  • dist/
  • build/

No more guessing URLs.

🎨 Developer-Friendly UI

  • Modern, responsive design
  • Framework badges
  • Easy scanning & navigation

πŸ”’ Secure by Default

  • Prevents directory traversal (../)
  • Restricts access to document root
  • Uses safe realpath() validation

⚑ Lightweight

  • Pure PHP
  • No database
  • No framework dependency

πŸ–₯️ Preview

A modern dashboard displaying all local projects with framework badges, system info, and smart routing β€” replacing the default Apache welcome page.


πŸ“‚ Example Folder Structure

/var/www/html
β”œβ”€β”€ index.php          # Localhost Explorer
β”œβ”€β”€ example-folder/
β”‚   β”œβ”€β”€ app-1/         # Plain PHP / standard folder
β”‚   β”œβ”€β”€ app-2/         # Laravel project
β”‚   β”œβ”€β”€ app-3/         # CodeIgniter 4 project
β”‚   β”œβ”€β”€ app-4/         # Yii2 project
β”‚   └── app-5/         # Node.js / JS project

πŸ“‚ Required Folder Structure

⚠️ IMPORTANT The repository must be placed directly inside Apache document root.

Example:

Apache Document Root
(htdocs / www / html)
β”‚
β”œβ”€β”€ localhost-explorer/     ← this repository
β”‚   β”œβ”€β”€ index.php
β”‚   β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ install.php
β”‚   └── ...
β”‚
β”œβ”€β”€ index.php               ← auto-generated (redirect)
β”œβ”€β”€ .htaccess               ← auto-generated
β”œβ”€β”€ project-a/
β”œβ”€β”€ project-b/

βš™οΈ Installation (Cross-Platform)

Works on:
βœ… Linux
βœ… Windows (XAMPP / Laragon)
βœ… macOS
βœ… CLI & Browser


1️⃣ Clone repository into Apache document root

cd <APACHE_DOCUMENT_ROOT>
git clone https://github.com/dwiwijaya/localhost-explorer.git

Examples:

Linux    : /var/www/html
XAMPP    : C:\xampp\htdocs
Laragon  : C:\laragon\www

2️⃣ Run installer

You can run the installer using CLI or Browser.

Option A β€” CLI (Recommended)

cd localhost-explorer
php install.php

Option B β€” Browser

http://localhost/localhost-explorer/install.php

3️⃣ What the installer does

The installer will:

βœ… Detect Apache document root automatically

  • (parent directory of the repository)*

βœ… Create or overwrite:

  • index.php
  • .htaccess

βœ… Backup existing files with timestamp
βœ… Redirect Apache root (/) to localhost-explorer/


4️⃣ Generated files

/index.php

<?php
header('Location: localhost-explorer/');
exit;

/.htaccess

RewriteEngine On

# Redirect root to localhost-explorer
RewriteRule ^$ localhost-explorer/ [L]

5️⃣ Apache configuration (one-time check)

Make sure Apache prioritizes index.php:

DirectoryIndex index.php index.html index.htm

Usually already set by default in XAMPP / Laragon / Ubuntu.

Reload Apache if needed.


6️⃣ Open in browser

http://localhost/

πŸŽ‰ Localhost Explorer is now your Apache root dashboard.


🧠 How Detection Works

Localhost Explorer scans each folder and detects frameworks based on well-known files:

Framework Detection File Entry Point
Yii2 yii /web
Laravel artisan /public
CI4 spark /public
Symfony bin/console /public
CakePHP bin/cake /webroot
WordPress wp-config.php /
JS Apps package.json /dist or /build

πŸ“Œ If no framework is detected, the folder is treated as a standard directory.


🧩 Supported JavaScript Projects

βš›οΈ React (CRA, Vite)
🟒 Vue (Vue CLI, Vite)
β–² Next.js
πŸ§ͺ Vanilla JS

If no production build is found, the project will be marked as JS (dev).


πŸ” Security Considerations

🚫 Blocks ../ path traversal
πŸ”’ Limits access strictly to document root
πŸ›‘οΈ Uses realpath() validation everywhere

Safe to use as a local development dashboard.


🚧 Roadmap

Planned improvements:

πŸ”Ž Detect running dev servers (3000, 5173, etc.)
⭐ Favorite / pin projects
🐍 Python framework support


🀝 Contributing

Contributions are very welcome ❀️

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Open a pull request

Ideas, issues, and feedback are appreciated.


πŸ“„ License

MIT License β€” free to use, modify, and share.


πŸ‘¨β€πŸ’» Author

Built for developers who juggle many local projects and want a clean, productive localhost experience.

If this tool helps you, consider ⭐ starring the repo!

About

Clean and interactive localhost dashboard to explore projects and automatically detect frameworks and correct entry points (Laravel, CI, Yii, Symfony, JS, and more).

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages