At its core, TF-App exists to give real estate teams precise control over two interconnected concerns: tracking property sales from initial lead through to closed deal, and computing the commissions each agent earns from those transactions. The current release ships the UI scaffolding and authentication layer; the sections below explain the intended data model and show exactly how to connect the frontend to a backend API that drives both features.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Niurka77/tf-app/llms.txt
Use this file to discover all available pages before exploring further.
Sales Control
Sales tracking in TF-App covers the full lifecycle of a real estate transaction. Each sale record is expected to capture:- Property details — address, type (residential, commercial), and listing price
- Buyer and seller records — linked contact identities, typically matched by DNI
- Deal status — a progression such as
prospecto → negociación → contrato → cerrado - Agent assignment — which team member owns the deal at each stage
- Close date — the date the transaction was finalised, used as the reference point for commission calculation
Commission Management
Commissions in TF-App are computed on a per-agent, per-closed-deal basis. A typical commission model for real estate looks like:- A percentage rate agreed upon at contract time (e.g. 3% of the sale price)
- Applied only to closed deals — status
cerrado— within a billing period - Summed across all closed deals to produce an agent’s monthly commission total
- Optionally split between a listing agent and a buyer’s agent when both are tracked
The commission and sales data features represent the primary backend integration points for TF-App. The current release ships the UI scaffolding, navigation structure, and authentication layer. Rendering live sales and commission data requires connecting the dashboard views to a REST or GraphQL API that your team provides.
Integrating with a Backend
Use the standardfetch() API — already in use for the login flow — to pull sales data from your backend and hydrate the dashboard. The Authorization header carries the token stored in localStorage after login:
/api/commissions (filtered by agent ID or date range) follows the same pattern:
Rendering Sales Data
Once the API response arrives, use vanilla JS DOM manipulation to inject sales records into the dashboard view. Here is a complete example that creates a styled card for each sale and appends it to a container element:renderCommissionSummary function follows the same pattern, reading commission.agent, commission.amount, and commission.period from each record in the API response and rendering them into a dedicated section on the dashboard.
DOMContentLoaded listener in dashboard.html’s script block after the fetch() calls resolve.