@wawjs/ngx-horeca
v22.0.0
Published
Support package for the Angular HoReCa template.
Downloads
442
Readme
@wawjs/ngx-horeca
Support package for the Angular HoReCa template.
@wawjs/ngx-horeca provides reusable feature contracts, services, and helpers for restaurant,
cafe, hotel, event venue, spa, and other hospitality landing pages. It is designed to support the
template app, not replace the app's pages or design system.
Business projects should import reusable APIs from this package and keep pages, routes, local content, bootstrap wiring, company data, and visual design in the app.
Installation
npm install @wawjs/ngx-horecaPeer dependencies:
@angular/common@angular/core@wawjs/ngx-translate
Usage
import { DishService, type Dish } from '@wawjs/ngx-horeca';The package exports feature interfaces, Angular services, and small utilities from its primary entry point.
Features
Articles
Exports Article and ArticleService.
The article service stores article lists in Angular signals, loads optional /data/article/i18n
translations in the browser, normalizes partial API records, supports app-provided fallback
articles, and exposes loading completion state.
Discounts
Exports Discount and DiscountService.
The discount service supports special offers, loyalty offers, and promotion detail pages. It
normalizes partial API records, falls back to app-provided discount data when the API has no items,
loads optional /data/discount/i18n translations, and exposes loading state.
Dishes And Categories
Exports Dish, DishCategory, DishCard, DishSection, DishService,
DishCategoryService, and dish menu utilities such as toDishCard,
filterDishesByMenuPage, filterCategoriesByDishes, findDishCategoryPath,
resolveDishSectionCategories, and toDishSections.
Dish services support menu pages and dish detail pages. DishService stores dishes, preserves a
fallback dish list, fills practical defaults for fallback data, loads optional /data/dish/i18n
translations, and persists favorite dish slugs in localStorage only in the browser.
DishCategoryService stores category trees and exposes category signals for menu navigation.
Dish menu utilities cover reusable behavior for favorites, seasonal specials, daily menus,
category filtering by available dishes, category path lookup, and grouping dishes into menu
sections. Page labels, routes, templates, and visual presentation stay app-owned.
Events
Exports EventItem and EventService.
The event service supports events, banquets, catering, and venue-program pages. It normalizes
partial API records, uses app fallback events when API items are missing, loads optional
/data/event/i18n translations, and exposes loading state.
Exhibits
Exports Exhibit and ExhibitService.
The exhibit service supports gallery-style image collections. It normalizes common image fields
such as src, image, or url, creates stable fallback slugs, keeps app-provided fallback
exhibits, and exposes loading state.
Jobs
Exports Job and JobService.
The job service supports job list and job detail pages. It normalizes partial API records, uses
fallback jobs when no API items are present, loads optional /data/job/i18n translations, and exposes
loading state.
Products
Exports Product and ProductService.
The product service supports retail-style catalogs, packaged goods, bakery shop items, merchandise,
or purchasable service pages. It normalizes API records, supports fallback products, loads optional
/data/product/i18n translations, and exposes loading state.
Profiles
Exports Profile and ProfileService.
The profile service supports team, staff, chef, host, or expert profile pages. It stores profile
lists, supports app-provided fallback profiles, and loads optional /data/profile/i18n
translations.
Questions
Exports Question and QuestionService.
The question service supports FAQ pages. It normalizes partial question records, uses fallback
questions when needed, loads optional /data/question/i18n translations, and exposes loading state.
Quests
Exports Quest and QuestService.
The quest service supports activity, experience, challenge, or entertainment pages. It normalizes
partial API records, supports fallback quests, loads optional /data/quest/i18n translations, and
exposes loading state.
Reviews
Exports Review and ReviewService.
The review service supports testimonial and review pages. It normalizes partial review records,
uses fallback reviews when no API items are available, loads optional /data/review/i18n translations,
and exposes loading state.
Rooms
Exports Room and RoomService.
The room service supports hotels, accommodation, private rooms, and room detail pages. It
normalizes partial room records, supports fallback rooms, loads optional /data/room/i18n
translations, and exposes loading state.
Rules
Exports Rule and RuleService.
The rule service supports policy, house-rule, safety, and visitor-info pages. It normalizes partial
rule records, supports fallback rules, loads optional /data/rule/i18n translations, and exposes
loading state.
Data Flow
The package does not fetch API data by itself and does not import app-local JSON.
The app should:
- Load API/bootstrap data or local fallback data.
- Seed package services with fallback data.
- Resolve API data into package services when available.
- Render app-owned pages and components from service signals.
This keeps @wawjs/ngx-horeca reusable while allowing each business project to own its content and
design.
AI Guidance
The package includes an ai/ folder for coding agents. It documents HoReCa template conventions,
package boundaries, content rules, media rules, SEO expectations, and durable decisions.
When an agent works in a business project that depends on this package, it can read:
node_modules/@wawjs/ngx-horeca/ai/The package also includes AGENTS.md with concise package-specific instructions.
Release Notes
See RELEASES.md.
When preparing a source workspace platform release, the root app/template package.json version
must equal projects/ngx-horeca/package.json, and the root lockfile metadata should match.
License
MIT
