๐Ÿบ Beer Catalog - Angular Signals Demo

A modern Angular 20 application showcasing craft beers from the Punk API. Built with signal-based state management, zoneless change detection, and a dual data source architecture (API + sessionStorage).

๐Ÿš€ Live Demo

View Live Application

โœจ Key Features

Modern Angular Architecture

  • Zoneless Change Detection: Built with Angular 20's experimental zoneless mode
  • Signal-Based State: Reactive state management using Angular signals and computed values
  • Dual Data Sources: Seamlessly switches between API calls and sessionStorage for favorites
  • Controlled Components: All filters follow controlled component pattern (single source of truth)

User Experience

  • Dark and Light theme: Triggered by system preference detection
  • Responsive Design: Mobile-first layout with adaptive grid
  • Material Design: Custom Material theming
  • Smart Empty States: Contextual messages based on active filters and data source
  • Advanced Filtering: Search by name, filter by ABV range, show favorites only
  • Debounced Input: Search (400ms) and ABV slider (300ms) debouncing

Developer Experience

  • Comprehensive Testing: 375+ test specs with 100% pass rate
  • Error Handling: Global HTTP interceptor, snackbar notifications, and API retry logic (exponential backoff)
  • Type Safety: Full TypeScript with strict mode
  • Auto-Generated Docs: TypeDoc documentation included in deployments

๐Ÿ“‹ Prerequisites

Node.js: ^20.19.0 || ^22.12.0 || ^24.0.0

Check your version:

Example :
node --version

๐Ÿš€ Quick Start

Example :
# Clone the repository
git clone https://github.com/lukazc/angular-signals-demo.git
cd angular-signals-demo

# Install dependencies
npm install

# Start development server
npm start

Open http://localhost:4200/ in your browser.

๐Ÿงช Testing

Example :
# Run all tests
npm test

# Run tests with coverage report
ng test --code-coverage

# Run tests once (CI mode)
ng test --watch=false --browsers=ChromeHeadless

Test Coverage: 375+ specs across all features (API, stores, components, interceptors)

๐Ÿ—๏ธ Building

Example :
# Development build
npm run build

# Production build
npm run build:prod

Build artifacts are output to the dist/ directory.

๐Ÿ“š Documentation

TypeDoc documentation is auto-generated and deployed with the app:

Example :
# Generate docs
npm run docs

# Serve docs locally
npm run docs:serve

Access documentation at /docs in the running application or view online.

๐Ÿ—๏ธ Project Structure

Example :
src/app/
โ”œโ”€โ”€ components/              # UI components
โ”‚   โ”œโ”€โ”€ beer-card/          # Beer display card
โ”‚   โ”œโ”€โ”€ beer-list/          # Grid list with pagination
โ”‚   โ”œโ”€โ”€ beer-detail-modal/  # Material dialog with full details
โ”‚   โ””โ”€โ”€ filters/            # Filter components (search, ABV, sort, favorites)
โ”œโ”€โ”€ pages/                  # Page-level components
โ”‚   โ””โ”€โ”€ beer-list-page/     # Main catalog page
โ”œโ”€โ”€ services/               # Business logic
โ”‚   โ”œโ”€โ”€ beer-api.service.ts # Punk API integration with retry logic
โ”‚   โ”œโ”€โ”€ favorites.service.ts # sessionStorage management
โ”‚   โ””โ”€โ”€ loading.service.ts  # Global loading state
โ”œโ”€โ”€ stores/                 # State management
โ”‚   โ””โ”€โ”€ beer.store.ts       # Dual-source signal store
โ”œโ”€โ”€ interceptors/           # HTTP interceptors
โ”‚   โ”œโ”€โ”€ loading.interceptor.ts
โ”‚   โ””โ”€โ”€ error.interceptor.ts
โ””โ”€โ”€ models/                 # TypeScript interfaces
    โ””โ”€โ”€ beer.model.ts       # Beer, filters, sort types

๐ŸŽฏ Architectural Highlights

Controlled Component Pattern

All filter components are controlled (receive values via input(), emit changes via output()):

  • State lives in BeerStore (single source of truth)
  • URL query params can be easily added without refactoring
  • Predictable data flow: User โ†’ Component โ†’ Store โ†’ API/sessionStorage

Error Resilience

  • Exponential Backoff: 3 retry attempts with increasing delays (1s, 2s, 4s)
  • Global Handling: Error interceptor shows snackbar after all retries fail
  • Graceful Degradation: Empty states with retry buttons on failures

๐Ÿ”ง Technologies

  • Angular 20 - Framework with zoneless change detection
  • Angular Material - UI components with custom M3 theme
  • RxJS - Reactive programming with debouncing and retry logic
  • Punk API - Craft beer data source (via adscanner proxy)
  • TypeScript - Type-safe development
  • Jasmine/Karma - Testing framework

๐Ÿšข Deployment

The app is automatically deployed to GitHub Pages via GitHub Actions:

  • Branch: main
  • Base href: /angular-signals-demo/
  • Hash routing: Enabled for GitHub Pages compatibility

๐Ÿ“ Data Source

Beer data provided by Punk API via proxy at https://api.adscanner.tv/punkapi/v2/

๐Ÿ™‹ Support

Questions or issues? Open an issue on GitHub.


Built with Angular 20 โ€ข Signals โ€ข Zoneless โ€ข Material Design

results matching ""

    No results matching ""