A modern web application built with React and Vite that visualizes project file structures with ASCII art and provides comprehensive code statistics. Perfect for documenting projects, analyzing codebases, and understanding project organization at a glance.
- π Local Folder Analysis: Upload and analyze local project folders
- π GitHub Repository Analysis: Directly analyze public GitHub repositories
- π³ ASCII Tree Visualization: Generate beautiful ASCII art representations of file structures
- π Code Statistics: Get detailed insights about your codebase including:
- Total files and lines of code
- File type distribution
- Largest files identification
- Processing time metrics
- π¨ Interactive Tree Controls:
- Toggle file sizes and line counts
- Color-coded file types and sizes
- Ignore/exclude files and folders from output
- π Copy to Clipboard: Easy copying of ASCII trees for documentation
- π Dark/Light Theme: Modern UI with theme switching
- β‘ Real-time Progress: Live progress tracking during file processing
- π Smart File Filtering: Automatically handles binary files and large files
β οΈ Rate Limit Monitoring: Real-time GitHub API rate limit tracking and warnings
Upload local folders or analyze GitHub repositories with an intuitive interface
Interactive file tree with ignore/include controls and detailed file information
Beautiful ASCII art representation with customizable display options
Comprehensive code analysis with file type distribution and metrics
Direct GitHub repository analysis with rate limit monitoring
Visit the live application: ASCII File Structure Viewer
- React 18 - Modern React with hooks
- Vite - Fast build tool and development server
- Material-UI (MUI) - Beautiful and accessible UI components
- GitHub API - Direct repository analysis with rate limiting
- File API - Local file system access
- Clone the repository:
git clone https://github.com/ibrahimahtsham/ascii-file-structure-viewer-web.git
cd ascii-file-structure-viewer-web
- Run the appropriate script for your system:
Windows:
run_script.bat
Linux/macOS:
chmod +x run_script.sh
./run_script.sh
The script will automatically:
- Install dependencies if this is your first run
- Provide a menu with options to:
- Start the development server
- Deploy to GitHub Pages
- Run linting and dependency checks
If you prefer to install manually:
- Clone the repository:
git clone https://github.com/ibrahimahtsham/ascii-file-structure-viewer-web.git
cd ascii-file-structure-viewer-web
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173
- Click "Select Project Folder"
- Choose a folder from your computer
- Select which files to include/exclude
- View the generated ASCII tree and statistics
- Enter a GitHub repository URL (e.g.,
facebook/react
orhttps://github.com/facebook/react
) - The app will automatically fetch and analyze the repository
- Monitor rate limit usage in real-time
- Customize the output with various display options
- Unauthenticated: 60 requests per hour
- With Personal Access Token: 5,000 requests per hour (coming soon)
- Real-time rate limit monitoring shows remaining requests
- Automatic delays when approaching limits
- Show File Sizes: Display file sizes in the ASCII tree
- Show Line Counts: Include line counts for code files
- Color Coding: Enable color-coded visualization
- Ignore Files: Exclude specific files or folders from the output
src/
βββ components/
β βββ AsciiTree/ # ASCII tree visualization components
β βββ CodeStats.jsx # Code statistics display
β βββ FileTreeViewer/ # Interactive file tree viewer
β βββ ThemeToggle.jsx # Dark/light theme switcher
βββ pages/
β βββ Home/ # Main application page
β βββ components/
β β βββ GithubSection.jsx # GitHub repository input
β β βββ ProgressSection/ # Progress tracking components
β βββ hooks/
β β βββ useFileProcessor.js # File processing logic
β βββ utils/
β βββ github/
β βββ GitHubAPI/ # GitHub API integration
βββ utils/
β βββ fileProcessor/ # File processing and analysis utilities
βββ theme/ # Material-UI theme configuration
βββ App.jsx # Main application component
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run deploy
- Deploy to GitHub Pagesnpm run lint
- Run ESLintnpx depcheck
- Check for unused dependencies
Or use the helper scripts:
- Windows:
run_script.bat
- Linux/macOS:
./run_script.sh
The application supports various configuration options:
- File Size Limits: Configurable maximum file sizes for processing (1MB default for GitHub files)
- Supported Extensions: Comprehensive list of supported file types with MIME type detection
- GitHub API: Built-in rate limiting, error handling, and progress tracking
- Processing Options: Batch processing with real-time progress updates
- GitHub Authentication - Sign in with GitHub for 5,000 requests/hour
- Private Repository Support - Access private repositories with authentication
- Enhanced Rate Limit Management - Better handling of API quotas
- Repository Caching - Cache analyzed repositories to reduce API calls
- Export Options - PDF, PNG, SVG export of ASCII trees
- Custom Styling - Personalize ASCII tree appearance
- Comparison Mode - Compare multiple repositories side-by-side
- API Integration - REST API for programmatic access
- Collaboration Features - Share and collaborate on repository analyses
- Advanced Filtering - More sophisticated file filtering options
- Performance Optimization - Faster processing for large repositories
- Better Binary Detection - Improved binary file handling
- Progressive Loading - Stream results as they're processed
- Offline Mode - Work with previously analyzed repositories offline
To increase your API rate limit from 60 to 5,000 requests per hour:
- Sign in with GitHub - Use OAuth to authenticate
- Generate Personal Access Token - Create a token with repository access
- Enhanced Features - Access private repositories and higher rate limits
Benefits of Authentication:
- π 83x more API requests (5,000 vs 60 per hour)
- π Private repository access
- π Better rate limit management
- β‘ Faster repository analysis
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Large repositories may take time to process due to API rate limits
- GitHub API rate limits apply (60 requests/hour for unauthenticated users)
- Some binary files may not be properly detected
- Very deep directory structures may hit recursion limits
This project is licensed under the MIT License.
- Built with Vite and React
- UI components from Material-UI
- GitHub API for repository access with comprehensive rate limiting
- Icons from Material Icons
- Real-time progress tracking and error handling
If you have any questions or need help, please:
- π Report Issues: Open an issue on GitHub
- π Documentation: Check our Wiki
- π§ Direct Contact: Reach out to the maintainers