This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is STRUDEL Kit, a React and TypeScript-based starter kit for building scientific UIs. It provides templates implementing common task flows for scientific applications and is built on the STRUDEL Design System.
npm startornpm run dev- Start development server (http://localhost:5175)npm run build- Build production bundle (runs TypeScript check first)npm run preview- Preview production build
npm run lint- Run ESLint on TypeScript/JavaScript filesnpm run lint:fix- Auto-fix ESLint issuesnpm run prettier- Check code formattingnpm run prettier:fix- Auto-format codenpm run style:all- Run TypeScript check, lint, and prettier
npm run cy:open- Open Cypress for interactive testingnpm run cy:test- Run Cypress tests headlessly
npm run deploy- Deploy to GitHub Pages
- React 18 with TypeScript for component development
- TanStack Router for file-based routing with type safety
- Material UI (MUI) for design system components
- TanStack Query for data fetching and state management
- Plotly.js for data visualization
- Vite for build tooling
- File-based routing using TanStack Router
- Routes defined in
src/pages/directory - Generated route tree in
src/routeTree.gen.ts - Root layout in
src/pages/__root.tsx
The app implements six main task flow templates:
explore-data/- Data exploration and visualizationsearch-data-repositories/- Search and discovery interfacescompare-data/- Data comparison workflowsrun-computation/- Computational workflow managementcontribute-data/- Data submission and validationmonitor-activities/- Activity monitoring and tracking
Each task flow follows this structure:
index.tsx- Main page component_layout.tsx- Shared layout for nested routes$id.tsx- Dynamic route for individual items-components/- Task flow-specific components-context/- Local state management-tests/- Cypress test files
src/components/- Shared UI componentssrc/hooks/- Custom React hooks for data fetchingsrc/context/- Global application statesrc/utils/- Utility functionssrc/types/- TypeScript type definitions
FilterContext.tsx- Provides filtering capabilities across task flowsSciDataGrid.tsx- Scientific data table componentTopBar.tsx- Application navigationLayout.tsx- Common page layout wrapper
- React Context for global state (
src/context/ContextProvider.tsx) - TanStack Query for server state management
- Local context providers for task flow-specific state
- Custom hooks in
src/hooks/for data operations useListQuery.ts- For list/collection datauseDetailQuery.ts- For individual item datauseDataFromSource.tsx- Generic data source hook
- Components use PascalCase naming
- Hooks use camelCase with
useprefix - Pages follow the file-based routing structure
- Private components/utilities use
-prefix (e.g.,-components/)
- Strict mode enabled
- ES2020 target
- Bundler module resolution
- Types for Node, Cypress, and React included
- ESLint with Airbnb TypeScript configuration
- Prettier for code formatting
- Husky for pre-commit hooks
- lint-staged for staged file linting