whatisgithub

What is avvio?

fastify/avvio — explained in plain English

Analysis updated 2026-07-15 · repo last pushed 2026-07-14

467JavaScriptAudience · developerComplexity · 3/5ActiveLicenseSetup · easy

In one sentence

Avvio is a Node.js library that manages the startup and shutdown sequence of plugins so your app boots in the right order. It was built for the Fastify web framework but works in any Node.js project.

Mindmap

mindmap
  root((repo))
    What it does
      Orders plugin startup
      Handles errors centrally
      Manages shutdown cleanup
    Key features
      Callbacks and async await
      Startup timeout support
      Override for isolated instances
    Use cases
      Web server boot sequence
      Database and service setup
      Route loading before traffic
    Audience
      Node.js developers
      Fastify framework users
    Tech stack
      JavaScript
      Node.js
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Boot a web server that connects to a database, loads services, and registers routes before accepting traffic.

USE CASE 2

Manage ordered startup of plugins in any Node.js application so dependencies are ready before the app runs.

USE CASE 3

Register cleanup tasks that run in sequence when your application is shutting down gracefully.

USE CASE 4

Build a Fastify-style plugin system where each plugin can load its own sub-plugins with correct dependency ordering.

What is it built with?

JavaScriptNode.js

How does it compare?

fastify/avviofastify/fastify-helmetsveltejs/rollup-plugin-svelte
Stars467463516
LanguageJavaScriptJavaScriptJavaScript
Last pushed2026-07-142026-07-082026-05-20
MaintenanceActiveActiveMaintained
Setup difficultyeasyeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Install via npm and write a small bootstrap script, no external infrastructure or API keys are required.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

Avvio is a JavaScript tool that helps Node.js applications start up in the right order. When a complex app launches, it often needs to initialize databases, load configuration files, and set up various plugins. If these pieces aren't ready in the correct sequence, the app can crash or behave unpredictably. This project manages that startup sequence for you, handling error management and load order so everything boots smoothly. At a high level, you tell the tool which components or plugins your app needs by adding them one by one. Each plugin can even load its own sub-plugins, and the tool builds a logical map of all these dependencies. It waits to launch your application until every plugin has finished its setup task. If something goes wrong during this process, it pauses and sends the error to a central handler so you can decide how to respond. It also provides a way to manage the shutdown process, letting you register cleanup tasks that run when the app is closing. This tool is primarily designed for developers building Node.js applications who need a reliable way to manage a complex startup sequence. For example, if you are building a web server that needs to connect to a database, load external services, and register user routes before accepting traffic, this tool ensures those steps happen in the correct order. It was originally built for the Fastify web framework, but it can be used to bring structure to the startup of any Node.js project. A notable feature is its flexibility in how you write your setup code. Developers can choose to write traditional callback-style functions, or they can use modern JavaScript features like async/await and Promises. The tool also lets you configure a timeout, so if a plugin gets stuck during startup, the app will eventually throw a specific error rather than hanging forever. Additionally, an override feature allows developers to create isolated instances of their app for different plugins, which can be useful for advanced inheritance structures.

Copy-paste prompts

Prompt 1
I have a Node.js app that needs to connect to a database, load config files, and register routes before listening for traffic. Write a startup sequence using avvio that orders these steps correctly and starts the server only after all plugins are ready.
Prompt 2
Show me how to use avvio to register three plugins where one depends on another finishing first, using async/await for each plugin's setup function.
Prompt 3
Write an avvio-based bootstrap script that registers a database plugin, a logger plugin, and a routes plugin, with a central error handler that catches any startup failure and a 10-second timeout.
Prompt 4
Demonstrate using avvio's override feature to create an isolated context for a plugin so it gets its own app instance instead of sharing the global one.
Prompt 5
Add shutdown cleanup to my avvio app so that when the process receives SIGTERM, registered cleanup tasks run in order before the app exits.

Frequently asked questions

What is avvio?

Avvio is a Node.js library that manages the startup and shutdown sequence of plugins so your app boots in the right order. It was built for the Fastify web framework but works in any Node.js project.

What language is avvio written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js.

Is avvio actively maintained?

Active — commit in last 30 days (last push 2026-07-14).

What license does avvio use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is avvio to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is avvio for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.