You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hub-settings module (backend/src/hub-settings/) was removed from the working tree. Hub settings centralise operational configuration (business hours, booking rules, tax rates, branding) that currently has no management endpoint.
Context
The original module files exist in git history but are deleted — rebuild with expanded fields
ConfigService at backend/src/config/ for environment variable access
Overview
The hub-settings module (
backend/src/hub-settings/) was removed from the working tree. Hub settings centralise operational configuration (business hours, booking rules, tax rates, branding) that currently has no management endpoint.Context
ConfigServiceatbackend/src/config/for environment variable accessInvoicesModule(VAT rate),BookingsModule(lead time, cancellation policy), white-labeling (FE-38)Tasks
HubSettingsentity (singleton — always exactly one row, seeded on startup if absent):id,hubName,address,city,country,timezone(IANA tz string, e.g.Africa/Lagos),currency(defaultNGN)vatRatePercent(decimal, default7.5)businessHours(JSONB):{ mon: { open: '09:00', close: '18:00', closed: false }, ..., sun: { closed: true } }contactEmail,contactPhonelogoUrl(nullable),primaryColor(hex string, nullable),faviconUrl(nullable)bookingLeadTimeHours(int, default1),maxBookingDaysAhead(int, default90)cancellationPolicyHours(int, default24)updatedAtGET /hub-settings— returns all settings (public, no auth required — needed for white-labeling on page load)PATCH /hub-settings— partial update (super_admin only); validates timezone string against IANA listHubSettingsrecord if the table is emptyHubSettingsModuleinAppModuleFiles to Modify / Create
backend/src/hub-settings/(module, entity, controller, service)backend/src/app.module.ts