This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is an Angular 21 template application integrated with Tailwind CSS 4. It uses standalone components (no NgModules), Vitest for testing, and npm as the package manager.
Start dev server:
ng serve
# or
npm startServer runs at http://localhost:4200/
Build:
ng build # Production build (default)
ng build --configuration development # Development build
npm run watch # Watch mode with development configBuild output: dist/ directory
Testing:
ng test # Run all tests with Vitest
npm test # Same as aboveGenerate code:
ng generate component component-name
ng generate --help # See all available schematicsThis application uses Angular's standalone component architecture (no NgModules). Components are organized by type:
- Layout components (
src/app/components/): Reusable UI elements like Header and Footer - Page components (
src/app/pages/): Route-level components (Home, About, Services, Contact)
Routes are defined in src/app/app.routes.ts. The application uses eager loading for all routes with a catch-all redirect to home for unknown paths.
Tailwind CSS v4 Setup:
- Global styles:
src/styles.cssuses@import "tailwindcss";(v4 syntax, not@tailwinddirectives) - Tailwind config:
tailwind.config.js(scanssrc/**/*.{html,ts}) - PostCSS config:
.postcssrc.json(uses@tailwindcss/postcssplugin required for v4) - Component styles: Each component has its own
.cssfile - The app supports both light and dark color schemes via
prefers-color-scheme - Layout uses CSS flexbox with
.page-containerand.content-wrapperclasses for sticky footer
Important: This project uses Tailwind CSS v4 which requires:
- The new
@import "tailwindcss";syntax instead of old@tailwinddirectives - The
@tailwindcss/postcsspackage and.postcssrc.jsonconfiguration
- Entry point:
src/main.ts - App config:
src/app/app.config.ts(provides router and global error listeners) - Root component:
src/app/app.ts(includes RouterOutlet, Header, and Footer)
Components use a simple naming pattern without .component suffix:
- TypeScript:
component-name.ts - Template:
component-name.html - Styles:
component-name.css - Tests:
component-name.spec.ts
Example: header.ts, header.html, header.css, header.spec.ts
Components use:
importsarray instead of module declarationstemplateUrlandstyleUrlfor external files- Standard Angular imports like
RouterLink,RouterLinkActive,CommonModuleas needed
Bundle size budgets (production):
- Initial bundle: 500kB warning, 1MB error
- Component styles: 4kB warning, 8kB error
Build for production:
ng buildDeploy to Firebase:
firebase deployImportant: The firebase.json is configured to deploy from dist/angular-tailwind-template/browser which is the output directory for Angular's application builder. Do not change this path unless the project name changes.
Configured in package.json:
- Print width: 100
- Single quotes: enabled
- Angular parser for HTML files