{"id":29072982,"url":"https://github.com/licht1stein/dijkstra","last_synced_at":"2026-05-06T15:44:09.679Z","repository":{"id":300303983,"uuid":"1005833510","full_name":"licht1stein/dijkstra","owner":"licht1stein","description":"Interactive Dijkstra's algorithm route optimizer with WebAssembly \u0026 JavaScript implementations. AI-assisted development with Claude Code.","archived":false,"fork":false,"pushed_at":"2025-06-23T12:12:42.000Z","size":2564,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-23T12:36:18.381Z","etag":null,"topics":["ai-assisted","algorithm-visualization","claude-code","dijkstra-algorithm","javascript","pathfinding","preact","route-optimization","webassembly"],"latest_commit_sha":null,"homepage":"https://licht1stein.github.io/dijkstra/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/licht1stein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T22:58:01.000Z","updated_at":"2025-06-23T12:12:45.000Z","dependencies_parsed_at":"2025-06-23T12:37:05.201Z","dependency_job_id":null,"html_url":"https://github.com/licht1stein/dijkstra","commit_stats":null,"previous_names":["licht1stein/dijkstra-react","licht1stein/dijkstra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/licht1stein/dijkstra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licht1stein%2Fdijkstra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licht1stein%2Fdijkstra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licht1stein%2Fdijkstra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licht1stein%2Fdijkstra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/licht1stein","download_url":"https://codeload.github.com/licht1stein/dijkstra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/licht1stein%2Fdijkstra/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262278925,"owners_count":23286536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assisted","algorithm-visualization","claude-code","dijkstra-algorithm","javascript","pathfinding","preact","route-optimization","webassembly"],"created_at":"2025-06-27T15:00:41.232Z","updated_at":"2026-05-06T15:44:09.521Z","avatar_url":"https://github.com/licht1stein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dijkstra's Algorithm Route Optimizer\n\nAn interactive logistics route optimizer using Dijkstra's shortest path algorithm implemented in both **WebAssembly** and **JavaScript**. Built with Preact for optimal performance and vanilla CSS for a clean, responsive design.\n\n\u003e **Note**: This is an exploratory repository demonstrating AI-assisted development with [Claude Code](https://claude.ai/code).\n\n🌐 **Live Demo**: [https://licht1stein.github.io/dijkstra/](https://licht1stein.github.io/dijkstra/)\n\n## Demo\n\n![Demo](./img/dijkstra.gif)\n\n## Features\n\n- 🎯 **Interactive Canvas**: Click/tap to create unlimited cities with smart naming (A-Z, AA-ZZ, AAA-ZZZ)\n- 🔗 **Smart Connections**: Drag between cities to create weighted routes\n- ✏️ **Weight Editing**: Click connection weights to modify them\n- 📱 **Touch Support**: Full mobile compatibility with long-press gestures\n- 🚀 **Dual Implementation**: Choose between WebAssembly and JavaScript algorithms\n- ⚡ **WebAssembly Performance**: High-speed pathfinding for large networks\n- 🎲 **Network Generator**: \"Randomize Connections\" creates complex, realistic route networks\n- 💾 **Persistence**: Auto-saves state and preferences to localStorage\n- 🔄 **Reset Function**: Clear canvas and start fresh\n- 📐 **Responsive Design**: Works seamlessly on all screen sizes\n\n## Live Demo\n\nThis app is automatically deployed to GitHub Pages when you push to the `master` or `main` branch.\n\n## Setup for GitHub Pages\n\n1. **Create a GitHub repository** and push your code:\n   ```bash\n   git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git\n   git push -u origin master\n   ```\n\n2. **Enable GitHub Pages**:\n   - Go to your repository on GitHub\n   - Navigate to Settings → Pages\n   - Under \"Source\", select \"GitHub Actions\"\n\n3. **Wait for deployment**:\n   - The GitHub Action will automatically run when you push\n   - Check the Actions tab to monitor the deployment\n   - Your site will be available at: `https://YOUR_USERNAME.github.io/YOUR_REPO_NAME/`\n\n## Local Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run development server\nnpm run dev\n\n# Build for production\nnpm run build\n```\n\n## Architecture\n\n### Tech Stack\n- **Preact** (~3KB) - Lightweight React alternative for optimal performance\n- **WebAssembly** - High-performance algorithm implementation with JavaScript fallback\n- **Vanilla CSS** - Custom styling with CSS variables and responsive design\n- **Vite** - Fast build tool and development server\n- **GitHub Actions** - Automated CI/CD deployment\n\n### Project Structure\n```\nsrc/\n├── core/              # Business logic modules\n│   ├── dijkstra.js    # JavaScript implementation\n│   ├── dijkstra-wasm.js # WebAssembly implementation with fallback\n│   ├── graph.js       # Graph data structure with unlimited cities\n│   ├── geometry.js    # Coordinate calculations\n│   └── storage.js     # LocalStorage persistence\n├── components/        # Preact components\n│   ├── App.jsx        # Main application with dual algorithms\n│   ├── Canvas.jsx     # Canvas rendering\n│   ├── Controls.jsx   # Control panel with implementation selector\n│   └── ConnectionEditor.jsx\n├── styles/            # Vanilla CSS modules\n│   ├── main.css       # Base styles \u0026 variables\n│   ├── components.css # Component styles\n│   └── buttons.css    # Button styles\n└── wasm/              # WebAssembly module\n    ├── dijkstra.wasm  # Compiled WebAssembly binary\n    ├── dijkstra.wat   # WebAssembly text format\n    └── build.js       # Build tooling\n```\n\n### Key Design Patterns\n- **Dual Algorithm Architecture**: WebAssembly + JavaScript implementations with automatic fallback\n- **Separated Business Logic**: Core algorithms isolated from UI components\n- **Intelligent Network Generation**: Creates realistic, complex route topologies\n- **Mobile-First Design**: Touch-friendly with responsive layouts  \n- **Performance Optimized**: Preact reduces bundle size by ~93% vs React\n- **Framework-Agnostic Core**: Business logic can be reused in any framework\n\n## Advanced Features\n\n### WebAssembly Implementation\n- **High Performance**: Optimized pathfinding for networks with hundreds of cities\n- **Automatic Fallback**: Gracefully falls back to JavaScript if WASM fails to load\n- **User Choice**: Manual selection between implementations via dropdown\n- **Performance Monitoring**: Real-time indication of active implementation\n\n### Smart Network Generation\n- **Realistic Topologies**: Creates networks resembling real logistics/transportation systems\n- **Guaranteed Connectivity**: Ensures all cities are reachable via spanning tree algorithm\n- **Complex Routing**: Multiple path options between cities for interesting optimization scenarios\n- **Distance-Weighted Connections**: Shorter routes more likely, with strategic long-distance alternatives\n- **Scalable**: Works efficiently from small (5 cities) to large (100+ cities) networks\n\n### Unlimited City Support\n- **Smart Naming**: Automatic progression from A-Z → AA-ZZ → AAA-ZZZ → City1, City2...\n- **No Artificial Limits**: Create as many cities as your device can handle\n- **Performance Scaling**: WebAssembly implementation maintains speed with large networks","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flicht1stein%2Fdijkstra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flicht1stein%2Fdijkstra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flicht1stein%2Fdijkstra/lists"}