thesmarthost-context

Provides business context and backend API reference for the HostMetrics property management platform.

Updated Oct 6, 2025
One-click install
npx skills add https://github.com/TheSmartHost-Co/thesmarthost --skill thesmarthost-context-thesmarthost-co
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: thesmarthost-context
Source: https://github.com/TheSmartHost-Co/thesmarthost/tree/main/.claude/skills/thesmarthost-context
Command: npx skills add https://github.com/TheSmartHost-Co/thesmarthost --skill thesmarthost-context-thesmarthost-co

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working on the HostMetrics frontend lack immediate access to business rules, entity relationships, and backend API contracts, causing integration errors and repeated lookups across repositories. ## Core Features & Use Cases - Business Entity Reference: Documents the seven core entities (Profiles, Clients, Properties, Client-Properties junction, Bookings, CSV Uploads, Reports) with their relationships and critical business rules like mandatory primary ownership. - Backend API Reference: Lists all Express.js endpoints with request payloads, response formats, HTTP status codes, and implementation status for clients, properties, agreements, and PMS credentials. - Database Schema Documentation: Details the complete PostgreSQL schema including the many-to-many client_properties junction table, financial tables, and CRM tables with column types and constraints. - Use Case: When building a property management page in the Next.js frontend, consult this context to correctly call POST /api/properties with the clientId, commissionRate, and owner array, respecting the rule that every property must have exactly one primary owner. ## Quick Start Ask the AI to explain the property ownership business rules and show the API payload needed to create a new property with co-owners.

Frequently Asked Questions about thesmarthost-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a property with multiple owners via the API?▼

Send a POST request to /api/properties with clientId for the initial primary owner, plus name, address, province, propertyType, hostawayListingId, and commissionRate. Use PUT /api/properties/:id with an owners array to manage co-ownership, ensuring exactly one owner has isPrimary set to true.

What is the client_properties junction table used for?▼

The client_properties table links properties to their owners in a many-to-many relationship supporting co-ownership. Every property must have at least one entry, exactly one entry must have is_primary set to true, and commission_rate_override allows per-owner commission rates.

Does the backend API return snake_case or camelCase fields?▼

The backend returns camelCase fields in API responses, so the frontend does not need to transform data. Although the PostgreSQL database stores columns in snake_case, the Express.js backend handles the transformation before sending responses.

How does soft delete work for properties and clients?▼

Properties and clients use soft deletes by setting is_active to false rather than removing rows, preserving data for historical reporting. Properties can be reactivated via the PATCH /api/properties/:id/status endpoint with an isActive boolean.

Which API endpoints are not yet implemented in HostMetrics?▼

The /api/bookings and /api/reports endpoints are not yet implemented as of the current sprint. Completed endpoints include authentication, users, profiles, clients, properties, client status codes, client agreements, and PMS credentials.