Add license info, update readmes
This commit is contained in:
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Andreas Weyer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -41,4 +41,11 @@ The app will be available at `http://localhost:3000` (or `http://0.0.0.0:3000` i
|
||||
See the [docs/](./docs) folder for detailed documentation:
|
||||
- [Development Notes](./docs/README.dev-notes.md) - Setup and troubleshooting
|
||||
- [Modular Structure](./docs/2025-10-18_MODULAR_STRUCTURE.md) - Architecture overview
|
||||
- [Migration History](./docs/MIGRATION_HISTORY.md) - TypeScript & shadcn/ui migration
|
||||
- [Dev Container Setup](./docs/README.devcontainer.md) - WSL2/Podman configuration
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
|
||||
|
||||
Third-party components and libraries used in this project are listed in [THIRD_PARTY_LICENSES.md](./THIRD_PARTY_LICENSES.md).
|
||||
|
||||
79
THIRD_PARTY_LICENSES.md
Normal file
79
THIRD_PARTY_LICENSES.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# Third-Party Licenses
|
||||
|
||||
This project uses components and libraries from third parties. Below is a list of these components and their respective licenses.
|
||||
|
||||
## shadcn/ui Components
|
||||
|
||||
The following UI components in `src/components/ui/` are derived from [shadcn/ui](https://ui.shadcn.com):
|
||||
|
||||
- `button.tsx`
|
||||
- `card.tsx`
|
||||
- `input.tsx`
|
||||
- `label.tsx`
|
||||
- `popover.tsx`
|
||||
- `select.tsx`
|
||||
- `separator.tsx`
|
||||
- `slider.tsx`
|
||||
- `switch.tsx`
|
||||
- `tooltip.tsx`
|
||||
|
||||
**License**: MIT License
|
||||
**Copyright**: (c) 2023 shadcn
|
||||
**Source**: https://ui.shadcn.com
|
||||
|
||||
```
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
```
|
||||
|
||||
## npm Dependencies
|
||||
|
||||
The following dependencies are included via npm and are listed in `package.json`:
|
||||
|
||||
### Radix UI Primitives (MIT License)
|
||||
- `@radix-ui/react-label`
|
||||
- `@radix-ui/react-popover`
|
||||
- `@radix-ui/react-select`
|
||||
- `@radix-ui/react-separator`
|
||||
- `@radix-ui/react-slider`
|
||||
- `@radix-ui/react-slot`
|
||||
- `@radix-ui/react-switch`
|
||||
- `@radix-ui/react-tooltip`
|
||||
|
||||
**Source**: https://www.radix-ui.com/
|
||||
**License**: MIT
|
||||
|
||||
### Other Key Dependencies
|
||||
|
||||
- **React** (MIT License) - UI framework
|
||||
- **Recharts** (MIT License) - Charting library
|
||||
- **Tailwind CSS** (MIT License) - CSS framework
|
||||
- **lucide-react** (ISC License) - Icon library
|
||||
- **clsx** (MIT License) - Utility for class names
|
||||
- **class-variance-authority** (Apache 2.0) - Variant management
|
||||
- **tailwind-merge** (MIT License) - Tailwind class merging
|
||||
|
||||
For a complete list of dependencies and their licenses, see `package.json` and run `npm list` or check each package's LICENSE file in `node_modules/`.
|
||||
|
||||
## Additional Notes
|
||||
|
||||
This project follows the "copy-paste" component pattern from shadcn/ui, where components are copied into the source code rather than imported as a dependency. This allows for full customization while maintaining proper attribution.
|
||||
|
||||
All third-party software is used in accordance with their respective licenses.
|
||||
107
src/components/ui/README.md
Normal file
107
src/components/ui/README.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# UI Components
|
||||
|
||||
This directory contains UI components used throughout the application.
|
||||
|
||||
## Component Types
|
||||
|
||||
### shadcn/ui Base Components
|
||||
The following components are from [shadcn/ui](https://ui.shadcn.com) (MIT License):
|
||||
|
||||
- **`button.tsx`** - Button component with variants
|
||||
- **`card.tsx`** - Card container with header/content/footer
|
||||
- **`input.tsx`** - Base input field
|
||||
- **`label.tsx`** - Form label
|
||||
- **`popover.tsx`** - Popover/dropdown container
|
||||
- **`select.tsx`** - Select/dropdown menu
|
||||
- **`separator.tsx`** - Horizontal/vertical divider
|
||||
- **`slider.tsx`** - Range slider input
|
||||
- **`switch.tsx`** - Toggle switch
|
||||
- **`tooltip.tsx`** - Tooltip wrapper
|
||||
|
||||
These components are built on [Radix UI](https://www.radix-ui.com) primitives and styled with Tailwind CSS. They are copied into the codebase (not npm dependencies) and can be freely modified.
|
||||
|
||||
**Installation command** (for adding new components):
|
||||
```bash
|
||||
npx shadcn@latest add [component-name]
|
||||
```
|
||||
|
||||
### Custom Form Components
|
||||
Application-specific components built on top of shadcn/ui base components:
|
||||
|
||||
- **`form-numeric-input.tsx`** - Numeric input with increment/decrement buttons
|
||||
- Features: min/max validation, decimal places, unit display, clear button
|
||||
- Uses: `Input`, `Button` from shadcn/ui
|
||||
|
||||
- **`form-time-input.tsx`** - Time input with interactive picker
|
||||
- Features: HH:MM format, hour/minute grid picker, validation
|
||||
- Uses: `Input`, `Button`, `Popover` from shadcn/ui
|
||||
|
||||
## Usage Examples
|
||||
|
||||
### Basic Button
|
||||
```tsx
|
||||
import { Button } from './ui/button';
|
||||
|
||||
<Button variant="default">Click me</Button>
|
||||
<Button variant="destructive">Delete</Button>
|
||||
<Button variant="outline">Cancel</Button>
|
||||
```
|
||||
|
||||
### Custom Form Components
|
||||
```tsx
|
||||
import { FormNumericInput } from './ui/form-numeric-input';
|
||||
import { FormTimeInput } from './ui/form-time-input';
|
||||
|
||||
<FormNumericInput
|
||||
value={dose}
|
||||
onChange={setDose}
|
||||
increment="2.5"
|
||||
min={0}
|
||||
max={70}
|
||||
unit="mg"
|
||||
required={true}
|
||||
/>
|
||||
|
||||
<FormTimeInput
|
||||
value={time}
|
||||
onChange={setTime}
|
||||
required={true}
|
||||
errorMessage="Time is required"
|
||||
/>
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
All components in this directory are part of your source code and can be modified:
|
||||
|
||||
1. **Styling**: Update Tailwind classes directly in component files
|
||||
2. **Behavior**: Modify component logic as needed
|
||||
3. **Variants**: Add new variants in the `cva` configuration
|
||||
|
||||
Changes to shadcn/ui components won't be overwritten since they're in your source tree.
|
||||
|
||||
## Adding New Components
|
||||
|
||||
To add more shadcn/ui components:
|
||||
|
||||
```bash
|
||||
# List available components
|
||||
npx shadcn@latest add
|
||||
|
||||
# Add specific component
|
||||
npx shadcn@latest add dialog
|
||||
npx shadcn@latest add dropdown-menu
|
||||
```
|
||||
|
||||
Components will be automatically added to this directory with proper Tailwind styling.
|
||||
|
||||
## License
|
||||
|
||||
- **shadcn/ui components**: MIT License (see THIRD_PARTY_LICENSES.md)
|
||||
- **Custom components**: Same as project license (MIT)
|
||||
|
||||
## Resources
|
||||
|
||||
- [shadcn/ui Documentation](https://ui.shadcn.com)
|
||||
- [Radix UI Documentation](https://www.radix-ui.com)
|
||||
- [Tailwind CSS Documentation](https://tailwindcss.com)
|
||||
Reference in New Issue
Block a user