@dicebear/core

Generate deterministic, seed-based SVG avatars in 35+ styles

Library
npm
v10.7.0
9,514stars
MIT License

Repository Health

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

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
80/100Excellent
Architecture80
Code Quality76
Innovation78
Learning Curve84

@dicebear/core is the rendering engine behind DiceBear, an open-source avatar library that turns any seed string (a username, email, or user ID) into a reproducible SVG avatar. The same seed always produces the same avatar, so applications can store a short string instead of an uploaded image while still giving every user a distinct, recognizable identicon.

Core itself is style-agnostic: avatar styles (35+, covering illustrated characters, geometric identicons, pixel art, and more) live as separate JSON style definitions from the @dicebear/collection package or dicebear/styles repo, and Core’s Avatar class combines a style definition with seed and options to produce SVG output (toString(), toDataUri()). The same core+style architecture is reimplemented natively in PHP, Python, Rust, Go, and Dart, all producing byte-identical SVG output to the JavaScript reference.

What You Get

  • An Avatar class that combines a style definition, seed, and options into rendered SVG output
  • toString() and toDataUri() output methods for embedding avatars directly in HTML or CSS
  • A style-agnostic core so any of the 35+ @dicebear/collection styles (or a custom Figma-authored style) can be rendered through the same API
  • Deterministic seeding via a built-in PRNG, guaranteeing the same seed always renders the same avatar
  • Shared architecture across six language ports (JS/TS, PHP, Python, Rust, Go, Dart) verified against a common test suite for byte-identical SVG output

Common Use Cases

  • Generating default profile-picture avatars for new user signups without requiring an image upload
  • Rendering consistent avatars server-side (PHP, Python, Go, Rust) and client-side (JS) from the same seed for cross-platform apps
  • Building a self-hosted avatar HTTP API or CLI tool on top of Core for bulk avatar generation
  • Embedding customizable, brand-consistent placeholder avatars in dashboards, chat apps, or admin panels

Under The Hood

Architecture - Avatar.ts is the central class, composing a StyleDefinition, a seeded Prng, an OptionsDescriptor/Options validation layer, and a Renderer that walks the style definition to produce SVG output; a Resolver.ts and Style.ts mediate between the generic core and style-specific JSON definitions supplied by @dicebear/collection or custom Figma-exported styles. This separation is what lets one core renderer support 35+ visually distinct avatar styles without style-specific code living in the core package.

Tech Stack - TypeScript/Node (requires Node >=22), compiled via tsc with @tsconfig/recommended, validated against JSON Schema via ajv and the sibling @dicebear/schema package, and built as an ESM-only package ("type": "module"). The monorepo is a Turborepo (turbo.json) workspace containing parallel implementations in PHP, Python, Rust, Go, and Dart under src/, each targeting output parity with the JS reference.

Code Quality - Uses Node’s built-in test runner (node --test) rather than a third-party framework, keeping the dev dependency surface minimal; a tests/ directory alongside src/ exercises the Avatar/Resolver/Style pipeline. The project maintains a cross-language shared test suite (per the root README) that requires byte-identical SVG output across all six ports, which is an unusually strict quality bar for a monorepo spanning that many ecosystems.

API Design - The public API is deliberately small: construct new Avatar(definition, options), then call .toString() or .toDataUri() — most of the complexity (35+ styles, per-style options) lives in the style definitions rather than the core API surface, keeping onboarding fast. The same three-call shape (import, construct, .toString()) is mirrored across all six language ports per the README’s code sample, which lowers the learning curve for teams working across multiple backend languages.

Used by 13 apps in this directory

Go
32%
Apache 2.0

CubeSandbox

Developer Tools · Security · AI Agents

11,816

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
83
Repo Health
88
Technical
63
Dependency
Built with
Go32%
Rust28%
C23%
Updated yesterday
Go
32%
Apache 2.0

CubeSandbox

Developer Tools · Security · AI Agents

11,816

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
83
Repo Health
88
Technical
63
Dependency
Built with
Go32%
Rust28%
C23%
Updated yesterday
TypeScript
81%
MIT

LibreChat

Developer Tools · AI Assistants

42,871

Unite every major AI model in one self-hosted chat platform with agents, code execution, MCP tools, and enterprise authentication.

View details
93
Repo Health
81
Technical
65
Dependency
Built with
TypeScript81%
JavaScript18%
Updated today
TypeScript
81%
MIT

LibreChat

Developer Tools · AI Assistants

42,871

Unite every major AI model in one self-hosted chat platform with agents, code execution, MCP tools, and enterprise authentication.

View details
93
Repo Health
81
Technical
65
Dependency
Built with
TypeScript81%
JavaScript18%
Updated today
TypeScript
99%
Other

NocoBase

No Code Platforms · Low Code Platforms

24,071

Open-source AI + no-code platform that lets coding agents and people collaborate to build business systems fast on proven infrastructure.

View details
94
Repo Health
81
Technical
63
Dependency
Built with
TypeScript99%
Updated today
Vue
41%
AGPL 3.0

Operational

Analytics · Automation · Monitoring

476

Open-source event tracker with real-time push notifications and action buttons for tech founders.

View details
54
Repo Health
68
Technical
71
Dependency
Built with
Vue41%
JavaScript38%
MDX13%
Updated 1 months ago
Vue
41%
AGPL 3.0

Operational

Analytics · Automation · Monitoring

476

Open-source event tracker with real-time push notifications and action buttons for tech founders.

View details
54
Repo Health
68
Technical
71
Dependency
Built with
Vue41%
JavaScript38%
MDX13%
Updated 1 months ago
Vue
41%
AGPL 3.0

Operational

Analytics · Automation · Monitoring

476

Open-source event tracker with real-time push notifications and action buttons for tech founders.

View details
54
Repo Health
68
Technical
71
Dependency
Built with
Vue41%
JavaScript38%
MDX13%
Updated 1 months ago
TypeScript
56%
Other

Tolgee

Developer Tools

4,092

In-context localization platform that lets developers and translators edit app strings directly in the running application, with AI-powered machine translation and framework SDKs for React, Angular, Vue, and Svelte.

View details
91
Repo Health
84
Technical
66
Dependency
Built with
TypeScript56%
Kotlin43%
Updated yesterday

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