Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .prompts/project-info.prompttemplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# JSON Forms Documentation Website

Docusaurus-based documentation website for [JSON Forms](https://github.com/eclipsesource/jsonforms), a declarative framework for building JSON Schema based forms.

## Key Architectural Decisions

- **Content in `/content/`**: All MDX content lives here, NOT in `/docs/` (Docusaurus default)
- **Sidebars in `/src/sidebars/`**: Navigation configs are separate files, not in docusaurus.config.js
- **Custom Blog Plugin** (`plugins/custom-blog-plugin.js`): Injects latest post into homepage
- **Version fetching**: `build.sh` queries GitHub API, writes to `/static/current-version.js`

## Important Patterns

### Interactive Examples
Use the `Demo` component (`src/components/common/Demo.js`) which renders JSON Forms with Material-UI and provides tabbed Schema/UI Schema/Form views.

### Adding Documentation
1. Create MDX file in `/content/docs/` or `/content/examples/`
2. Add entry to the appropriate sidebar in `/src/sidebars/`

### Custom Renderers
Example custom renderers exist in `src/components/common/` (rating, country, region controls).

### Component Development
- React components go in `/src/components/`
- Use the existing Demo component pattern for interactive examples
- Follow CSS Modules pattern for component-specific styles

## Important Guidelines

**Always build and test changes**: Run the build to check for compilation errors, then start the dev server and visually verify changes work correctly. Check for console errors in the browser. Do not consider a task complete until the build passes and changes have been visually verified.
34 changes: 34 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# JSON Forms Documentation Website

For detailed architecture, see [.prompts/project-info.prompttemplate](.prompts/project-info.prompttemplate).

## Development Commands

### Install Dependencies
```bash
npm ci
```

### Start Development Server
```bash
npm start
```
This starts the local development server at `http://localhost:3000` with hot-reloading.

### Build for Production
```bash
npm run build
```
This generates static files in the `/build` directory.

### Serve Production Build Locally
```bash
npm run serve
```
Serves the built site locally to verify the production build.

### Clear Cache
```bash
npm run clear
```
Clears the Docusaurus cache if you encounter build issues.