This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
-
npm run dev- Start development server with live CSS rebuild- Runs Tailwind CSS in watch mode
- Starts live-server on port 3000
- Opens /src/index.html automatically
-
npm run build- Production build- Builds CSS from src/input.css to src/output.css
- Uses Tailwind CSS to process utility classes
-
npm run serve- Development server only- Runs live-server without CSS rebuild
- Useful when focusing on HTML changes
npm run deploy- Deploy to GitHub Pages (LOCAL deployment)- Builds CSS and deploys to gh-pages branch
- ALWAYS use this command for deployment (GitHub Actions has billing issues)
- Triggers GitHub's built-in Pages deployment automatically
- No test framework is currently configured
- No linting tools are set up
- Consider implementing these for code quality
This is a trauma-informed UI component library built using:
- Atomic Design methodology - Components organized as atoms, molecules, organisms, pages, and templates
- Static HTML/CSS - No JavaScript framework, pure HTML with Tailwind CSS
- Tailwind CSS - Utility-first CSS with extensive customization for trauma-informed design
src/components/
├── atoms/ # Basic building blocks (buttons, typography, form elements)
├── molecules/ # Simple combinations of atoms (planned)
├── organisms/ # Complex UI components (planned)
├── pages/ # Page-specific compositions (planned)
└── templates/ # Page layout structures
The project uses a mineral-inspired color system:
- Azurite Blue (#284251) - Primary headers, navigation
- Chrysocolla Green (#264c52) - CTAs, success states
- Sunstone Orange (#ce7755) - Warnings, special actions
- Rhodochrosite Rose (#d4a18c) - Emergency exits, emphasis
- Selenite White (#f6f0e9) - Primary background
- Playfair Display Black - Headlines (serif)
- Montserrat - Body text and UI elements (sans-serif)
- Responsive type scale with mobile, tablet, and desktop sizes
Based on 8px grid: xs (4px), sm (8px), md (16px), lg (24px), xl (32px), 2xl (48px)
- Safety & Predictability - Consistent patterns, gentle transitions (300ms), calming colors
- User Control - Content warnings, format alternatives, clear exit options
- Clear Communication - Supportive microcopy, non-pressuring language
- Emotional Support - Break reminders, grounding exercises (planned)
- Spaciousness - Ample white space, rounded corners, visual breathing room
- Mobile-first responsive design - All components scale from 320px to desktop
- Semantic HTML with proper ARIA labels for accessibility
- BEM-like class naming using Tailwind utilities
- Consistent hover states with 300ms transitions
- Touch-friendly targets (minimum 44px on mobile)
- Atoms: Actively developed (buttons, typography, colors, forms, status indicators)
- Molecules: Structure exists, components marked "Coming Soon"
- Organisms: Structure exists, components marked "Coming Soon"
- Templates: Basic page structure template available
SVG icons organized by category in /src/assets/icons/:
- Accessibility, Content & Learning, Emotional Support, Forms, Navigation, Safety & Support, etc.
- Designed to be scalable (16px-64px) and trauma-appropriate
- No external dependencies beyond Tailwind CSS
- All components are static HTML - no JavaScript interactivity yet
- Focus is on establishing design patterns and visual language
- Emergency Exit button is a core trauma-informed feature present on all pages
IMPORTANT: The authoritative guide for building this system is:
/uiui/PRD-Trauma-Informed-Interface-Design-System.md
This PRD contains:
- Implementation phases (1-5) with specific deliverables
- Feature specifications with acceptance criteria
- User flows with Mermaid diagrams
- Database schema for all entities
- Technical architecture and directory structure
- Component conversion guide (uiui → Laravel Blade)
- Success metrics and targets
Always consult the PRD before implementing any feature.
- Laravel 12 - Backend framework
- Livewire - Reactive UI components (when needed)
- Alpine.js - Required for all JavaScript interactivity
- Tailwind CSS v3 - Styling (use design tokens from this UI library)
- Laravel Project:
/Users/abayomi/Herd/Trauma-Informed-Interface-Design-System - UI Knowledge Base: This repository (
uiui) serves as the design system reference
- Read the design system documentation in this repository
- Use design tokens: typography, colors, spacing from
tailwind.config.js - Check existing components in
src/components/(atoms, molecules, organisms) - Reuse and adapt existing component patterns
- Use Tailwind CSS classes from this design system
- Implement Alpine.js for client-side interactivity
- Use Livewire for server-rendered reactive components
- Follow trauma-informed design principles
- Laravel 12 with Eloquent ORM
- RESTful API design
- Built-in authentication/authorization
- Proper validation and error handling
When implementing features:
- Analyze requirements (frontend and backend)
- Justify technology choices
- Outline component interactions
- Provide code with testing/deployment notes
Always reason step-by-step before writing code.
For documentation tasks:
- Create structured PRDs with Mermaid.js diagrams
- Sections: Problem Statement, Goals, Personas, Features, User Flows, Acceptance Criteria
- Use Markdown format
For deployment tasks:
- GitHub for version control
- Laravel Cloud for deployment
- CI/CD pipeline configuration
- Environment variable management
- Copy Tailwind configuration from
tailwind.config.js - Reference color palette, typography, and spacing tokens
- Adapt HTML components to Blade templates
- Convert Alpine.js patterns to Livewire where appropriate
- Maintain trauma-informed design principles throughout
Static HTML (uiui) → Blade Component (Laravel)
Alpine.js → Keep for client-side OR convert to Livewire for server-side
Tailwind classes → Direct copy (ensure config matches)
IMPORTANT: This /uiui/ directory contains ALL the information needed to build a robust Trauma-Informed Interface Design System on Laravel. Always reference this directory when creating components, styling, or implementing features.
| Component | File | Purpose |
|---|---|---|
| Buttons | buttons.html |
Emergency exit, primary, secondary, tertiary buttons with states |
| Forms | form-elements.html |
Inputs, checkboxes, radios, selects with validation |
| Typography | typography.html |
H1-H6, body, caption with responsive scaling |
| Colors | color.html |
Complete color system with swatches |
| Status | status-indicators.html |
Progress bars, badges, status indicators |
| Layout | layout.html |
Grid systems, spacing, containers |
| Media | media.html |
Images, video embeds, accessibility |
| Icons | icons.html |
Icon usage and sizing guidelines |
| Safe Mode | safe-mode-toggle.html |
Emergency safe space toggle |
| Foundations | design-foundations.html |
Design system principles |
| Component | File | Purpose |
|---|---|---|
| Alerts | alert.html |
Content warnings, success/error messages |
| Cards | card.html |
Generic card with variants |
| Form Groups | form-groups.html |
Labeled inputs, validation groups |
| Header Nav | header-navigation.html |
Main navigation bar |
| Footer Nav | footer-navigation.html |
Footer links and structure |
| Navigation | navigation-components.html |
Breadcrumbs, pagination, menus |
| Tags | tag-group.html |
Tag and badge systems |
| Media Controls | media-controls.html |
Play/pause, volume, transcripts |
| Text Groups | text-group.html |
Text combinations, quotes, info boxes |
| Component | File | Purpose |
|---|---|---|
| Course Cards | course-card-system.html |
Course overview, progress, enrollment |
| Blog Cards | blog-card-system.html |
Article previews, author info |
| Hero Section | hero-section.html |
Large banner with CTA |
| Registration | course-registration-system.html |
Multi-step enrollment |
| Newsletter | newsletter-subscription-section.html |
Email signup |
| Payment | payment-section.html |
Payment form section |
| Toolkit Cards | toolkit-card-system.html |
Resource/download cards |
| Case Studies | case-study-card.html |
Project showcases |
| Settings | settings-system.html |
User preferences interface |
dashboard-page-component.html- User dashboard layoutuser-flow.htmlthroughuser-flow-v-4.html- Complete user journeys
home-page.html- Landing page templatesign-in.html- Login pagemulti-step-account-creation.html- Registration wizardcreate-password.html- Password setuppassword-reset.html- Recovery flow
Azurite Blue: #284251 (headers, navigation, trust)
Chrysocolla Green: #264c52 (CTAs, success, encouragement)
Sunstone Orange: #ce7755 (warnings, special actions)
Rhodochrosite Rose: #d4a18c (emergency, sensitivity)
Selenite White: #f6f0e9 (backgrounds, calm)
Grey: #454545 (text, borders)
Headlines: Playfair Display Black (serif)
Body: Montserrat (sans-serif)
Desktop: h1=48px, h2=36px, h3=24px, h4=20px
Tablet: h1=40px, h2=32px, h3=22px, h4=18px
Mobile: h1=32px, h2=28px, h3=20px, h4=18px
Body: 16px/24px line-height
xs=4px, sm=8px, md=16px, lg=24px, xl=32px, 2xl=48px
sm=4px, DEFAULT=6px, md=8px, lg=12px, xl=16px, full=9999px
// Emergency Exit - immediate redirect
emergencyExit({ exitUrl: 'https://google.com', position: 'bottom-right' })
// Primary Button - with loading/success/error states
primaryButton({ label: 'Continue', tooltip: 'Click to proceed' })
// Secondary Button - alternative actions
secondaryButton({ label: 'Browse Options' })
// Tertiary Button - optional actions with confirmation
tertiaryButton({ label: 'Learn More', requiresConfirmation: true })56 SVG icons in 11 categories:
- accessibility/ - accessibility, captions, contrast, magnify, volume
- content-and-learning/ - audio, bookmark, document, download, play, pause, video
- emotional-support/ - breathing, comfort, meditation, mindfulness, wellness
- forms-element/ - cancel, edit, filter, refresh, save, search, sort
- learning-management/ - certificate, course, graduation, lesson, module, quiz
- progress-and-status/ - calendar, check, clock, star, trophy
- safety-and-support/ - alert, chat, exit, heart, phone, shield, support, warning
| Document | Purpose |
|---|---|
COMPONENTS.md |
Complete component reference |
button-system-doc/ |
Button component specifications |
accessibility-features-reference.md |
WCAG compliance guide |
trauma-informed-ui-library-revised.md |
Design principles deep-dive |
tailwind.config.js |
All design tokens |
/uiui/
├── src/
│ ├── index.html # Main entry point
│ ├── output.css # Compiled Tailwind CSS
│ ├── js/button-components.js # Alpine.js components
│ ├── assets/icons/ # 56 SVG icons
│ └── components/
│ ├── atoms/ # 11 base components
│ ├── molecules/ # 10 compound components
│ ├── organisms/ # 19 complex components
│ ├── pages/ # 6 page examples
│ └── templates/ # 5 page templates
├── tailwind.config.js # Design tokens
├── COMPONENTS.md # Component docs
└── button-system-doc/ # Button specs
-
Before creating ANY component:
- Check if it exists in
/uiui/src/components/ - Read the HTML implementation
- Copy Tailwind classes exactly
- Adapt Alpine.js patterns for Livewire if needed
- Check if it exists in
-
For styling:
- Use design tokens from
tailwind.config.js - Never invent new colors or spacing values
- Follow the 8px grid system
- Use design tokens from
-
For interactivity:
- Reference
button-components.jsfor Alpine.js patterns - Maintain trauma-informed states (loading, success, error)
- Always include accessible ARIA attributes
- Reference
-
For accessibility:
- Follow patterns in
accessibility-features-reference.md - Maintain 44px minimum touch targets
- Respect
prefers-reduced-motion - Include proper focus states
- Follow patterns in
- Always read prd before implementation