# Why choose Total.js for a Node.js application

> 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.

Framework: total5
Product: Total.js 5 (total5@0.0.19)
Language: en
Content-SHA256: 808147362df4aec1a9d9eec0e5cf9621bb4e70391d2e138ea6680ddd5d9f8c41
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: total5-installed@total5@0.0.19
Review: not-recorded

Total.js 5 is a complete Node.js application framework, distributed as `total5`. One package gives a team HTTP routes, input validation, server-rendered views, authentication, uploads, WebSocket routes, scheduled jobs, localization, email and more, all designed to work together. You build the application instead of choosing, wiring and maintaining a dozen separate libraries.

## What your project gets

| What your project needs | What Total.js gives you | See it in Forge |
|---|---|---|
| An internal business application with forms, protected routes and file uploads | Native input schemas, authentication hooks and upload handling, ready to use | [Validation](/en/total5/validate-json-body/), [authentication](/en/total5/protect-routes-with-auth/), [uploads](/en/total5/file-upload/) |
| A dashboard with live updates and periodic reports | WebSocket routes, scheduled jobs and email in the same framework | [WebSocket example](/en/total5/websocket-chat/), [cron jobs](/en/total5/cron-jobs/), [email](/en/total5/send-email/) |
| A small team that wants to ship and maintain one server application | Auto-loaded files and a shared set of conventions that keep every project familiar | [Project structure](/en/docs/project-structure/), [conventions](/en/docs/totaljs-agent-conventions/) |
| A server-rendered application | Views, layouts and localization inside the same framework | [Views and layouts](/en/total5/views-and-layouts/), [localization](/en/total5/localization/) |

Every row links to an example that Forge executes. On the frontend, Total.js has jComponent and a [catalogue of hundreds of ready components](/en/components/), so the same ecosystem covers the interface too; using them is optional.

## Why teams choose Total.js

A core without external dependencies. The installed `total5` package declares no third-party runtime dependencies. There is no chain of modules written by different authors to keep compatible, no abandoned package that stops your build, no surprise from a transitive update. Continuity like this has a direct and powerful effect on how well a project scales and how easily it is maintained over the years: what you learn and ship today keeps working, backed by one project.

Built-in security APIs. The framework includes authentication, signed sessions, CSRF checks, scrypt password hashing and action input validation. Apply these facilities to your application routes and data. The [Taskboard reference application](/en/docs/taskboard-reference/) combines them in one application.

A fast learning curve. Total.js is JavaScript, with conventions that are quick to pick up, so a team that does not know it yet is not at a disadvantage. The Total.js repositories hold a large collection of scripts, examples and complete applications under the MIT licence that you can read, reuse and learn from, and Forge adds executed recipes for the rest.

Fast and light. Total.js is fast, and one package with no dependency tree keeps it light: fewer things to load, update and audit, which counts most on small servers and small devices. Forge measures it under controlled conditions and publishes latency, CPU and memory for every workload, with the raw data, in the [benchmarks](/en/benchmarks/).

## Start simple: a direct HTTP route

This executable example validates a body with a compact native schema and answers directly from a controller: a few lines and no extra layers. As the application grows, domain actions add a reusable, validated contract that you can call from routes, code and tools.

```js controllers/contacts.js
var schema = NEWSCHEMA('ContactsInput', '*name:String');

exports.install = function() {
	ROUTE('GET /health/', health);
	ROUTE('POST /contacts/', create);
};

function health($) {
	$.json({ ok: true });
}

function create($) {
	var result = schema.transform($.body);
	if (result.error) {
		$.response.status = 400;
		$.json({ error: 'invalid' });
		return;
	}
	$.response.status = 201;
	$.json({ name: result.response.name });
}
```

## Sources

Forge pairs its claims with things you can run. The [Total.js guidelines](https://github.com/totaljs-es/guidelines) describe the ecosystem's coding style, [Total.js AI Context](https://github.com/totaljs/aicontext) supplies implementation guidance and the [source manifest](/ai-sources.json) records the reviewed revisions. If a guide and the installed framework ever differ, the installed source is the reference.
