Tensorflow.js has four layers: The WebGL API for GPU-supported numerical operations, the web browser for user interactions, and two APIs: Core and Layers. The low-level Core API corresponds to the former deeplearn.js library. It provides hardware-accelerated linear algebra operations and an eager API for automatic differentiation. The higher-level Layers API is used to build machine-learning models on top of Core. The Layers API is modeled after Keras and implements similar functionality. It also allows to import models previously trained in python with Keras or TensorFlow SavedModels and use it for inference or transfer learning in the browser.
With Tensorflow.js, machine-learning models can be utilized in the browser in three ways: by importing already pre-trained models and using them for inference only, by training models from scratch directly in the browser, or by using transfer learning to first adapt imported models to the user's context and then use these improved models for inference.
As Nikhil Thorat and Daniel Smilkov, members of the Tensorflow team, point out in their announcement video, running Tensorflow in the browser has several advantages: the infrastructure and set of requirements are simplified as the need for background API requests is removed; the available data is richer in nature thanks to newly accessible sensors, such as webcam and microphone on computers or GPS and gyroscope on mobile devices; and the data also remains on the client side which addresses privacy concerns.
The Tensorflow team is currently working on making TensorFlow.js support Node.js, but no timeframe has been given yet. Several other significant Tensorflow developments were announced during the TensorFlow Dev Summit including TensorFlow for Swift, due for release in April 2018 and TensorFlow Hub which "provides a repository for sharing different pre-built modules developers can reuse across multiple models".