Installation
Welcome to Igniter.js! This guide provides everything you need to get started, whether you're building a new application from the ground up or integrating Igniter.js into an existing project. Our goal is to get you running in minutes.
1. Start with a Template
The fastest and most effective way to start a new project is with one of our official templates. These are production-ready boilerplates, meticulously configured with best practices, end-to-end type safety, and all the essential tooling. They embody our development philosophy, saving you valuable setup time.
Official Project Starters
Next.js Full-Stack App
A full-featured application built using the latest Next.js conventions with end-to-end type safety powered by Igniter.js.
Bun + React Full-Stack App
A full-stack, type-safe application with Bun and React featuring server-side rendering and unified runtime.
TanStack Start App
A modern full-stack application built with TanStack Start featuring type-safe routing and server functions.
Express REST API
A robust REST API built with Express.js and Igniter.js featuring structured logging and background jobs.
Bun REST API
A high-performance REST API built with Bun runtime and Igniter.js for maximum speed and efficiency.
Deno REST API
A secure and modern REST API built with Deno runtime and Igniter.js featuring built-in TypeScript support.
2. Use the igniter init
CLI
If our templates don't perfectly match your requirements, the igniter init
command is your best alternative. This interactive CLI scaffolds a clean, structured project, giving you the freedom to choose your own integrations while still benefiting from our proven project setup.
npx @igniter-js/cli init my-new-app
For a detailed walkthrough of the CLI, please see our Quick Start Guide.
3. Manual Installation for Existing Projects
For those who wish to integrate Igniter.js into an existing codebase, a manual setup is the way to go. This approach allows you to adopt our framework incrementally, without needing to refactor your entire project.
Simply install the core package using your preferred package manager:
npm install @igniter-js/core
This single package gives you access to the core builder, router, and all the foundational tools needed to bring type-safe APIs to your application.
4. Optional: Add Adapters and Dependencies
Igniter.js features a powerful, adapter-based architecture. This means advanced functionalities like caching, background jobs, and observability are handled by separate, dedicated packages. This keeps the framework's core lightweight and ensures you only install what you truly need.
Store Adapter (Caching & Pub/Sub)
For a high-performance Redis-based store, install the adapter and its peer dependencies. For a seamless TypeScript experience, we also recommend installing the type definitions.
npm install @igniter-js/adapter-redis ioredis
npm install @types/ioredis --save-dev
Queues Adapter (Background Jobs)
To enable robust background job processing powered by BullMQ, install the official adapter and its dependency.
npm install @igniter-js/adapter-bullmq bullmq
Telemetry Adapter (OpenTelemetry)
For comprehensive observability, install our OpenTelemetry adapter and its required peer dependencies.
npm install @igniter-js/adapter-opentelemetry @opentelemetry/api @opentelemetry/sdk-node
MCP Server Adapter (AI Code Agents)
To transform your API into a set of executable tools for AI code agents, install our Model-Context Protocol (MCP) Server adapter.
npm install @igniter-js/adapter-mcp-server @vercel/mcp-adapter @modelcontextprotocol/sdk
Validation with Zod
While optional, we highly recommend using zod
for validating request bodies, queries, and parameters. It is deeply integrated into the Igniter.js type system.
npm install zod
Next Steps
With Igniter.js installed, you're all set to start building. Here are some great next steps:
- Build your first API endpoint in under 5 minutes.
- Learn our recommended approach to organizing your project.
- Dive deep into the fundamental building blocks of the framework.