diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..22d3bf1 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,25 @@ +# Profilarr Development Guide + +## Commands +- **Frontend**: `cd frontend && npm run dev` - Start React dev server +- **Backend**: `cd backend && gunicorn -b 0.0.0.0:5000 app.main:app` - Run Flask server +- **Docker**: `docker compose up` - Start both frontend/backend in dev mode +- **Lint**: `cd frontend && npx eslint 'src/**/*.{js,jsx}'` - Check frontend code style +- **Build**: `cd frontend && npm run build` - Build for production + +## Code Style +### Frontend (React) +- **Imports**: React first, third-party libs next, components, then utils +- **Components**: Functional components with hooks, PascalCase naming +- **Props**: PropTypes for validation, destructure props in component signature +- **State**: Group related state, useCallback for memoized handlers +- **JSX**: 4-space indentation, attributes on new lines for readability +- **Error Handling**: try/catch for async operations, toast notifications + +### Backend (Python) +- **Imports**: Standard lib first, third-party next, local modules last +- **Naming**: snake_case for functions/vars/files, PascalCase for classes +- **Functions**: Single responsibility, descriptive docstrings +- **Error Handling**: Specific exception catches, return (success, message) tuples +- **Indentation**: 4 spaces consistently +- **Modularity**: Related functionality grouped in directories \ No newline at end of file diff --git a/frontend/src/components/format/FormatCard.jsx b/frontend/src/components/format/FormatCard.jsx index 0f1b9ba..506cb43 100644 --- a/frontend/src/components/format/FormatCard.jsx +++ b/frontend/src/components/format/FormatCard.jsx @@ -168,7 +168,7 @@ function FormatCard({ : 'translate-x-0' }`}> {/* Conditions */} -
No tests added yet
diff --git a/frontend/src/components/format/conditions/ConditionCard.jsx b/frontend/src/components/format/conditions/ConditionCard.jsx index f720f47..78ef1c3 100644 --- a/frontend/src/components/format/conditions/ConditionCard.jsx +++ b/frontend/src/components/format/conditions/ConditionCard.jsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {CONDITION_TYPES, createCondition} from './conditionTypes'; import {ArrowUp, ArrowDown, X, ChevronsUp, ChevronsDown} from 'lucide-react'; -import BrowserSelect from '@ui/BrowserSelect'; +import SearchDropdown from '@ui/SearchDropdown'; const ConditionCard = ({ condition, @@ -21,7 +21,8 @@ const ConditionCard = ({ const typeOptions = Object.values(CONDITION_TYPES).map(type => ({ value: type.id, - label: type.name + label: type.name, + description: type.description || '' })); const handleTypeChange = e => { @@ -57,14 +58,13 @@ const ConditionCard = ({No tests added yet
diff --git a/frontend/src/components/ui/DataBar/SearchBar.jsx b/frontend/src/components/ui/DataBar/SearchBar.jsx index 2d4a76d..78abd30 100644 --- a/frontend/src/components/ui/DataBar/SearchBar.jsx +++ b/frontend/src/components/ui/DataBar/SearchBar.jsx @@ -12,7 +12,11 @@ const SearchBar = ({ onInputChange, onAddTerm, onRemoveTerm, - onClearTerms + onClearTerms, + textSize = 'text-sm', // Default text size + badgeTextSize = 'text-sm', // Default badge text size + iconSize = 'h-4 w-4', // Default icon size + minHeight = 'min-h-10' // Default min height }) => { const [isFocused, setIsFocused] = useState(false); @@ -47,7 +51,7 @@ const SearchBar = ({+ No options match your search +
+ +