A visual codebase analyzer that helps you understand and improve your code architecture by analyzing file sizes, complexity, and overall code shape.
- Visual Code Analysis: Interactive visualization of your codebase structure
- Code Shape Score: Quantitative metric for code health (lower is better)
- Per-Project Thresholds: Customize file size thresholds for each project
- History Tracking: Track code shape improvements over time
- Ignore Patterns: Configure which files/folders to exclude from analysis
- Real-time Analysis: Instantly analyze any directory on your system
- Frontend: Svelte 5, Vite
- Backend: FastAPI (Python)
- Storage: JSON file-based persistence
- Node.js 18+
- Python 3.11+
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd svelt-vibe-test- Install frontend dependencies:
npm install- Install backend dependencies:
pip3 install -r requirements.txtUse the provided start script to run both frontend and backend:
./start.shThis will start both servers in the background. The application will be available at http://localhost:5173
Alternatively, you can start each server manually:
- Start the backend server:
python3 run_backend.pyThe API will be available at http://localhost:8001
- In a new terminal, start the frontend development server:
npm run devThe application will be available at http://localhost:5173
- Browse: Navigate to any directory on your system using the file browser
- Analyze: Click "Analyze" on a directory to generate a code shape analysis
- Configure Threshold: Set custom line thresholds per project (default: 100 lines)
- View History: Track how your code shape changes over time
- Configure Ignores: Set patterns to exclude files/folders from analysis
The Code Shape Score is calculated based on:
- Total number of files (10 points per file)
- Total lines of code (0.1 points per line)
- Files exceeding threshold (exponential penalty for oversized files)
Lower scores indicate better code organization.
svelt-vibe-test/
├── src/
│ ├── lib/
│ │ ├── analysis/ # Analysis components
│ │ ├── browser/ # File browser components
│ │ ├── navigation/ # Navigation components
│ │ ├── settings/ # Settings components
│ │ └── visualization/ # Visualization components
│ ├── App.svelte # Main application component
│ └── main.js # Application entry point
├── backend/
│ ├── api/ # FastAPI routes
│ ├── models/ # Data models
│ └── utils/ # Utility functions
├── codebase_data/ # Analysis data storage
└── package.json
POST /analyze- Analyze a codebaseGET /history/{codebase_id}- Get analysis historyGET /latest/{codebase_id}- Get latest analysisGET /project-settings/{project_id}- Get project settingsPOST /project-settings/{project_id}- Save project settingsGET /browse- Browse filesystemGET /codebases- List all analyzed codebases
npm run buildnpm testDefault ignore patterns include:
node_modules.gitdistbuild.next.cachecoverage.env**.min.js*.min.css
You can configure additional patterns through the UI for each project.
