Roadmap.js is a lightweight, dependency-free JavaScript library to generate beautiful web project roadmaps from simple JSON data.
- 🚀 Lightweight & Fast: Zero dependencies, minimal footprint.
- 🎨 Beautiful UI: Modern, clean design out of the box.
- 📱 Responsive: Works on desktops and tablets.
- 🌐 Localization: Easily translate all labels and date formats.
- 🛠️ Customizable: Control colors, epic details, and layout.
- 📄 Standalone Export: Built-in scripts to generate static HTML files for hosting.
npm install roadmap.js<script src="https://unpkg.com/roadmap.js/dist/roadmap.umd.cjs"></script>
<link rel="stylesheet" href="https://unpkg.com/roadmap.js/dist/roadmap.css">import { Roadmap } from 'roadmap.js';
import 'roadmap.js/dist/roadmap.css';
const data = {
name: "My Awesome Project",
milestones: [
{
name: "Q3 2026",
epics: [
{
id: "E01",
name: "Core Engine",
start: "2026-07-01",
duration: { value: 8, unit: "weeks" },
tasks: [
{ id: "T01", title: "Setup architecture" },
{ id: "T02", title: "Implement parser" }
]
}
]
}
]
};
const roadmap = new Roadmap({
data: data,
mountPoint: '#roadmap',
lastUpdated: '2026-08-13',
epicColors: {
'E01': '#3b82f6'
}
});
roadmap.init();The repository includes a gallery of examples in the projects/ directory. You can use these as a template for your own projects:
| Project | Timeline | Epic Cards |
|---|---|---|
| Awesome | ![]() |
![]() |
| Daenerys | ![]() |
![]() |
| Élysée | ![]() |
![]() |
The main index.html acts as a gallery. To manage projects:
- Organization: Projects are stored in the
projects/directory. Use numeric prefixes (e.g.,01-project-name) to control their display order in the gallery. - Branding: Define a
"themeColor"in the project'sdata.jsonto customize its appearance in the gallery. - Generation: Run
npm run buildto automatically update the gallery index and generate standalone versions for each project.
The library expects a JSON object with the following structure:
{
"name": "Project Name",
"milestones": [
{
"name": "Milestone Name",
"epics": [
{
"id": "UniqueID",
"name": "Epic Name",
"start": "YYYY-MM-DD",
"duration": { "value": 4, "unit": "weeks" },
"tasks": [
{ "id": "T01", "title": "Task Description" }
]
}
]
}
]
}| Option | Type | Default | Description |
|---|---|---|---|
data |
Object | Required | The roadmap data (milestones, epics, tasks). |
mountPoint |
String/Element | document.body |
Where to render the roadmap. |
lastUpdated |
String | "" |
Date string shown in the header. |
epicColors |
Object | {} |
Mapping of Epic IDs to hex colors. |
locale |
String | 'en-US' |
Locale for date formatting. |
monthFormat |
String | 'short' |
Format for month labels ('short', 'long', 'numeric'). |
translations |
Object | {...} |
Custom translations for UI labels, see below. |
You can customize the following keys in the translations object:
| Key | Default Value | Description |
|---|---|---|
weekPrefix |
'W' |
Prefix for week numbers (e.g., "W32"). |
weekOf |
'Week of' |
Tooltip prefix for the start date of a week. |
labelColumn |
'Milestones / Epics' |
Header for the first column of the roadmap. |
durationWeeks |
'weeks' |
Label for duration in weeks. |
durationMonths |
'months' |
Label for duration in months. |
epicsCount |
'EPICS' |
Badge label for the number of epics in a milestone. |
idLabel |
'ID' |
Column header for task IDs. |
taskLabel |
'Task' |
Column header for task titles. |
emptyTasks |
'No tasks defined for this EPIC.' |
Message shown when an epic has no tasks. |
startPrefix |
'Start:' |
Prefix for start date in tooltips. |
durationPrefix |
'Duration:' |
Prefix for duration in tooltips. |
epicPrefix |
'EPIC' |
Prefix for Epic IDs (e.g., "EPIC E01"). |
lastUpdated |
'Last Updated' |
Label for the last update date in the header. |
legend |
'This roadmap is a living document...' |
Text shown at the bottom of the roadmap. |
Run
npm run buildStandalone HTML files are exported in dist/<project>/index.html.
The generated files can be hosted directly with no dependencies.
Currently, there is no built-in PNG or PDF export feature. However, using a modern browser (e.g., Chrome/Chromium), you can:
- Open the roadmap webpage
- Enable Responsive Mode in DevTools
- Adjust the width to fit the entire timeline without a horizontal scrollbar (e.g.,
2500px) - In the
Elementstab, right-click on<body> Capture node screenshot
- Open the roadmap webpage
- Ctrl + P (or Cmd + P on macOS) to Print
Destination: Save as PDF,Layout: Landscape, enableBackground Graphics- Adjust
Paper Size,MarginsandScale Save
See example exports in the export/ directory.
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run buildReleases are published to both GitHub and npm. The commands below require push access to the repository, an npm account with access to the roadmap.js package, and the GitHub CLI for creating the GitHub release.
-
Merge all release changes into
main, then update the local branch:git switch main git pull --ff-only npm ci npm run build
-
If the build updates
dist/, review and commit those generated files before continuing. -
Bump the package version according to semantic versioning. This updates
package.jsonandpackage-lock.json, creates a release commit, and tags it:npm version patch # or minor / major -
Push the release commit and tag, then create the GitHub release:
git push origin main --follow-tags VERSION=$(node -p "require('./package.json').version") gh release create "v$VERSION" --generate-notes
-
Publish to npm. The
prepublishOnlyscript rebuilds the package before publishing:npm login npm publish
-
Deploy the gallery and standalone examples to GitHub Pages:
npm run deploy
The deployment script builds the project, replaces the contents of the gh-pages branch with dist/, and pushes the branch to GitHub.
MIT © Gilles Lepretre





