This is a monorepo that contains all dicedb related tools and applications that make it fun and easy to use in the real world.
A monorepo is a single repository that contains multiple projects. This allows us to manage all the projects in a single repository, making it easier to share code and manage dependencies across projects.
This repository is an amalgamation of all the tools and applications that make DiceDB fun and easy to use in the real world. The name is a nod to this amalgamation, and inspired by the alloy.
This monorepo includes the following packages/apps:
@dicedb/playground-web
@ ./apps/playground-web: an interactive platform designed to let users experiment with DiceDB commands in a live environment, similar to the Go Playground@dicedb/ui
@ ./packages/ui: common UI components for alloy apps packaged into a internal package
@dicedb/eslint-config
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)@dicedb/typescript-config
:tsconfig.json
s used throughout the monorepo@dicedb/tailwind-config
:tailwind.config.js
s used throughout the monorepo
Ensure you have nvm
installed. If not, run the following command
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
Ensure you have the following installed:
- node.js (v18.17.0 or later)
- yarn (v4.5.1)
nvm install 20.0.0
nvm use 20.0.0
corepack enable
If you're unfamiliar with yarn, it’s an alternative package manager that is faster and more efficient than npm. Learn more about yarn here.
Clone the repository and install the dependencies:
git clone <repository-url>
cd alloy
yarn install
Note
Please go through the README of each package/app to understand how to run and develop them. The READMEs are located in the respective package/app directories. The information below is a quick reference to get you started common for all packages/apps.
To build all apps and packages, run the following command:
cd alloy
yarn build
To build a specific package/app, run the following command:
cd alloy
yarn build --filter @dicedb/playground-web
These commands will not only build the package requested but also build all the dependencies of the package requested.
We also have a
yarn build:playground
alias that does the same thing asyarn build --filter @dicedb/playground-web
for convenience.
To develop all apps and packages, run the following command:
cd alloy
yarn dev
To develop a specific package/app, run the following command:
cd alloy
yarn dev --filter @dicedb/playground-web
These commands will not only start the development server for the package requested but also start the development server for all the dependencies of the package requested.
We also have a
yarn dev:playground
alias that does the same thing asyarn dev --filter @dicedb/playground-web
for convenience.
To run tests for all apps and packages, run the following command:
cd alloy
yarn test
To run tests in watch mode for all apps and packages, run the following command:
cd alloy
yarn test:watch
To format all apps and packages, run the following command:
cd alloy
yarn format
To lint all apps and packages, run the following command:
cd alloy
yarn lint
The monorepo is divided into 3 main directories:
apps
: contains all the applications i.e. deployable unitspackages
: contains all the packages i.e. reusable code across the appstooling
: contains all the configurations and tooling used across the monorepo
The Code Contribution Guidelines are published at CONTRIBUTING.md; please read them before you start making any changes. This will ensure a consistent standard of coding practices and developer experience.
Contributors can join the Discord Server for quick collaboration.