TF-App is not a single-page application. Rather than rendering different screens inside one HTML shell, it uses separateDocumentation 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.
.html files for each view and navigates between them with window.location.href. This approach maps naturally to Capacitor’s WebView model — each view is a full HTML document with its own <head> resources, its own <script> modules, and its own Tailwind setup. There is no client-side router to configure, no virtual DOM to reconcile, and no hydration step; when you navigate to a view, the browser simply loads that file.
Available Views
| View File | Route | Purpose |
|---|---|---|
dist/index.html | / | Authentication screen — DNI and password form (app entry point) |
dist/dashboard.html | /dashboard.html | Main app dashboard after successful login |
dist/cargando.html | /cargando.html | Loading / transition screen shown between actions |
The files under
src/views/ (login.html, dashboard.html, cargando.html) are currently empty placeholders. All active view content lives in dist/ — the output directory Vite writes to on build and the directory Capacitor serves via webDir: "dist" in capacitor.config.json. During development, Vite’s dev server serves every HTML file in the project. You can navigate directly to any view by entering its path in the browser address bar, for example http://localhost:5173/dashboard.html, without going through the login flow. This makes it easy to develop and style each screen in isolation.Navigating Between Views
Navigation is handled by assigning a new path towindow.location.href. The browser performs a full page load to the target file, which is the same behavior as clicking an <a> element.
sessionStorage before navigating and read it back in the destination view’s DOMContentLoaded handler.
Adding a New View
Create the HTML file
Add a new file under
dist/, for example dist/properties.html. Copy the shell from an existing view such as dist/dashboard.html to inherit the Tailwind CDN link, Font Awesome link, Montserrat font, and wave decoration markup. Note that src/views/ contains only empty placeholder files — the active view files live in dist/.Add a script module for page logic
Reference a new JS file specific to this view, or write inline logic inside a
<script type="module"> block at the bottom of <body>:Include the modal HTML structure
Paste the
messageModal markup before the closing </body> tag so that calls to showMessage() in your view’s JS have the required DOM elements to target. See the UI Components guide for the full modal snippet.Loading the Correct JS per View
Each view loads only the JavaScript it needs. Reference a view-specific module file with a<script type="module"> tag at the bottom of the view’s <body>:
type="module" attribute defers execution until the DOM is parsed and enables ES module import/export syntax. This means you do not need a separate DOMContentLoaded guard for top-level code in a module script — module scripts are deferred by default.
If two views share a utility (such as showMessage), extract it into a shared file and import it:
Back Navigation
To navigate back to the previous view, use either the browser history API or an explicithref:
window.history.back() is equivalent to the user pressing the Android hardware back button. If you want a back button that always goes to a specific screen regardless of navigation history, use an explicit window.location.href assignment instead.
The Entry Point
dist/index.html is the app’s entry point — the file Capacitor loads when the app launches (/ maps to index.html in the WebView). It is also the output Vite writes when you run vite build.
index.html at the project root), hashes asset filenames for cache-busting, and writes the output to dist/. Asset paths are updated to reflect the hashed filenames (e.g., logo-tf-LZ8NebR2.png).