Documentation
How Revilo works
Revilo connects to your Figma file and GitHub repository, compares what's defined in design against what's built in code, and gives your team a clear score with actionable findings.
Overview
What Revilo measures
Revilo answers one question: how closely does your design system in Figma match the components and tokens in your codebase?
It produces three scores — Alignment, Adoption, and Architecture — each measuring a different dimension of design system health. These scores are backed by specific findings (individual issues) and recommendations (suggested fixes with effort and impact estimates).
What you need
To get a real report you need two things connected:
- Figma — a published component library or any file with components and styles/variables
- GitHub — a React codebase with
.tsx/.jsxcomponent files and token files
If you haven't connected sources yet, the dashboard shows a sample report based on a built-in design system example so you can explore the interface first.
How it works
Step 1 — Connect sources
You authorize Revilo to read your Figma file and GitHub repository via OAuth. Revilo only requests read access — it never writes to either source.
Step 2 — Scan
When you click Run scan, Revilo fetches data from both sources in parallel:
- From Figma: all components and component sets (grouped by their variant dimensions), all tokens via the Variables API or Styles API fallback, and usage signals like detached instances and local styles applied directly in the file.
- From GitHub: PascalCase
.tsx/.jsxfiles insrc/components,components, orpackages/*. Token files in paths containing token, theme, color, spacing, etc. Reads CSS variables, JS/TS nested objects, and JSON (including W3C Design Token format).
Step 3 — Normalize and match
All component and token names are normalized (lowercase, punctuation removed) so Button/Primary in Figma matches Button.tsx in GitHub. Revilo then pairs every Figma component with its GitHub counterpart, and every Figma token with its GitHub equivalent.
Components are matched by exact normalized name. A small synonym table handles known renames (e.g. Notification → Alert). Tokens are matched by name first, then by value (same value but different name = naming mismatch).
Step 4 — Score and surface findings
Each match produces data that feeds into the three scores and a list of findings. The scan typically completes in 10–30 seconds depending on library size.
Alignment Score
What it measures
Alignment asks: are the same components and tokens defined in both Figma and your code, with the same shape?
A score of 100 means every Figma component has a matching component in code with identical variants, and every token has the same name and value on both sides. Lower scores mean things exist in one place but not the other, or their definitions have drifted apart.
How it's calculated
Alignment is a weighted average of four sub-scores:
Matched Figma components ÷ total Figma components. A component is matched when its normalized name exists as a GitHub component file.
Among matched components, how many have the same variant set on both sides. A Button with primary/secondary/ghost in Figma but only primary/secondary in code is a variant mismatch.
Figma tokens with no name or value mismatch ÷ total Figma tokens. Requires both sources to be connected.
Starts at 100. Each renamed component (matched via synonym) or token naming mismatch deducts 8 points.
Adoption Score
What it measures
Adoption asks: is your team actually going through the design system — or working around it?
A high adoption score means designers are using shared library components (not detaching and restyling them) and engineers are using design tokens (not hardcoding colors and spacing directly in component files).
How it's calculated
Adoption is split evenly between the design and engineering perspectives:
Starts at 100. Penalized by detached instances (frames or groups whose name matches a library component — a signal the instance was detached and manually restyled) and local styles/variables applied directly instead of through the shared library. Scaled relative to library size.
Starts at 100. Penalized by: deprecated component usage (−6 pts each), chaotic component naming like Button2 or CardFinal (−5 pts each), and hardcoded hex colors or pixel values found directly in component files (−4 pts each).
Architecture Score
What it measures
Architecture asks: is your design system built on a solid structural foundation?
This covers whether your token system follows the right hierarchy (base values → semantic purpose tokens), whether your component organization in Figma maps to your folder structure in code, and whether naming is clean and intentional.
How it's calculated
What percentage of Figma tokens have a classifiable tier (primitive or semantic). Tokens named things like homepage-purple or checkout-padding can't be classified and are flagged as unknown.
Ratio of semantic tokens to primitive tokens. A healthy system has purpose-driven tokens (color.action.primary.background) built on top of base values (color.blue.500), not just raw values used directly everywhere.
Penalized by chaotic naming in GitHub — components ending in numbers, 'old', or 'final' suggest the hierarchy has broken down.
For each matched component, compares Figma's grouping (e.g. Foundations/Forms) against the GitHub folder (e.g. src/components/forms). Flags mismatches where Figma has categories but GitHub is a flat folder.
Token tiers explained
Revilo classifies each token into one of three tiers:
- Primitive — raw values with no semantic meaning. Example:
color.blue.500 = #3B82F6 - Semantic — purpose-driven tokens that reference primitives. Example:
color.action.primary.background = color.blue.500 - Unknown — can't be classified, usually because of ad-hoc naming. Example:
homepage-purple
The classification is based on the token's name structure, not its value. A semantic token should describe where and how it's used, not what the value is.
Findings & severity
What a finding is
A finding is a specific, detected issue in your design system. Each finding belongs to one of the three score areas (Alignment, Adoption, Architecture) and has a severity level.
Severity levels
High
Likely causing real inconsistencies visible to users or slowing down teams. Should be addressed soon.
Medium
Worth fixing in the next sprint. Creates technical debt and makes the system harder to maintain.
Low
Polish items. Low impact individually but accumulate over time.
Finding types
The most common finding types and what they mean:
Component missing in code
A Figma component has no matching file in GitHub. Either it hasn't been built yet or it was named differently.
Component missing in design
A GitHub component has no Figma counterpart. It may be a legacy component or one built without a design spec.
Variant mismatch
A component exists on both sides but with different variant options — e.g. Figma has a 'danger' variant that code doesn't implement.
Token value mismatch
The same token name exists in both Figma and code but with different values — e.g. color.border.default is #E5E7EB in Figma but #D1D5DB in code.
Token naming mismatch
Same token value but different names across Figma and code. Creates confusion about which token to use.
Hardcoded value
A color or spacing value used directly in a component file instead of referencing a token. Makes global updates harder.
Detached instance
A Figma component instance that was detached and manually restyled — a signal the library didn't support the use case.
Local style
A style defined within a Figma file rather than pulled from a shared library.
Missing semantic layer
A primitive token used directly in a component without a semantic alias. Makes theming and global changes harder.
Dashboard pages
Overview
/dashboard
Top-level snapshot. Shows all three scores, your biggest risks, team drift breakdown (are designers or engineers creating more drift?), and top recommendations. The trend chart shows how scores have moved across your last several scans.
Alignment
/dashboard/alignment
Full list of alignment findings — components that exist only in Figma or only in code, variant mismatches, and token name/value discrepancies. Filterable by severity and finding type.
Adoption
/dashboard/adoption
Engineering and design adoption breakdown. Shows hardcoded values in component files with file paths, detached Figma instances, and local styles. The most actionable page for reducing drift fast.
Architecture
/dashboard/architecture
Token tier distribution (primitive vs. semantic vs. unknown), component hierarchy issues, and structure consistency findings. Useful for long-term system health.
Team Insights
/dashboard/team-insights
Splits findings by team — which issues are coming from the design side vs. the engineering side. Helps direct conversations and accountability.
Recommendations
/dashboard/recommendations
All recommendations ranked by impact and effort. Each recommendation is linked to the finding(s) it addresses and includes a suggested fix.
Sources
/dashboard/sources
Manage your connected Figma and GitHub sources. Reconnect, add Figma file keys, change the GitHub repo, or disconnect.
Data sources
Figma — Variables vs. Styles
Revilo tries the Figma Variables API first. This is available on Figma Professional and above and gives full token names and values.
If the Variables API returns a 403 (plan restriction), Revilo falls back to the Styles API. It then fetches the actual style node from Figma to get the fill color, typography spec, or effect value. The yellow notice on your dashboard tells you which mode is active.
GitHub — what gets read
Revilo walks your repo's git tree and reads:
- PascalCase
.tsx/.jsxfiles in component directories - Files with token, theme, color, spacing, variables, foundation, primitive in their path
- CSS custom properties (
--token-name), JS/TS exports, JSON (including W3C Design Token format)
It skips test files, story files, config files, and node_modules. For large repos, it uses the Contents API to discover files by directory rather than walking the full tree.
FAQ
Why are my scores based on sample data?
You'll see sample data until you connect both Figma and GitHub sources. Go to Sources in the sidebar to connect them, then run a scan.
My component exists in code but Revilo says it's missing.
Check that the file is PascalCase (e.g. Button.tsx, not button.tsx), not in a test or story file, and lives under a recognized component directory (src/components, components, packages/*/src). The component must also export the name from the file.
Figma says I need Enterprise for Variables.
If the Figma Variables API returns a 403, Revilo automatically falls back to your Styles. You'll see a yellow notice on the dashboard. Token name analysis still works; value comparisons use the style node values fetched via the Figma REST API.
Why is my Adoption score low even though we use the design system?
The most common cause is hardcoded values — hex colors or pixel sizes written directly in component files instead of referencing tokens. Check the Adoption page for the specific files and values.
How does Revilo detect detached instances?
It walks the Figma file at depth 2 looking for FRAME or GROUP nodes whose name matches a known library component. These are likely instances that were detached and converted to regular frames.
Can I connect multiple Figma files?
Yes. On the Sources page you can add multiple Figma files and assign each a role (seed variables, primitive tokens, semantic tokens, component library, or project file). Revilo fetches all of them and merges the data.
How often should I rescan?
After any significant design or code change. The Monitoring plan runs automatic scans and sends an email if scores drop significantly.
Ready to scan your design system?
Connect Figma and GitHub and get your first report in under a minute.