Leaflet

The leading lightweight open-source JavaScript library for mobile-friendly interactive maps.

Library
npm
v1.9.4
45,492stars
BSD-2-Clause

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
87/100Excellent
Development Activity92
Maintenance72
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
86/100Excellent
Architecture90
Code Quality88
Innovation82
Learning Curve85

Leaflet is a lightweight, open-source JavaScript library for building interactive maps on the web. Weighing roughly 40 kB of gzipped JS plus a few kilobytes of CSS, it provides all the core mapping primitives most applications need — tile layers, markers, popups, vector overlays, and GeoJSON rendering — without pulling in a heavy dependency tree.

Designed around simplicity, performance, and cross-platform usability, Leaflet works efficiently across desktop and mobile browsers out of the box and degrades gracefully on older ones. Its small, class-based core is intentionally minimal; almost everything beyond the basics (routing, clustering, heatmaps, drawing tools, additional tile providers) is delivered through a large third-party plugin ecosystem rather than baked into the library itself, which keeps the base bundle small while still supporting sophisticated mapping applications.

What You Get

  • A tile-layer engine that works with any XYZ/TMS raster tile provider (OpenStreetMap, Mapbox, custom servers) with no vendor lock-in
  • Vector drawing primitives — polylines, polygons, circles, and rectangles — rendered via SVG or Canvas
  • Marker, popup, and tooltip components with custom icon support out of the box
  • Built-in GeoJSON layer support for rendering and styling geographic data directly from standard GeoJSON objects
  • Touch, keyboard, and mouse interaction handling (drag, zoom, double-click zoom, box zoom, touch pinch-zoom) tuned for mobile
  • A documented extension API (L.Class, L.Evented, L.Handler) that the plugin ecosystem builds on for routing, clustering, drawing tools, and additional tile sources

Common Use Cases

  • Embedding a store-locator or ‘find us’ map with custom markers and popups on a marketing site
  • Building internal dashboards that plot GeoJSON boundaries or sensor/asset locations over a base map
  • Powering data-journalism or humanitarian-mapping projects that need lightweight, self-hostable maps without a paid API key
  • Adding a drawable/interactive map layer to a field-operations or logistics app via plugins like Leaflet.draw or marker clustering

Under The Hood

Architecture Leaflet’s execution model centers on L.Map (src/map/Map.js), which owns the DOM container, coordinate transforms, and a panning/zoom animation loop, and delegates rendering to a stack of L.Layer subclasses (src/layer/Layer.js, LayerGroup.js, tile/, vector/) added and removed via a shared addLayer/removeLayer lifecycle. Geometry and projection math live in src/geo and src/geometry, decoupling coordinate-system logic (CRS, projections) from DOM rendering, while user interaction (drag, scroll-wheel zoom, touch, keyboard) is implemented as pluggable L.Handler instances (src/core/Handler.js) attached per-map-instance rather than hardcoded into L.Map — the same pattern third-party plugins use to add new interactions without forking the core.

Tech Stack The library is plain, dependency-free JavaScript (ES modules, "type": "module" in package.json) built with Rollup (build/rollup-config.js) into UMD and ES bundles plus a companion leaflet.css; there is no runtime dependency on a framework or a specific tile/basemap provider. Development tooling is modern (ESLint 10 flat config, Husky pre-commit hooks, Vitest with a real-browser Playwright provider for DOM-accurate tests), and the project self-monitors bundle size via bundlemon.

Code Quality The spec/suites directory contains roughly 49 test files covering core classes, layers, geometry, and DOM interaction helpers, run against an actual browser via @vitest/browser-playwright rather than a DOM shim, which gives meaningfully higher confidence for a browser-rendering library than jsdom-based tests would. Source files carry structured leafdoc comments (// @function, // @class) that double as the API reference generator input, and the core class system (src/core/Class.js) enforces a consistent extension/options-merging convention used uniformly across the codebase.

API Design The public API follows one consistent idiom throughout — chainable methods returning this, a class-mixin pattern (L.Class.extend) for building custom layers/handlers, and declarative options objects merged via mergeOptions — so once a developer learns L.Map/L.Marker, plugin APIs feel familiar rather than bolted-on. Getting a basic map on screen requires only a few lines (instantiate L.map, add a L.tileLayer, call setView), and the leafdoc-generated reference plus a large library of runnable examples (docs/examples) keep the learning curve shallow for a library of this scope.

Used by 19 apps in this directory

TypeScript
69%
Other

Budibase

Low Code Platforms · No Code Platforms

28,220

Build AI agents, automations, and internal apps on a single open-source platform with full self-hosting control.

View details
92
Repo Health
81
Technical
63
Dependency
Built with
TypeScript69%
Svelte26%
Updated today
JavaScript
52%
MIT

evidence

Analytics · Data Engineering

6,861

Turn SQL queries and markdown files into polished, interactive data apps and business intelligence reports — no drag-and-drop, no GUI, just code.

View details
65
Repo Health
79
Technical
65
Dependency
Built with
JavaScript52%
Svelte40%
Updated today
Go
39%
MIT

ezBookkeeping

Invoicing Finance

5,424

Lightweight self-hosted personal finance manager with AI receipt scanning, multi-currency support, and MCP integration for complete data privacy.

View details
88
Repo Health
80
Technical
75
Dependency
Built with
Go39%
Vue33%
TypeScript25%
Updated yesterday
Python
64%
MIT

Flowfile

Data Engineering

341

Visual ETL that compiles to Polars — build pipelines on a canvas, export as standalone Python, and run anywhere without platform lock-in.

View details
83
Repo Health
81
Technical
66
Dependency
Built with
Python64%
Vue19%
TypeScript16%
Updated today
Vue
56%
AGPL 3.0

Frappe CRM

CRM

3,351

Open-source CRM with unlimited users, built-in Twilio, Exotel, WhatsApp, and ERPNext integrations — self-host in minutes.

View details
92
Repo Health
68
Technical
78
Dependency
Built with
Vue56%
Python33%
Updated yesterday
Ruby
67%
Other

GitLab

Devops · Developer Tools

24,533

The complete DevOps platform that unifies Git hosting, CI/CD, issue tracking, and security scanning into a single self-hostable application.

View details
87
Repo Health
86
Technical
70
Dependency
Built with
Ruby67%
JavaScript20%
Updated today
TypeScript
96%
Other

Lightdash

Analytics · Data Engineering

6,056

The open-source Looker alternative that turns your dbt project's metrics and dimensions into governed, self-serve charts and dashboards — no license key required.

View details
93
Repo Health
84
Technical
66
Dependency
Built with
TypeScript96%
Updated today
JavaScript
44%
Other

LimeSurvey

Forms Surveys

3,698

The world's most flexible open-source survey platform with 900+ templates, conditional logic, 80+ languages, and full GDPR compliance for any scale.

View details
86
Repo Health
62
Technical
62
Dependency
Built with
JavaScript44%
PHP34%
CSS12%
Updated today
Go
51%
MIT

memos

Note Taking

62,350

Open-source, self-hosted note-taking built for quick capture — Markdown-native, lightweight, and fully yours.

View details
91
Repo Health
78
Technical
66
Dependency
Built with
Go51%
TypeScript48%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search