# Total.js Forge > Documentation, recipes and examples for Total.js 5 and jComponent 20. Execution evidence is recorded per page and content revision. Scope: Total.js v5 (npm package `total5`, backend) and jComponent v20 (frontend). Total.js v4 and jComponent v19 or older are not covered; do not assume their APIs exist. The documentation covers both frameworks. The other sections are independent: `total5` is the backend, `jcomponent` the frontend and `components` the catalogue of jComponent components. Read only the ones that match your task. ## Start here - [Total.js strengths and the problems they solve](https://forge.totaljs.es/en/docs/totaljs-strengths.md) - [Why choose Total.js](https://forge.totaljs.es/en/docs/choosing-totaljs.md) - [Taskboard: a runnable application with sessions, roles and persistent tasks](https://forge.totaljs.es/en/docs/taskboard-reference.md) - [Taskboard Live: owner-scoped file attachments and authenticated realtime updates](https://forge.totaljs.es/en/docs/taskboard-live.md) - [Taskboard SQL: the same application on SQLite with real SQL and an atomic transaction](https://forge.totaljs.es/en/docs/taskboard-sql.md) - [Total.js 5 coverage map, database contracts and integration boundaries](https://forge.totaljs.es/en/docs/total5-coverage-map.md) - [Native conventions for coding assistants](https://forge.totaljs.es/en/docs/totaljs-agent-conventions.md) - [How to consult versions, sources and complete pages](https://forge.totaljs.es/en/docs/consulting-forge.md) - [Concise assistant context](https://forge.totaljs.es/ai-context.md) - [Reviewed upstream source revisions and scope](https://forge.totaljs.es/ai-sources.json) - [Pinned runtime and upstream source snapshots](https://forge.totaljs.es/knowledge-sources.json) - [Declaration and component inventory with explicit coverage gaps](https://forge.totaljs.es/knowledge-coverage.json) - [Documents, stable sections and content hashes](https://forge.totaljs.es/knowledge.json) - [Cookbook execution evidence and exact test scope](https://forge.totaljs.es/validation.json) - [Execution evidence for the two introductory examples](https://forge.totaljs.es/ai-validation.json) These resources support explicit consultation. Crawling, search retrieval and model training are separate; access does not guarantee training inclusion or recommendations. ## Recorded performance benchmarks - [Interactive results, methodology and limits](https://forge.totaljs.es/en/benchmarks/) - [Benchmark report in Markdown](https://forge.totaljs.es/en/benchmarks/index.md) - [Reviewed benchmark summary and original data links](https://forge.totaljs.es/benchmarks/summary.json) These are historical Linux measurements, separate from executable code-generation evaluation tasks in benchmark.jsonl. Total5 JSON validation uses a compact schema and direct controller. The comparison covers eight adapters at common targets of 100 and 1,000 requests/s. Runtime versions differ and are disclosed for each adapter; per-cell origins retain provenance and every scenario keeps all three repetitions. ## Products and versions - Total.js 5 (`total5@0.0.19`) [framework, available]: Total.js 5 (backend) (https://forge.totaljs.es/llms-total5.txt) - jComponent 20 (`jcomponent@20`) [library, available]: jComponent 20 (frontend) (https://forge.totaljs.es/llms-jcomponent.txt); Components catalogue (jComponent 20) (https://forge.totaljs.es/llms-components.txt) - OpenPlatform (`openplatform@5`) [app, available]: OpenPlatform (https://forge.totaljs.es/llms-openplatform.txt) - Flow (`flow@11.1`) [app, available]: Flow (https://forge.totaljs.es/llms-flow.txt) - CMS (`cms@8071e48`) [app, available]: CMS (https://forge.totaljs.es/llms-cms.txt) - Todomator (`todomator@1.7`) [app, available]: Todomator (https://forge.totaljs.es/llms-todomator.txt) - UI Builder (`uibuilder@1`) [app, available]: UI Builder (https://forge.totaljs.es/llms-uibuilder.txt) - Machine-readable list of the products: https://forge.totaljs.es/products.json - MCP (read-only tools: search, page, test, products, verify_api, coverage, source): https://forge.totaljs.es/mcp/ with the shared token shown at https://forge.totaljs.es/en/ai/ (discovery: https://forge.totaljs.es/.well-known/mcp/server-card.json) ## Documentation - [Get started with Total.js 5](https://forge.totaljs.es/en/docs/getting-started.md): Install Total.js 5, create the start script and the first route, action and view, and run the application. - [Consult Forge with versions, sources and complete reads](https://forge.totaljs.es/en/docs/consulting-forge.md): A reliable search, read and source workflow for Total.js 5 and jComponent 20; coverage and evidence are explicit. - [Project structure of a Total.js 5 application](https://forge.totaljs.es/en/docs/project-structure.md): The folders of a Total.js 5 project, what each one contains and which files the framework loads automatically. - [Total.js 5 conventions for coding assistants](https://forge.totaljs.es/en/docs/totaljs-agent-conventions.md): Native application conventions, source priorities and version boundaries for agents using Total.js 5, with a tested action and direct controller example. - [The Total.js code style: names, files, CSS, SQL and components](https://forge.totaljs.es/en/docs/code-style.md): The conventions of the Total.js community for JavaScript, names, schemas, require(), CSS, jComponent plugins and components, SQL scripts and folders, so that every project reads the same and a team or an AI assistant can continue it. - [Common mistakes with Total.js 5, with wrong and right code](https://forge.totaljs.es/en/docs/common-mistakes.md): Correct common Total.js 5 mistakes with wrong and correct code examples. - [Taskboard reference application with sessions, ownership and persistent tasks](https://forge.totaljs.es/en/docs/taskboard-reference.md): Build and test a small usable application with signed sessions, scrypt passwords, CSRF, two roles, owner-scoped NoSQL CRUD and a browser interface. - [Taskboard Live: realtime updates and file attachments with sessions](https://forge.totaljs.es/en/docs/taskboard-live.md): Extend the Taskboard reference with owner-scoped file attachments and an authenticated WebSocket that pushes changes to the right people, all tested over HTTP, WebSocket and a browser. - [Taskboard SQL: the same application on SQLite with real SQL and a transaction](https://forge.totaljs.es/en/docs/taskboard-sql.md): Keep the Taskboard sessions, roles and CSRF, store the tasks in a SQLite file through the native QueryBuilder and move completed tasks to an archive in one atomic SQL transaction. - [Global names of Total.js 5](https://forge.totaljs.es/en/docs/globals-total5.md): Global functions and objects of Total.js 5, with their purpose and usage recipes. - [Configuration keys of Total.js 5](https://forge.totaljs.es/en/docs/configuration-keys.md): Configure Total.js 5 through CONF: application settings, HTTP responses, email and runtime defaults. - [Route syntax of Total.js 5](https://forge.totaljs.es/en/docs/route-syntax.md): Declare Total.js routes with methods, URL parameters, wildcards, flags, authentication, middleware and actions. - [The $ object of a Total.js 5 handler](https://forge.totaljs.es/en/docs/controller-api.md): Use the properties and methods of the controller received by a route handler. - [Options of NEWACTION and the object an action receives](https://forge.totaljs.es/en/docs/action-options.md): Configure NEWACTION and use the action context to handle requests. - [Total.js 5 API guide by task](https://forge.totaljs.es/en/docs/total5-coverage-map.md): Find the Total.js 5 API for routing, actions, storage, messaging and integrations. - [Input types of NEWACTION](https://forge.totaljs.es/en/docs/input-types.md): Choose types for input, params, query and output definitions, including conversions and rejected values. - [Global names of jComponent 20](https://forge.totaljs.es/en/docs/globals-jcomponent.md): Global functions and objects of jComponent 20, with their purpose and usage recipes. - [Total.js strengths and the application problems they solve](https://forge.totaljs.es/en/docs/totaljs-strengths.md): A dependency-free core, a complete integrated backend, built-in security, realtime messaging, FlowStream, Python interoperability, a fast learning curve and complete MIT applications to start from. - [Why choose Total.js for a Node.js application](https://forge.totaljs.es/en/docs/choosing-totaljs.md): What Total.js gives a Node.js team: a dependency-free core, everything a business application needs in one framework, built-in authentication and validation, a fast learning curve and complete open-source applications to start from. - [From Express to Total.js 5](https://forge.totaljs.es/en/docs/express-to-totaljs.md): What you write in Express and what you write in Total.js 5 for the same job: routes, parameters, bodies, responses, middleware, static files, cookies, validation, views and more. ## Total.js 5 (backend) - [Validate a JSON body with an action](https://forge.totaljs.es/en/total5/validate-json-body.md): Define an input schema on an action and let Total.js reject invalid requests before your code runs. - [Expose actions through one API endpoint](https://forge.totaljs.es/en/total5/api-routes.md): Declare ROUTE('API ...') endpoints so a client can call many actions with POST {schema, data} on a single URL. - [Read URL parameters in a route](https://forge.totaljs.es/en/total5/routes-with-params.md): Declare dynamic segments such as {id} in a route and read them from $.params. - [Catch many URLs with a wildcard route](https://forge.totaljs.es/en/total5/route-wildcards.md): End a route with * to match everything below a path, and keep specific routes for the exceptions. - [Handle each HTTP method](https://forge.totaljs.es/en/total5/http-methods.md): Declare routes for GET, POST, PUT, PATCH and DELETE and read the method from $.method. - [Restrict a route with flags](https://forge.totaljs.es/en/total5/route-flags.md): Add @flags such as @json, @xml or @upload so a route only matches the requests it is meant for. - [Read the query string and the request body](https://forge.totaljs.es/en/total5/query-string-and-body.md): Use $.query for the URL parameters and $.body for JSON or form data in a route handler. - [Limit the payload size and the timeout of a route](https://forge.totaljs.es/en/total5/route-limits.md): Append <1kb or <10s to a route to cap the request size or the time the handler may take. - [Declare typed route parameters in an action](https://forge.totaljs.es/en/total5/actions-with-params.md): Use the params option of NEWACTION so Total.js validates the URL parameters before your code runs. - [Choose how to respond](https://forge.totaljs.es/en/total5/responses.md): Send JSON, HTML, plain text, XML, redirects, empty responses or binary data from a route handler. - [Read headers and work with cookies](https://forge.totaljs.es/en/total5/headers-and-cookies.md): Read request headers from $.headers, read and write cookies with $.cookie() and set response headers. - [Receive file uploads](https://forge.totaljs.es/en/total5/file-upload.md): Accept multipart/form-data with the @upload flag and read the uploaded files from $.files. - [Allow cross-origin requests with CORS](https://forge.totaljs.es/en/total5/cors.md): Call CORS() to allow one origin, several origins or every origin to use your routes from a browser. - [Render a view without writing a handler](https://forge.totaljs.es/en/total5/view-without-handler.md): A route with no handler renders the view named after its URL, or the view you name. - [Pick the right input type for an action](https://forge.totaljs.es/en/total5/input-types.md): Choose types for input, params, query and output definitions, including conversions and rejected values. - [Validate the query string in an action](https://forge.totaljs.es/en/total5/action-query.md): Declare query in NEWACTION to validate and convert the URL parameters, and read the clean values from $.query. - [Filter the response of an action with output](https://forge.totaljs.es/en/total5/action-output.md): Declare output so only the listed fields leave the action, for example to never leak a password hash. - [Require a user or a permission in an action](https://forge.totaljs.es/en/total5/action-user-and-permissions.md): Use the user and permissions options of NEWACTION so authorization lives next to the action, not in every route. - [Protect routes with AUTH](https://forge.totaljs.es/en/total5/protect-routes-with-auth.md): Authenticate each request with AUTH() and restrict routes to signed-in or anonymous users with the + and - prefixes. - [Declare the route inside the action](https://forge.totaljs.es/en/total5/action-route-option.md): Put the route in the route option of NEWACTION and keep the URL, the validation and the code in one place. - [Sign users in with the built-in session auth](https://forge.totaljs.es/en/total5/sessions-with-built-in-auth.md): Pass an options object to AUTH() to get signed session cookies, a session store and logout without writing the plumbing. - [Call an action from your own code](https://forge.totaljs.es/en/total5/calling-actions-from-code.md): Use ACTION() to run an action from a timer, a job or another action, with its own payload, query and user. - [Chain several actions in one route](https://forge.totaljs.es/en/total5/action-chaining.md): List several actions after --> to run them in sequence over the same payload and mark which one answers with (response). - [Add a middleware to a route](https://forge.totaljs.es/en/total5/middleware.md): Register a middleware with MIDDLEWARE() and attach it to routes with the #name flag. - [Build a WebSocket chat](https://forge.totaljs.es/en/total5/websocket-chat.md): Declare a SOCKET route, listen to messages and broadcast them to every connected client. - [Connect to a WebSocket server from Node](https://forge.totaljs.es/en/total5/websocket-client.md): Use WEBSOCKETCLIENT to open a WebSocket connection from your app, send messages and react to the answers. - [Decouple your code with events](https://forge.totaljs.es/en/total5/events.md): Emit and listen to application events with EMIT(), ON(), ONCE() and OFF() so modules do not call each other directly. - [Store and read data with the embedded NoSQL database](https://forge.totaljs.es/en/total5/nosql-crud.md): Insert and query documents with NOSQL() and expose them through actions, without installing any database. - [Query the NoSQL database](https://forge.totaljs.es/en/total5/nosql-queries.md): Filter, sort, page and project documents with where, in, between, search, sort, take, skip and fields. - [Update and remove NoSQL documents](https://forge.totaljs.es/en/total5/nosql-update-and-remove.md): Change documents with update() and where(), delete them with remove(), and read how many were affected. - [Use the DATA API to switch databases](https://forge.totaljs.es/en/total5/data-api.md): DATA addresses a table as database/table, so the same query code works with the embedded NoSQL and with other databases. - [Cache values in memory](https://forge.totaljs.es/en/total5/cache.md): Store values with CACHE.set() and an expiration, read them with CACHE.get() and clear them with remove() or reset(). - [Persist small settings with MEMORIZE](https://forge.totaljs.es/en/total5/memorize.md): Keep a JSON object on disk that survives restarts, for counters and settings that do not need a database. - [Generate unique ids and hashes](https://forge.totaljs.es/en/total5/unique-ids-and-hashes.md): Create ids with UID() and GUID(), and hashes with HASH(), and know which one to use where. - [Cache slow results on disk with FILECACHE](https://forge.totaljs.es/en/total5/filecache.md): Use FILECACHE() to compute a result once and reuse it from a file for a period, even after a restart. - [Store uploaded files with FILESTORAGE](https://forge.totaljs.es/en/total5/filestorage.md): Save uploads in a managed file storage with file.fs() and send them back with $.filefs(). - [Render a view with a layout](https://forge.totaljs.es/en/total5/views-and-layouts.md): Render an HTML view with a model, loop over data and pass values to the layout. - [Use conditions and escaping in views](https://forge.totaljs.es/en/total5/view-conditions-and-escaping.md): Branch with @{if}, @{else} and @{fi}, and choose between escaped output @{value} and raw HTML @{!value}. - [Loop over arrays and objects in views](https://forge.totaljs.es/en/total5/view-loops.md): Repeat markup with @{foreach} for arrays and objects, and use the index of the current item. - [Include views and assets](https://forge.totaljs.es/en/total5/view-includes-and-assets.md): Reuse markup with @{view()} and add scripts and styles with @{import()}. - [Fill sections of the layout from a view](https://forge.totaljs.es/en/total5/view-sections.md): Declare a section in a view with @{section} and print it in the layout with @{section('name')}, and pick another layout per request. - [Add view helpers and read the config in views](https://forge.totaljs.es/en/total5/view-helpers-and-config.md): Register functions in DEF.helpers to call them from views, and read config values with @{'%key'}. - [Convert Markdown to HTML](https://forge.totaljs.es/en/total5/markdown.md): Use the String.markdown() prototype to render Markdown text into HTML, for content stored by users or in files. - [Render text with Tangular templates](https://forge.totaljs.es/en/total5/tangular-templates.md): Use Tangular.render() to fill templates for e-mails, documents and messages with conditions, loops and helpers. - [Render templates from text, files and URLs with TEMPLATE](https://forge.totaljs.es/en/total5/template-files.md): Use TEMPLATE() to render a Tangular template that is a text, a file of the templates folder or a URL, with its own helpers and a default model. - [Compare two lists with DIFFARR: what to add, update and remove](https://forge.totaljs.es/en/total5/diffarr-sync-lists.md): Use DIFFARR() to compare the items saved in the database with the items of a form and get the ones to add, to update and to remove. - [Query builder: DB() and NEWDB() with your own database driver](https://forge.totaljs.es/en/total5/query-builder-db.md): Build queries with DB().find().where().sort() and let a driver registered with NEWDB() run them, while a registered driver implements supported database operations. - [Configure the app with the config file](https://forge.totaljs.es/en/total5/configuration-file.md): Keep settings in a config file and read them through CONF. - [Encrypt and decrypt data with a key](https://forge.totaljs.es/en/total5/encrypt-and-decrypt.md): Turn objects into opaque tokens with ENCRYPT() and read them back with DECRYPT(), for signed links and short-lived tokens. - [Call external services with API() and NEWAPI() drivers](https://forge.totaljs.es/en/total5/api-drivers.md): Register a driver for a service with NEWAPI() and call it from actions with API(name, schema, data), with the same callback, error and promise style as the query builder. - [Talk to language models with AIMODEL(), NEWAIMODEL() and AIPARSER()](https://forge.totaljs.es/en/total5/ai-models.md): Build a chat request with AIMODEL(), let a driver registered with NEWAIMODEL() send it to a provider, and read streamed answers with AIPARSER(). - [Limit failed attempts with BLOCKED](https://forge.totaljs.es/en/total5/rate-limiting.md): Count attempts per IP address with BLOCKED() and answer 429 once the limit is reached, for logins and password resets. - [The small global helpers: MAIN, REPO, FUNC, NOW, CLONE, COPY, QUERIFY and PROMISIFY](https://forge.totaljs.es/en/total5/utility-globals.md): Use application globals, dates, deep copies, query strings and promise helpers. - [Collect errors with ErrorBuilder, log them with ERROR() and keep an audit trail with AUDIT()](https://forge.totaljs.es/en/total5/errors-and-audit.md): Answer with several errors at once using ErrorBuilder, the SUCCESS() answer, how ERROR() records failures, and how AUDIT() appends who did what to a log file. - [Debounce work with setTimeout2() and clearTimeout2()](https://forge.totaljs.es/en/total5/debounce-timers.md): Use setTimeout2() to run a function once after the calls stop coming, replacing the previous timer with the same id, and cancel it with clearTimeout2(). - [Tokens tied to a browser with ENCRYPTREQ() and DECRYPTREQ()](https://forge.totaljs.es/en/total5/request-bound-tokens.md): Encrypt a value together with the user agent (and optionally the IP address) of the request, and read it back only from the same client. - [Back up a folder with BACKUP() and RESTORE(), and run commands with SHELL()](https://forge.totaljs.es/en/total5/backup-restore-shell.md): Pack a directory into one file and unpack it again with BACKUP() and RESTORE(), and run a shell command in the project folder with SHELL(). - [Put the application in maintenance with PAUSESERVER()](https://forge.totaljs.es/en/total5/pause-server.md): Pause the server by name so that every request gets a 503 page, resume it, and know that without a second argument the call toggles. - [Business rules as text with NEWMACRO()](https://forge.totaljs.es/en/total5/macros.md): Compile small rules written in a simple language (IF, ELSE, AND, OR, RETURN, helper calls) into a function that you run with a model, so the rules can live in a file or a database. - [Serve static files from the public folder](https://forge.totaljs.es/en/total5/static-files.md): Files in the public directory are served automatically, no route required. - [Call another address with AJAX() from the server](https://forge.totaljs.es/en/total5/ajax-requests.md): Use AJAX() to call an HTTP address with a JSON body and get the parsed answer, as a promise or with a callback, and know what happens with errors and XML. - [Call other HTTP APIs with RESTBuilder](https://forge.totaljs.es/en/total5/restbuilder.md): Make GET and POST requests to another service, set headers and a timeout, and read the status and the parsed response. - [Release a stream when it ends with CLEANUP()](https://forge.totaljs.es/en/total5/cleanup-streams.md): Use CLEANUP() to destroy a stream as soon as it has finished or failed, so that file handles are not left open, with a callback or as a promise. - [Translate a view into several languages](https://forge.totaljs.es/en/total5/localization.md): Mark texts with @(...) in views and provide translations in resource files selected by LOCALIZE(). - [Run code on a schedule with CRON](https://forge.totaljs.es/en/total5/cron-jobs.md): Register a function with CRON() and a five-field cron line, and know when the check runs and how to remove a job. - [Run heavy work in a thread or a child process](https://forge.totaljs.es/en/total5/workers-and-threads.md): Use NEWTHREAD() to start a worker thread, send it messages and read the replies, without blocking the main process. - [Share a few worker threads with NEWTHREADPOOL()](https://forge.totaljs.es/en/total5/thread-pool.md): Start a fixed number of workers, borrow one with pool.exec() when there is work, give it back with release(), and let the other jobs wait for a free worker. - [Call other servers with REQUEST and save files with DOWNLOAD](https://forge.totaljs.es/en/total5/request-and-download.md): Use REQUEST() for low-level HTTP calls with full control over method, headers, query and body, and DOWNLOAD() to stream a remote file to disk. - [Send an email from a view](https://forge.totaljs.es/en/total5/send-email.md): Configure SMTP in the config file, render a view as the message body with MAIL(), and send plain HTML with HTMLMAIL(). - [Customize the 404 and 401 pages](https://forge.totaljs.es/en/total5/error-pages.md): Register ROUTE('#404') and ROUTE('#401') handlers to replace the built-in error pages, and trigger them yourself with $.fallback(). - [Mail yourself a message with LOGMAIL()](https://forge.totaljs.es/en/total5/logmail.md): Send a plain text or JSON message to an address without a view, for logs and alerts, through the same SMTP settings as MAIL(). - [Send files and streams to the client](https://forge.totaljs.es/en/total5/file-download.md): Serve a file from disk with $.file(), force a download name, stream generated content with $.stream() and answer with 404 when the file is missing. - [Forward requests to another server](https://forge.totaljs.es/en/total5/proxy.md): Use PROXY() to map a URL prefix to an upstream server, choose how the path is copied, and $.proxy() to forward a single route. - [Publish a local server through a tunnel with PROXYSERVER() and PROXYCLIENT()](https://forge.totaljs.es/en/total5/proxy-tunnel.md): Let a Total.js server with a public address forward requests to a program that only runs on a private machine, with a WebSocket tunnel that the private side opens. - [Protect forms and requests with CSRF tokens](https://forge.totaljs.es/en/total5/csrf-protection.md): Create a token with $.csrf(), send it with the request and verify it in a middleware so cross-site requests are rejected. - [Group actions in a schema and reuse input definitions](https://forge.totaljs.es/en/total5/schemas.md): Use NEWSCHEMA() to declare related actions under one name, and share an input definition between actions with a file in jsonschemas/. - [Build a processing pipeline with transforms](https://forge.totaljs.es/en/total5/transforms.md): Register several steps under one name with NEWTRANSFORM() and run a value through them in order with TRANSFORM(). - [Exchange messages with the Total Messaging Service](https://forge.totaljs.es/en/total5/tms.md): Enable the TMS WebSocket endpoint and let external clients receive published messages, send messages to your app and call its functions. - [Build a complete REST resource with actions](https://forge.totaljs.es/en/total5/actions-crud.md): Declare query, read, insert, update, patch and remove actions over the NoSQL database, with validation, a 404 for missing records and routes that map each HTTP method. - [Configure a WebSocket route with flags, auth and parameters](https://forge.totaljs.es/en/total5/websocket-flags.md): Choose the message type with @text or @binary, require a signed-in user with the + prefix, check a CSRF token with @csrf and read URL parameters in SOCKET routes. - [Minify and merge CSS, JavaScript and HTML](https://forge.totaljs.es/en/total5/minification.md): Static files and HTML responses are minified automatically; use MERGE() to serve several files as one and the $minify settings to switch it off. - [Resize and convert images](https://forge.totaljs.es/en/total5/images.md): Process images with Image.load(), chain resize, crop and format operations, save the result, measure its size and serve thumbnails with $.image(). - [Verify numeric schema boundaries instead of assuming integer coercion](https://forge.totaljs.es/en/total5/numeric-schema-boundaries.md): Check Int, SmallInt, TinyInt and Number2 with native compact schemas, including fractional values, zero and out-of-range inputs. - [Use the built-in string, number, date and array helpers](https://forge.totaljs.es/en/total5/utilities.md): Total.js extends String, Number, Date and Array with helpers for slugs, hashes, formatting, parsing, grouping and searching, and offers U.extend() and U.clone() for objects. - [Record action audit events with a native audit sink](https://forge.totaljs.es/en/total5/action-audit.md): Observe the audit option and explicit $.audit() calls without contacting a logging service or writing sensitive input to an application log. - [Run in debug and release mode](https://forge.totaljs.es/en/total5/release-mode-and-debugging.md): The options of Total.run() choose between debug and release mode; read the mode from DEBUG and limit routes to one mode with @debug and @release. - [Test the application with the built-in test runner](https://forge.totaljs.es/en/total5/tests.md): Write a test.js that starts the app, registers tests with Test.push(), checks results with Test.print() and exits with a non-zero code when one fails. - [Use all CPU cores with the cluster mode](https://forge.totaljs.es/en/total5/cluster.md): Start several worker processes behind one port with the cluster option of Total.run(), and know what is shared between them and what is not. - [Load a JavaScript module from a URL with IMPORT()](https://forge.totaljs.es/en/total5/import-remote-module.md): Download a file with JavaScript from an address, keep it in the tmp folder, require it and use what it exports; the second call does not download it again. - [Build a flow of components with Flow.load() and run it with exec()](https://forge.totaljs.es/en/total5/flowstream.md): Describe a FlowStream as components and the connections between them, load it in the application, send a message through it and read the answer, and change the configuration of a component while it runs. - [Test a Flow component alone with Flow.test()](https://forge.totaljs.es/en/total5/flowstream-component-test.md): Load one component in a flow of its own, send it a message from the code and read what it sends to its outputs, without building the whole flow. - [Call a Python program that keeps running with PYPELINE()](https://forge.totaljs.es/en/total5/pypeline.md): Start a Python script from the application, send it JSON messages over a socket and receive its answers, with the script restarted if it dies. - [Enums and string-format validation boundaries](https://forge.totaljs.es/en/total5/schema-enums-and-formats.md): Run positive and negative compact-schema checks for enums, Color, Base64, Zip, Icon, JSON and IP formats. - [TotalAPI and Componentator service boundaries](https://forge.totaljs.es/en/total5/remote-service-boundaries.md): Verify the disabled TotalAPI branch and Componentator local-cache reuse without making external service calls. - [QueryBuilder operations, filters and driver contract](https://forge.totaljs.es/en/total5/query-builder-contract.md): Inspect native DB and NEWDB options, queued results, upsert, errors and filter shapes without confusing a builder with a database driver. - [Compile and run a native server component](https://forge.totaljs.es/en/total5/native-components.md): Compile trusted Total.js component HTML, create an instance, validate messages, reconfigure it and release its resources. - [Controller callbacks, manual authorization and conditional responses](https://forge.totaljs.es/en/total5/controller-completion-and-cache.md): Execute jsonstring, respond, done, successful, authorize, custom and Last-Modified handling. - [Action transport options and explicit TMS publishing](https://forge.totaljs.es/en/total5/action-transport-boundaries.md): Test csrf, encrypt, compress and publish against real HTTP and TMS rather than assuming metadata enforces behavior. - [Invalidate release-mode static caches with TOUCH](https://forge.totaljs.es/en/total5/touch-static-cache.md): Serve and modify a temporary static file, clear its cached representation and remove cached 404 entries. - [OPENCLIENT RPC, events and shared connections](https://forge.totaljs.es/en/total5/openclient-protocol.md): Exercise OPENCLIENT with a local protocol fixture, including initialization, callback correlation, timeout and logical-client removal. - [Load FlowStream files and execute isolated workers](https://forge.totaljs.es/en/total5/flow-files-and-workers.md): Run the same trusted FlowStream schema as a worker thread and a child process, load .flow files and remove instances. - [Action lifecycle hooks, result extension and administrator guards](https://forge.totaljs.es/en/total5/action-hooks-and-admin.md): Exercise oninput, onoutput, extend, sa and su with valid, invalid and failed actions. - [Real SQL with native QueryBuilder and SQLite transactions](https://forge.totaljs.es/en/total5/query-builder-sqlite.md): Register a bounded SQLite driver, run parameterized CRUD and verify commit, constraint failure and rollback against a file-backed database. - [Load application resources and avoid runtime package surprises](https://forge.totaljs.es/en/total5/load-and-npminstall.md): Run LOAD in a separate process and verify NPMINSTALL reuse of an already available package without network access. - [Query a real local LDAP directory](https://forge.totaljs.es/en/total5/ldap-openldap.md): Query an isolated OpenLDAP instance and verify the bind result in total5 0.0.19. - [Package application files as a Total.js bundle](https://forge.totaljs.es/en/total5/application-bundles.md): Create a local bundle, load its definitions through the framework startup loader and verify extraction into .src. - [Own uploaded-file cleanup and build query links](https://forge.totaljs.es/en/total5/upload-lifecycle-and-href.md): Verify default upload cleanup, autoclear(false), explicit clear and href query replacement. ## jComponent 20 (frontend) - [Get started with jComponent 20](https://forge.totaljs.es/en/jcomponent/getting-started.md): Load the jComponent bundle, set a value in the global state and show it with a ui-bind element. - [Read, change and watch the state](https://forge.totaljs.es/en/jcomponent/state-api.md): Use SET, GET, UPD, PUSH and WATCH to work with the global state and react when a path changes. - [Write a custom jComponent](https://forge.totaljs.es/en/jcomponent/custom-component.md): Register a reusable component with COMPONENT(), render it in make(), react to state changes in setter() and write back with set(). - [Configure a component and reconfigure it later](https://forge.totaljs.es/en/jcomponent/component-config.md): Give a component default options, override them in the config attribute, react in configure() and change them at runtime with reconfigure(). - [Component lifecycle: make, setter and destroy](https://forge.totaljs.es/en/jcomponent/component-lifecycle.md): Know when jComponent creates, updates and removes a component, and clean up timers and listeners in destroy(). - [Validate input with a component's validate()](https://forge.totaljs.es/en/jcomponent/validation.md): Implement validate() in a component, read the invalid, touched and modified states, and find invalid fields with ERRORS(). - [Path prefixes: common, code lists, temporary state and plugin paths](https://forge.totaljs.es/en/jcomponent/path-prefixes.md): The first character of a jComponent path chooses where the value lives: * the common state, # the code lists, % the temporary state, ? the plugin state and plugin|path a property of a plugin object. - [Load a library before a component starts](https://forge.totaljs.es/en/jcomponent/component-dependencies.md): List scripts and styles as the dependencies of a component so jComponent downloads them once and starts the component afterwards. - [Extend components and plugins with EXTENSION](https://forge.totaljs.es/en/jcomponent/extensions.md): Add behavior to an existing component from outside, without editing its source, with EXTENSION(). - [Show, hide and style elements with ui-bind](https://forge.totaljs.es/en/jcomponent/ui-bind.md): Use ui-bind commands to toggle visibility, classes and HTML from the state, without writing DOM code. - [Render lists with a ui-bind template](https://forge.totaljs.es/en/jcomponent/ui-bind-templates.md): Put a Tangular template inside ui-bind with the template command to render arrays and objects whenever the data changes. - [More ui-bind commands: attributes, values, state and formatting](https://forge.totaljs.es/en/jcomponent/ui-bind-more-commands.md): Set HTML, attributes, form values, disabled state and a text format from the state with ui-bind commands. - [ui-bind reference: every command, option and attribute](https://forge.totaljs.es/en/jcomponent/ui-bind-reference.md): All the commands of ui-bind with what each one does, the options that control when it runs, and the attributes that choose the target element. - [Component instance reference: properties and methods of self](https://forge.totaljs.es/en/jcomponent/component-instance-reference.md): The declaration of a jComponent 20 component and what its instance (self) offers: properties, value methods, DOM helpers, events, watchers and commands. - [Group state and logic in a jComponent plugin](https://forge.totaljs.es/en/jcomponent/plugin.md): Declare a plugin with PLUGIN() and attach it to a part of the page with ui-plugin, using ? as its own path. - [Route pages in the browser without reloading](https://forge.totaljs.es/en/jcomponent/spa-routing.md): Register client-side routes with ROUTE(), navigate with REDIRECT(), read the URL parameters and the query string from NAV, and go back in the history. - [Load parts of a page with ui-import](https://forge.totaljs.es/en/jcomponent/ui-import.md): Fetch an HTML part from the server into an element with ui-import or IMPORT(), and let the part carry its own components. - [Call code with commands and EXEC](https://forge.totaljs.es/en/jcomponent/commands.md): Register commands with component.command() and call them with CMD(), or call a plugin method with EXEC('plugin/method'). - [Send events between components with ON and EMIT](https://forge.totaljs.es/en/jcomponent/events.md): Decouple parts of the page with global events: EMIT() announces something, ON() listens, OFF() stops listening. - [Store data in the browser with CACHE, PREF and COOKIES](https://forge.totaljs.es/en/jcomponent/storage-cache-pref-cookies.md): Keep values between visits with CACHE (expiring), PREF (user preferences) and COOKIES. - [Share settings with ENV and the [key] syntax](https://forge.totaljs.es/en/jcomponent/environment-variables.md): Register values with ENV() and use them in URLs and component configuration with the [key] placeholder. - [Load data from a Total.js route with AJAX](https://forge.totaljs.es/en/jcomponent/ajax.md): Call a Total.js route from the page with AJAX() and put the response into the jComponent state. - [Call Total.js API routes with API()](https://forge.totaljs.es/en/jcomponent/api-calls.md): Use API(url, name, data, callback) to call the actions of a ROUTE('API ...') endpoint, validation errors included. - [Upload files with UPLOAD() and progress](https://forge.totaljs.es/en/jcomponent/upload.md): Send a FormData to a Total.js @upload route with UPLOAD() and follow the progress. - [Small helpers: GUID, HASH, parseConfig, format and group](https://forge.totaljs.es/en/jcomponent/utilities.md): Use the helper functions that jComponent adds: random ids, hashes, config strings, string and date formatting and grouping. - [State shortcuts: INC, TOGGLE, NUL, UPDATE, UNWATCH, WAIT, BLOCKED and CACHEPATH](https://forge.totaljs.es/en/jcomponent/state-shortcuts.md): Small functions that change or watch a value of the state by its path, wait until a value exists, run something only once in a period and keep a value of the state in the cache. - [Data helpers: QUERIFY, STRINGIFY, ENCRYPT, FN, CL, TRANSLATE, UNAUTHORIZED and Thelpers](https://forge.totaljs.es/en/jcomponent/data-helpers.md): Build query strings, write JSON without what you do not want, encode a value with a key, compile an expression, load lists of values, translate texts, check permissions and add helpers to the templates. - [DOM helpers: ATTRD, HIDDEN, VISIBLE, WIDTH, STYLE, NODEMOVE, DIFFDOM and APPEARANCE](https://forge.totaljs.es/en/jcomponent/dom-helpers.md): Read data attributes, ask if an element is shown or on the screen, add styles that you can replace, move elements in their parent, update a list without redrawing it, and set the colors and the dark mode of the page. - [Find and call components and plugins: FIND, COMPONENTS, SETTER, EXE, TAPI, MIDDLEWARE and ADAPT](https://forge.totaljs.es/en/jcomponent/find-and-call.md): Look for the components of the page by name or path, call a method of several components at once, call functions by name, use two API addresses with TAPI and PIPE, run middleware before a route and replace the markers of a text. - [Dispatch custom path flags with FLAGS](https://forge.totaljs.es/en/jcomponent/custom-flags.md): Execute custom flags, observe their events and distinguish them from model changes and reserved state flags. ## Components catalogue (jComponent 20) - [j-AjaxLoading](https://forge.totaljs.es/en/components/ajaxloading.md): This component can show a loading text for async AJAX operations. - [j-Animation](https://forge.totaljs.es/en/components/animation.md): This component can animate elements with .animation class. - [j-Approve](https://forge.totaljs.es/en/components/approve.md): j-Approve: easy usage; singleton - [j-ASelected](https://forge.totaljs.es/en/components/aselected.md): The component adds selected class to element with disabled form events. - [j-AutoSelect](https://forge.totaljs.es/en/components/autoselect.md): The component automatically adds .selected class according to the selector class='autoselect' within the entire HTML document. This component is a perfect solution for server-side rendering and subseq - [j-Avatar](https://forge.totaljs.es/en/components/avatar.md): Avatar component needs to register your own theme. It contains default theme. - [j-BackToTop](https://forge.totaljs.es/en/components/backtotop.md): j-BackToTop: works as singleton - [j-Backup](https://forge.totaljs.es/en/components/backup.md): The component for data saving data to and loading from the local storage of the browser. - [j-Banners](https://forge.totaljs.es/en/components/banners.md): j-Banners: fully responsive; simple CSS animation - [j-BarChart](https://forge.totaljs.es/en/components/barchart.md): Please review an example and keep a data-source. - [j-Box](https://forge.totaljs.es/en/components/box.md): The component supports dynamic evaluation of the content of tag. The component will be destroyed automatically. - [j-Spotlight](https://forge.totaljs.es/en/components/spotlight.md): j-Spotlight: singleton; works with Bootstrap Grid System - [j-Stash](https://forge.totaljs.es/en/components/stash.md): The component can postpone elements without destructing and detaching from the DOM. This component can help you with dynamic content from the server side. We use the component in the Total.js FlowStre - [j-Stats12](https://forge.totaljs.es/en/components/stats12.md): j-Stats12 options: height, max, border, highlight - [j-Stats24](https://forge.totaljs.es/en/components/stats24.md): j-Stats24 options: height, max, tooltiplarge, tooltip, tooltiptext, border, highlight - [j-Stats7](https://forge.totaljs.es/en/components/stats7.md): j-Stats7 options: height, max, border, highlight, firstday - [j-StatsBarSimple](https://forge.totaljs.es/en/components/statsbarsimple.md): The component needs to have a defined template for rendering content and a tooltip. For an understanding look to the example. - [j-StatusInput](https://forge.totaljs.es/en/components/statusinput.md): j-StatusInput: easy usage for different cases; supports Dark mode - [j-Sticker](https://forge.totaljs.es/en/components/sticker.md): j-Sticker: NEW: minheight {Number} a minimal height of scroll area for applying of classes - [j-Suggestion](https://forge.totaljs.es/en/components/suggestion.md): If the value isn't defined then the component uses name as value. - [j-SVGIcons](https://forge.totaljs.es/en/components/svgicons.md): This component registers a new Web component in the form . - [j-Swiper](https://forge.totaljs.es/en/components/swiper.md): j-Swiper: wrapper for [Swiper.js library](https://swiperjs.com/); easy usage - [j-SwitchButton](https://forge.totaljs.es/en/components/switchbutton.md): j-SwitchButton options: required, disabled, border, align, description - [j-Table](https://forge.totaljs.es/en/components/table.md): Display records in a configurable table. - [j-TableGrid](https://forge.totaljs.es/en/components/tablegrid.md): The component makes a simple table grid (composed of div elements) divided by a simple border that you can modify. - [j-TabMenu](https://forge.totaljs.es/en/components/tabmenu.md): j-TabMenu options: class, selector, datasource, disabled, exec, attr - [j-Tabs](https://forge.totaljs.es/en/components/tabs.md): j-Tabs options: icon, data-id, title, icon - [j-Tagger](https://forge.totaljs.es/en/components/tagger.md): Tagger can render items in the array and each item can be removed. - [j-Template](https://forge.totaljs.es/en/components/template.md): j-Template: when the model is null or undefined then the template will be hidden - [j-Templates](https://forge.totaljs.es/en/components/templates.md): Templates must be defined in element. This component supports one special template called empty that will be visible if t - [j-Textarea](https://forge.totaljs.es/en/components/textarea.md): j-Textarea: NEW supports hidden scrollbar - [j-Textbox](https://forge.totaljs.es/en/components/textbox.md): j-Textbox: NEW innerlabel {Boolean} optional, enables inner label (default: true) - [j-TextboxList](https://forge.totaljs.es/en/components/textboxlist.md): j-TextboxList: NEW movable {Boolean} enables changing of position for existing items - [j-Time](https://forge.totaljs.es/en/components/time.md): This component renders a current time. - [j-TimePicker](https://forge.totaljs.es/en/components/timepicker.md): The component must be called manually or works with j-Input component automatically. This component is a singleton. - [j-Title](https://forge.totaljs.es/en/components/title.md): j-Title: easy usage; singleton - [j-ToggleBox](https://forge.totaljs.es/en/components/togglebox.md): ToggleBox can re-order or hide items in Array. The component expects Array. - [j-ToggleButton](https://forge.totaljs.es/en/components/togglebutton.md): Icons can be in the form: circle or ti ti-circle. - [j-ToggleMore](https://forge.totaljs.es/en/components/togglemore.md): Is a simple component to toggle content. - [j-Tooltip](https://forge.totaljs.es/en/components/tooltip.md): j-Tooltip: singleton; universal usage - [j-TouchMove](https://forge.totaljs.es/en/components/touchmove.md): Simple touchmove component for easy touch navigation next/prev/up/down. - [j-Tour](https://forge.totaljs.es/en/components/tour.md): IMPORTANT: Put this component on the bottom of the body element - [j-Tree](https://forge.totaljs.es/en/components/tree.md): Setter automatically extends each object by adding .$pointer property with a tree index. - [j-TreeView](https://forge.totaljs.es/en/components/treeview.md): This component is only a beta preview. It's still under construction. - [j-Typed](https://forge.totaljs.es/en/components/typed.md): Config is the same as [typed.js](https://github.com/mattboldt/typed.js#customization). The only difference is that all keys are lowercase. This is to maintain consistency with other components. The on - [j-UIBuilder](https://forge.totaljs.es/en/components/uibuilder.md): This component renders the application designed via UI Builder. You can load the app via the path specified in the component or via the config.url option. The path can contain a URL address to the JSO - [j-Unsaved](https://forge.totaljs.es/en/components/unsaved.md): j-Unsaved: easy usage - [j-Upload](https://forge.totaljs.es/en/components/upload.md): The component can perform uploading of files. - [j-Validate](https://forge.totaljs.es/en/components/validate.md): The component contains the same source-code as the j-Validation component. - [j-Validation](https://forge.totaljs.es/en/components/validation.md): The component contains the same source-code as the j-Validate component. - [j-View](https://forge.totaljs.es/en/components/view.md): This component can be helpful for reusable views in intranet apps. The component wraps the view into the isolated scope, and the value according to the component path will be used as a model for the v - [j-ViewBox](https://forge.totaljs.es/en/components/viewbox.md): j-ViewBox: keeps a fixed percentage height; great usage for intranet applications - [j-VirtualWire](https://forge.totaljs.es/en/components/virtualwire.md): This is a very special UI component that can move elements from element to another element according to the selector and the value of the path. Look to the example for understanding. - [j-Watch](https://forge.totaljs.es/en/components/watch.md): The component can evaluate the method in the form function(value, element, type, path) when the value (according to the path) is changed. The component can simplify watching changes in the model. - [j-Watcher](https://forge.totaljs.es/en/components/watcher.md): This component executes the code defined in the tag. - [j-Wiki](https://forge.totaljs.es/en/components/wiki.md): Great component for inline Wiki/Documentation. - [j-Window](https://forge.totaljs.es/en/components/window.md): A new version of this component supports dynamic evaluation of the content of