TF-App is built without a UI framework — every interactive element is crafted from plain HTML enhanced with Tailwind CSS utility classes and driven by vanilla JavaScript. This approach keeps the bundle lean and gives you direct, predictable control over every component. The result is a consistent, branded interface that renders faithfully inside Capacitor’s WebView on Android without any framework overhead.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.
The showMessage Modal
TheshowMessage function is the primary interactive component in TF-App. It replaces the browser’s native alert() with a styled overlay modal that looks and behaves correctly inside a Capacitor WebView, where native dialogs can be inconsistent across Android versions.
- DOM targeting by ID — The function grabs four elements by their fixed IDs (
messageModal,messageModalTitle,messageModalBody,messageModalCloseButton). These IDs must exist in the view’s HTML for the function to work. - Setting content —
modalTitle.textContentandmodalBody.textContentinject thetitleandmessagestrings directly into the modal without parsing any HTML, which prevents XSS issues. - Showing the modal —
modal.classList.remove('hidden')makes the overlay visible. Tailwind’shiddenutility maps todisplay: none, so removing it returns the element to its defaultflexdisplay. - Close button handler —
closeButton.onclickis reassigned on every call so the correct title and message are always in scope when the user dismisses the modal. - Backdrop click dismissal — The
modal.onclickhandler checksevent.target === modal. When the user clicks on the dark backdrop (the outer element itself, not its children), the modal is hidden. Clicks on the inner card do not propagate to this check.
Required HTML Structure
Every view that callsshowMessage() must include the following modal markup. Place it at the bottom of <body>, just before the closing tag, so its z-50 stacking context sits above all other content.
Tailwind includes the
hidden utility class by default — it applies display: none to the element. No custom CSS is required. When the class is removed via classList.remove('hidden'), the element reverts to whatever display value its other classes define (in this case flex, set by the flex utility).Form Inputs
Login fields in TF-App use a pill-shaped input pattern: arounded-full container with an absolutely positioned Font Awesome icon flush to the left edge. The icon is decorative, but it gives each field immediate visual meaning without requiring a separate visible label.
| Class | Purpose |
|---|---|
relative on <label> | Creates a positioning context for the icon <span> |
absolute inset-y-0 left-4 | Pins the icon vertically centered, 1rem from the left edge |
rounded-full | Produces the pill shape on the input field |
bg-green-100 | Soft green fill matching the app’s color scheme |
pl-12 | Adds left padding so input text does not overlap the icon |
focus:outline-none | Removes the default browser focus ring for a cleaner mobile appearance |
fa-lock instead of fa-user and type="password".
Wave Decorations
Every view in TF-App opens and closes with an SVG wave band rendered in the app’s green gradient. The wave creates a branded frame around the content area without requiring any image assets. The wave is controlled by four CSS classes defined in each view’s<style> block:
.wave-container-top/.wave-container-bottom— Fixed-height wrappers that clip the SVG and prevent it from affecting document flow.flex-shrink: 0ensures the wave keeps its height even when the parent is a flex column with content that fills available space..wave-svg— Absolute-positioned SVG that fills its container.preserveAspectRatio="none"on the SVG element lets it stretch to any viewport width without distortion..wave-svg-top— The top wave uses the same path as the bottom wave but is rotated 180 degrees so the curve faces downward.
<defs> block using two <linearGradient> elements — see the Customization guide to learn how to change the gradient colors.
Font Icons
TF-App loads Font Awesome 5.15.3 from the jsDelivr CDN. Add this<link> in the <head> of every view:
<i> tag and the fas (solid) prefix class. Common icons used across the app:
| Icon class | Usage |
|---|---|
fas fa-user | Username / DNI input field |
fas fa-lock | Password input field |
fas fa-map-marker-alt | Property location indicators on the dashboard |
text-green-700 color from their parent <span> so they stay consistent with the green palette without needing inline styles.
Typography
TF-App uses the Montserrat typeface loaded from Google Fonts at weights 500 (medium) and 700 (bold). Load it in the<head> of every view:
<style> block:
display=swap parameter ensures text renders in the system fallback font while Montserrat loads, preventing an invisible-text flash on slower connections — an important consideration for mobile devices with variable network quality.
The setupCounter Export
main.js also exports a setupCounter utility that demonstrates the vanilla JS pattern for click-driven state updates. While not used in the production login flow, it serves as a reference for adding stateful interactions to any element without a framework.
counter) inside a closure, exposes a single setCounter function that both updates the internal value and re-renders the element’s text, and attaches a click listener that increments by one. Apply the same closure pattern whenever you need a self-contained stateful component — a toggle button, an expandable panel, or a quantity selector — without reaching for a framework.