@dicebear/core

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

Library
npm
v10.7.0
9,725 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
80 /100 Excellent
Development Activity 100
Maintenance 72
Community 48
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
80 /100 Excellent
Architecture 80
Code Quality 76
Innovation 78
Learning Curve 84

@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

AI Agents · Developer Tools · Security

12,728

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
82
Repo Health
88
Technical
63
Dependency
Built with
Go 32%
Rust 26%
C 22%
Updated 1 weeks ago
Go
32%
Apache 2.0

CubeSandbox

AI Agents · Developer Tools · Security

12,728

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
82
Repo Health
88
Technical
63
Dependency
Built with
Go 32%
Rust 26%
C 22%
Updated 1 weeks ago
TypeScript
82%
MIT

LibreChat

AI Assistants · Developer Tools

45,009

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
TypeScript 82%
JavaScript 17%
Updated 4 days ago
TypeScript
82%
MIT

LibreChat

AI Assistants · Developer Tools

45,009

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
TypeScript 82%
JavaScript 17%
Updated 4 days ago
TypeScript
99%
Other

NocoBase

Low Code Platforms · No Code Platforms

24,377

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
TypeScript 99%
Updated 5 days ago
Vue
41%
AGPL 3.0

Operational

Analytics · Automation · Monitoring

475

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

View details
52
Repo Health
68
Technical
68
Dependency
Built with
Vue 41%
JavaScript 38%
MDX 13%
Updated 2 months ago
Vue
41%
AGPL 3.0

Operational

Analytics · Automation · Monitoring

475

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

View details
52
Repo Health
68
Technical
68
Dependency
Built with
Vue 41%
JavaScript 38%
MDX 13%
Updated 2 months ago
Vue
41%
AGPL 3.0

Operational

Analytics · Automation · Monitoring

475

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

View details
52
Repo Health
68
Technical
68
Dependency
Built with
Vue 41%
JavaScript 38%
MDX 13%
Updated 2 months ago
TypeScript
56%
Other

Tolgee

Developer Tools

4,115

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
90
Repo Health
84
Technical
65
Dependency
Built with
TypeScript 56%
Kotlin 43%
Updated 1 weeks ago

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