miiidev/LAWCATOR
a lightweight static web application for discovering lawyers and law firms in Malaysia.
What's novel
a lightweight static web application for discovering lawyers and law firms in Malaysia.
Code Analysis
15 files read · 4 roundsA static web directory for discovering Malaysian lawyers and law firms with client-side fuzzy search (Fuse.js), an ECharts choropleth map of Malaysia states, and Google Maps integration for location-based browsing with route drawing.
Strengths
The map scripts use a clean IIFE module pattern (State/View/Markers/Route) with proper separation, theme-aware styling via CSS custom properties, route request ID invalidation to prevent stale async responses, and place details caching. The typeahead component is genuinely reusable with full keyboard navigation, ARIA compliance, and animated placeholder cycling.
Weaknesses
Significant code duplication across files (escapeHtml, highlightLabel, fillSelect, syncCityOptionsForState appear in 3-4 files), a duplicate function definition in find.js, no automated tests whatsoever, and lawyer-details.js is a 16KB monolith mixing data fetching, DOM rendering, map logic, and card building. The project hardcodes ~65 legal categories rather than deriving them from data, and uses inconsistent search initialization (shared FuseSearch wrapper vs. inline Fuse instances).
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
186
Contributors
6
Files
150
Active weeks
6
Repository
Language
CSS
Stars
1
Forks
0
License
MIT