An open API service indexing awesome lists of open source software.

https://github.com/storyblok/monoblok

The Storyblok OSS monorepo
https://github.com/storyblok/monoblok

astro js next nuxt react svelte vue

Last synced: 3 months ago
JSON representation

The Storyblok OSS monorepo

Awesome Lists containing this project

README

          



Storyblok Logo

Monoblok



A monorepo that consolidates all JavaScript projects from the Storyblok organization. This project aims to centralize the development, maintenance, and contribution to Storyblok's ecosystem of SDKs and tools.







Follow @Storyblok


Follow @Storyblok

## 📦 Packages

This monorepo contains the following official Storyblok SDKs and integrations:

### Core SDKs

| Package | Description | Version | Downloads |
| -------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| [@storyblok/js](packages/js) | Core JavaScript SDK for Storyblok | [![](https://img.shields.io/npm/v/@storyblok/js?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/js) | [![](https://img.shields.io/npm/dm/@storyblok/js?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/js) |
| [storyblok-js-client](packages/js-client) | JavaScript client for Storyblok's Content Delivery API | [![](https://img.shields.io/npm/v/storyblok-js-client?color=8d60ff&label=%20)](https://www.npmjs.com/package/storyblok-js-client) | [![](https://img.shields.io/npm/dm/storyblok-js-client?color=8d60ff&label=%20)](https://www.npmjs.com/package/storyblok-js-client) |
| [storyblok-cli](packages/cli) | A powerful CLI tool to improve the DX of your Storyblok projects. | [![](https://img.shields.io/npm/v/storyblok?color=8d60ff&label=%20)](https://www.npmjs.com/package/storyblok) | [![](https://img.shields.io/npm/dm/storyblok?color=8d60ff&label=%20)](https://www.npmjs.com/package/storyblok) |
| [@storyblok/region-helper](packages/region-helper) | A helper package to handle Storyblok APIs in different regions. | [![](https://img.shields.io/npm/v/@storyblok/region-helper?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/region-helper) | [![](https://img.shields.io/npm/dm/@storyblok/region-helper?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/region-helper) |

### Framework Integrations

| Package | Description | Version | Downloads |
| ------------------------------------ | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| [@storyblok/react](packages/react) | React SDK for Storyblok | [![](https://img.shields.io/npm/v/@storyblok/react?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/react) | [![](https://img.shields.io/npm/dm/@storyblok/react?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/react) |
| [@storyblok/vue](packages/vue) | Vue SDK for Storyblok | [![](https://img.shields.io/npm/v/@storyblok/vue?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/vue) | [![](https://img.shields.io/npm/dm/@storyblok/vue?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/vue) |
| [@storyblok/nuxt](packages/nuxt) | Nuxt SDK for Storyblok | [![](https://img.shields.io/npm/v/@storyblok/nuxt?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/nuxt) | [![](https://img.shields.io/npm/dm/@storyblok/nuxt?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/nuxt) |
| [@storyblok/svelte](packages/svelte) | Svelte SDK for Storyblok | [![](https://img.shields.io/npm/v/@storyblok/svelte?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/svelte) | [![](https://img.shields.io/npm/dm/@storyblok/svelte?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/svelte) |
| [@storyblok/astro](packages/astro) | Astro SDK for Storyblok | [![](https://img.shields.io/npm/v/@storyblok/astro?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/astro) | [![](https://img.shields.io/npm/dm/@storyblok/astro?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/astro) |

### Utilities

| Package | Description | Version | Downloads |
| ---------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| [@storyblok/richtext](packages/richtext) | Rich Text Renderer for Storyblok | [![](https://img.shields.io/npm/v/@storyblok/richtext?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/richtext) | [![](https://img.shields.io/npm/dm/@storyblok/richtext?color=8d60ff&label=%20)](https://www.npmjs.com/package/@storyblok/richtext) |

## 🚧 Migration Status

This repository represents an ongoing migration from a polyrepo structure to a unified monorepo. While we're actively working on this transition, please note:

- All new development should be done in this repository
- Existing packages are being migrated gradually
- Some packages may still be in their original repositories during the transition
- We're working to ensure a smooth migration with minimal disruption

## 🛠️ Development

### Prerequisites

- Node.js (v18 or later)
- pnpm (v8 or later)
- Git

### Setup

1. Clone the repository:
```bash
git clone https://github.com/storyblok/monoblok.git
cd monoblok
```

2. Install dependencies:
```bash
pnpm install
```

### Package Management with PNPM

This repository uses PNPM as its primary package manager, providing efficient dependency management and disk space usage. The workspace is configured in `pnpm-workspace.yaml` and includes all packages in the `packages/` directory.

Common PNPM commands:
```bash
# Install dependencies
pnpm install

# Add a dependency to a specific package
pnpm add --filter @storyblok/react

# Run a script in a specific package
pnpm --filter @storyblok/react
```

### Development with NX

While PNPM manages our packages, we use NX to optimize our development workflow. NX provides powerful features for:

- Intelligent caching
- Affected package detection
- Dependency graph visualization
- Parallel task execution
- Project-specific configurations

#### Common NX Commands

```bash
# Build all packages
pnpm build

# Build a specific package
pnpm build @storyblok/react

# Run tests for affected packages
pnpm nx affected:test

# Show dependency graph
pnpm nx graph

# Run commands only on affected packages
pnpm nx affected --target=build
```

#### Development Workflows

```bash
# Start development mode for a package
pnpm dev @storyblok/react

# Run tests in watch mode
pnpm test:watch @storyblok/react

# Lint all packages
pnpm lint

# Format all packages
pnpm format

# Check types
pnpm type-check
```

For more advanced NX usage, we recommend exploring:
- [NX Documentation](https://nx.dev/docs)
- [NX Cache](https://nx.dev/concepts/how-caching-works)
- [NX Affected](https://nx.dev/concepts/affected)
- [NX Project Configuration](https://nx.dev/concepts/project-configuration)

### Repository Administration

For repository administrators, we provide the `monoblock-cli` tool to help manage the monorepo. This tool assists with:

- Package migration
- Dependency management
- Repository maintenance
- Release coordination

See the [monoblock-cli package](packages/monoblock-cli) for detailed documentation and usage instructions.

## 📄 Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on:
- Code style and standards
- Pull request process
- Development workflow
- Testing requirements

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🔗 Links

- [Storyblok Documentation](https://www.storyblok.com/docs)
- [Storyblok Website](https://www.storyblok.com)
- [Storyblok Status](https://status.storyblok.com)
- [Storyblok GitHub Organization](https://github.com/storyblok)