Create Atomic Design-based Atoms, Molecules, Organisms, Templates, and Pages with matching stories, tests, styles, mocks, interfaces, and barrel exports.
Atomic Bomb
Atomic Bomb is a powerful component generator that creates Atomic Design-based Atoms, Molecules, Organisms, Templates, and Pages with matching stories, tests, styles, mocks, interfaces, and barrel exports. It streamlines the development process by automating the creation of well-structured and maintainable components.

Generate Components
Use Atomic Bomb's CLI to generate components based on the Atomic Design methodology, ensuring a consistent and scalable architecture for your React and React Native projects.
Replace

Create Stories and Tests
Automatically generate Storybook stories and test files for each component, enabling you to develop and test your components in isolation.

Maintain Consistent Styles and Mocks
Atomic Bomb creates matching style files and mock data for your components, helping you maintain a consistent design system across your application.

Experimental AI Features (v7.0.x)
In this version, Atomic Bomb introduces experimental AI features that leverage natural language processing to enhance the component generation process. These features include the ability to generate components based on descriptive prompts, automatically suggest improvements to existing components, and provide insights into potential design inconsistencies. While these AI capabilities are still in the early stages of development, they represent a significant step towards making Atomic Bomb an even more powerful tool for developers looking to create scalable and maintainable component libraries.
Warning: The AI features in Atomic Bomb v7.0.x are experimental and may produce inconsistent results. Use them with caution and always review the generated code for accuracy and maintainability.
Features
Generate Atomic Design-based Atoms, Molecules, Organisms, Templates, and Pages with matching stories, tests, styles, mocks, interfaces, and barrel exports.
AI Enabled
The new experimental AI features in Atomic Bomb v7.0.x leverage natural language processing to enhance the component generation process, allowing developers to create components based on descriptive prompts.
Atomic Bomb
Atomic Bomb is a small CLI for generating React project structure from atomic design and DDD-style conventions.
It can create:
- atomic components: ,atom,molecule,organism,templatepage
- shared files next to components: ,hooklib
- feature modules with their own atomic structure
- domain containers and subdomain folders
- scoped domain files: ,api,event,helper,hook,model,page,servicestate
- structure JSON exports and imports
- recursive generated item removal
> **Important** > This tool is for educational purposes.
Install
Or install it in a project:
You can also run it with
Requirements
Run Atomic Bomb from the root of a project with a
The CLI checks the configured
Quick Start
Configure the platform:
Create a component:
After the first configuration,
Usage
Platforms
Platforms are pulled from the template repository configured in
Use:
This writes or updates
Available platforms depend on the template repository. See atomic-bomb-templates.
Configuration
Atomic Bomb creates a
Example:
Fields:
- : dependency name to check insearchpackage.json
- : component file extension:extension,js,jsxortstsx
- : default platform used whenplatformis omitted--platform
- : component root, usuallydestinationsrc/components
- : whetherscssfiles are created and updated_index.scss
- : optional provider configuration forai--ai
AI fields:
- : whether AI-assisted generation is configuredenabled
- : provider adapter name; platform setup defaults toprovideropenai
- : provider API base URL; platform setup defaults tobaseUrlhttps://api.openai.com/v1
- : provider model name; platform setup defaults tomodelgpt-5-mini
- : environment variable that contains the API key; platform setup asks only for this value and defaults toapiKeyEnv; secrets are not stored inOPENAI_API_KEY.atomic-bomb
- : installed skill index path, defaulting toskillPath.skills/atomic-bomb/<atomic-bomb-version>/index.md
The
AI-Assisted Generation
Configure the platform and AI provider first:
During platform setup, Atomic Bomb can store provider settings in
Running
Refresh the installed skill files without reconfiguring the platform:
This replaces
Use
For page and organism requests, Atomic Bomb seeds the scaffold plan with the standard skill-driven composition stack before asking the provider to complete files. A form-like page request will consistently scaffold base atoms such as
Add
Create an AI-assisted atom:
Create a composed molecule:
Create a page-level feature:
Create and validate a page-level feature:
Create a scoped component inside a domain subdomain:
For
- whether existing atoms, molecules or organisms should be reused or extended
- which Atomic Bomb artifacts should be scaffolded
- which contracts, props and variants are needed_types_
- which TypeScript and Sass barrels must be updated
- which token-backed CSS variables and Sass mixins should be used
- which mocks, stories and tests should be completed
- which validation command should run before completion
- whether should fail because generated code violates the skill, contains likely bugs or has usability/accessibility problems--validate
The CLI stores the AI intent with the parsed command and exposes the provider configuration. If no adapter exists for the configured provider, the command exits with a clear error.
Compatibility
Atomic Bomb remains compatible with existing non-AI generation workflows. Commands that do not pass
AI support is opt-in:
- must be passed before any provider call is made--ai
- and--promptare invalid without--validate--ai
- the optional block is ignored by normal scaffolding commands.atomic-bomb.ai
- API keys are read only from the configured environment variable and are not stored in .atomic-bomb
There are two additive filesystem changes in newer versions:
- installs bundled skill files intoatomic-bomb -p.skills/atomic-bomb/<atomic-bomb-version>/
- atomic directory setup creates orsrc/components/_types_/index.tsindex.js
Those additions are safe for existing projects, but they can make the generated project tree slightly larger than older Atomic Bomb versions. Use
Naming
Atomic Bomb normalizes names by type.
Component and container types use
- atom
- molecule
- organism
- template
- page
- module
- domain
- subdomain
Non-component file types use
- api
- event
- helper
- hook
- lib
- model
- service
- state
Examples:
Existing
CLI Output
Generated output uses icons for the newer structure types:
- : 🪝hook
- : 📚lib
- : 🏢domain
- : 🗄️subdomain
Atomic Components
Create one component:
Create multiple components:
Create a multi-word component:
Atomic components are created in:
Example output for a React TypeScript component:
Atomic directory indexes are created for each component bucket:
When
- ->tsxts
- ->jsxjs
Hooks
Create hooks next to
Output:
The generated file contains:
Lib
Create shared lib files next to
Output:
The generated file contains:
Domains
Create a domain directory next to
Output:
The top-level
<!-- prettier-ignore -->
Modules
Create a feature module next to
Output:
The top-level
<!-- prettier-ignore -->
Use either
Atomic types are generated under
<!-- prettier-ignore -->
Modules support only atomic components, hooks, libs, and services. Hooks, libs, and services are generated in their matching module-level folders. Referencing a module that does not exist creates its structure automatically.
Modules can also belong to a domain or subdomain:
These commands create:
Generate artifacts inside a nested module by combining
Each nested
<!-- prettier-ignore -->
Module component stories include the module in their Storybook title:
Top-level domain and module namespace barrels can be imported and composed directly:
Subdomains
Create a subdomain inside a domain:
If the domain does not exist, it is created.
Output:
The subdomain
<!-- prettier-ignore -->
Scoped Generation
Use
Atomic component types go into the subdomain
Example:
Scoped domain file types go into their matching folders:
Examples:
Each folder index is updated:
Scoped generation repairs missing subdomain index files when the subdomain already exists.
Scoped component stories include their domain and subdomain in the Storybook title:
The same convention applies to components rendered directly for a domain:
Generated Documentation
Generated libs, hooks, services, domains, subdomains, modules, and scoped DDD files include a
<!-- prettier-ignore -->
Existing MDX documentation is preserved when a domain, subdomain, or module is reused for additional generated files.
Pass
For these documented artifacts, AI completion updates the named source and MDX files without expanding the Atomic Design component scaffold. The provider is instructed to preserve the MDX
Remove Generated Items
Remove generated items by name:
The remove command scans generated
<!-- prettier-ignore -->
Clean Unused Items
Scan generator-owned component, domain, module, hook, lib, and service folders for unused paths:
The command lists every proposed deletion and asks for confirmation:
A generated path is considered unused when its name is not referenced by another source file. Barrel files, stories, tests, and mocks do not count as usage. This is a conservative text scan rather than compiler-level dead-code analysis, so review the displayed paths before confirming.
Only
Export Structure
Export the current generated structure as JSON:
This exports the directory structure, not file contents.
Example:
Create From Structure
Create all items listed in a structure file:
The JSON is validated with Zod before generation. Invalid files stop with an error.
Scoped items must use:
Module items use
Subdomains use a domain-only
License
GPL-1.0-only


