Getting Started with DiracX Web Development
This tutorial walks you through setting up a DiracX Web development environment, making your first change, and running tests.
Prerequisites
Before starting, ensure you have the following installed:
You should also have basic knowledge of:
Setting up the environment
Follow the Setup web environment guide to clone the repository and install dependencies:
Running the development server
Start the development server against a remote DiracX backend:
The application will be available at http://localhost:3000. Changes to source files are reflected in real time.
Project structure
The repository is a monorepo with three main packages:
packages/diracx-web-components— Reusable React component library published to npmpackages/diracx-web— Main Next.js application that consumes the componentspackages/extensions— Example extension (gubbins) showing how to build custom extensions
Making your first change
- Open
packages/diracx-web-components/src/components/and pick a component to modify. - Make a small change (e.g. update a label or add a tooltip).
- The dev server will hot-reload your change automatically.
Running tests
Unit tests (Jest + React Testing Library):
End-to-end tests (Cypress — requires a running DiracX backend):
Storybook (interactive component documentation):
Next steps
- Creating a web extension — Build a custom DiracX web extension
- Create a web application — Add a new application to DiracX Web
- Contribute to web — Contribution guidelines for DiracX Web