This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This repository contains a single-page React application for creating devfiles through a user-friendly GUI wizard. The application uses React and Tailwind CSS to provide a step-by-step interface for generating devfile 2.3.0 compliant YAML files.
Key Resources:
- Devfile specification: https://devfile.io/docs/
- Feature request: devfile/api#1765
- Devfile 2.3.0 spec should be the target version
Application Type: Single-page application (SPA) with no backend or persistent state UI Framework: React Styling: Tailwind CSS Output: Generated devfile.yaml files available for download
The application is stateless - all devfile generation happens client-side with no data persistence.
src/utils/factories.js- factories for every editable devfile element, and the conventions the wizard state follows:nullmeans "this optional sub-object is not selected",''means "selected but empty",undefinedfor a boolean means "not set", maps are kept as ordered[{ key, value }]arrays, free-formattributesare kept as raw YAML text, and elements of the reorderable lists carry a wizard-only_uidthatArrayFieldManageruses as the React key.src/utils/devfileGenerator.js-buildDevfile/generateYamlserialize the state by walking the schema explicitly (never by cleaning up the UI state), andvalidateDevfilereturns blockingerrorsand advisorywarnings.src/components/editors/- editors for one component, command, project, endpoint list or git source. They takevalue/onChangeand are reused by the steps and by the parent overrides, wherepartialrelaxes the required fields and keeps booleans tri-state.src/components/steps/- one component per entry ofWIZARD_STEPS, wired inWizardContainerby step id.
- Add it to the matching factory in
factories.js. - Serialize it in
devfileGenerator.jsand validate it if the schema or the devfile/api rules constrain it. - Expose it in the editor or step that owns the section.
- Add it to the fixtures in
tests/unit/fixtures/devfile-states.js- the schema coverage test fails while a schema field is never generated. - Update
SCHEMA_COVERAGE.md.
npm install- Install dependenciesnpm run dev- Start development servernpm run build- Build for production (intopublic/, which is the folder deployed to GitHub Pages)npm test- Run the whole Playwright suitenpm run test:unit- Serializer, validator and schema compliance tests (node, no browser)npm run test:e2e- Browser tests
There is no linter configured in this project.
This project uses the following MCP servers (configured in .mcp.json):
- context7: Provides up-to-date React and Tailwind CSS documentation
- playwright: For browser automation and testing
- Step-by-step wizard interface - Guide users through devfile creation with clear, sequential steps
- Devfile 2.3.0 compliance - Generated YAML must conform to the devfile 2.3.0 specification
- Download capability - Users must be able to download the generated devfile.yaml
- Single page design - All functionality contained in one web page with no routing
- No state persistence - Application does not save or persist user data between sessions
When working with this codebase, familiarize yourself with these devfile concepts:
- Components (containers, volumes, kubernetes, openshift and image components)
- Commands (exec, apply, composite) and their groups
- Events (preStart, postStart, preStop, postStop)
- Projects, starterProjects and dependentProjects (git and zip sources)
- Parent inheritance and overrides
- Metadata, variables and free-form attributes
SCHEMA_COVERAGE.md maps every schema field to the place it is edited, and lists the validation
rules applied on top of the schema. The schema itself is vendored in
tests/schema/devfile-2.3.0.json.
Refer to https://devfile.io/docs/ for detailed schema and examples.