# Igniter.js - Complete Documentation The first AI-native TypeScript framework — architected for human-AI collaboration. Feature-sliced modules, deep TypeScript inference, and built-in training for 15+ Code Agents (Cursor, Claude Code, Copilot) create a low-entropy environment where both developers and AI work seamlessly. MCP-native APIs, AI agent orchestration, type-safe RPC, background jobs, multi-platform bots, and framework-agnostic runtime support — built for the next era of development. --- # Blog Articles, tutorials, and announcements from the Igniter.js team --- # Announcing Igniter.js MCP Server: Native AI Integration for Modern Development > Transform your AI coding tools into framework experts with Igniter.js's MCP Server integration. Get instant project understanding, intelligent code generation, and specialized AI assistance built directly into Cursor, Claude Code, and more. URL: https://igniterjs.com/blog/announcing-igniter-mcp-server As AI-native development tools reshape how we build software, understanding project context and maintaining architectural consistency has become the new bottleneck. With **Igniter.js MCP Server**, your AI coding assistants can now deeply understand your project structure, execute development commands, and provide intelligent assistance that goes far beyond basic code completion. ## The Evolution of AI-Assisted Development The rise of AI-native IDEs like Cursor, Windsurf, and Claude Code has enabled developers to write code at unprecedented speeds. But with this velocity comes a new challenge: **AI tools need context to be truly effective**. Without proper context, even the most advanced AI assistants struggle to: * Understand your project's architectural patterns * Follow your specific coding conventions * Execute project-specific commands correctly * Maintain consistency across feature implementations This is where the **Model Context Protocol (MCP)** becomes transformative. ## What is MCP and Why Does It Matter? The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is an open standard that enables Large Language Models to interact with external systems in a structured, type-safe manner. Think of it as a universal API that AI tools can use to: * Access your project's file structure and codebase * Execute development tasks and build commands * Query project-specific information * Leverage specialized tools designed for your framework For Igniter.js, this means your AI assistant becomes a framework expert that understands not just TypeScript, but the specific patterns, conventions, and architecture of your Igniter.js application. ## Getting Started: Install in Under 2 Minutes Every Igniter.js starter template (v1.0.0+) comes with MCP Server support out of the box. Integration is as simple as adding a configuration file to your AI tool. The Igniter.js MCP Server works with **any** AI coding tool that supports the Model Context Protocol, including Cursor, Windsurf, Claude Code, Claude Desktop, and VS Code Copilot. ### Quick Installation Create or edit `~/.cursor/mcp.json`: ```json { "mcpServers": { "Igniter": { "command": "npx", "args": ["@igniter-js/mcp-server"] } } } ``` Restart Cursor to activate the MCP Server. ```bash # Add the Igniter.js MCP Server claude mcp add igniter npx @igniter-js/mcp-server # Verify installation claude mcp list ``` Create `.vscode/mcp.json` in your project root: ```json { "servers": { "Igniter": { "command": "npx", "args": ["@igniter-js/mcp-server"] } } } ``` Create or edit `~/.codeium/windsurf/mcp_config.json`: ```json { "mcpServers": { "Igniter": { "command": "npx", "args": ["@igniter-js/mcp-server"] } } } ``` ## What Can the MCP Server Do? The Igniter.js MCP Server exposes a comprehensive set of tools that transform your AI assistant into a specialized Igniter.js developer: ### Development Workflow Tools ### Start Development Servers Launch your application with live reloading and automatic client generation. ```typescript // AI can execute: start the dev server // Runs: igniter dev --watch ``` ### Build for Production Compile and optimize your application for deployment. ```typescript // AI can execute: build the project // Runs: igniter build ``` ### Run Test Suites Execute comprehensive tests with filtering and watch options. ```typescript // AI can execute: run tests for the auth feature // Runs: npm test -- --filter auth ``` ### Code Analysis and Generation * **Analyze Code Structure**: Identify architectural patterns and potential issues * **Generate Type-Safe Clients**: Auto-generate fully typed API clients from your router * **Create OpenAPI Documentation**: Generate interactive API documentation with Scalar UI * **Scaffold Features**: Create complete feature modules from your Prisma schema ### AI-Powered Task Management The MCP Server integrates with specialized AI agents (Claude, Gemini, GPT, Perplexity) to handle complex development tasks: ```typescript // Ask your AI: "Create a new authentication feature with JWT tokens" // The AI delegates to specialized agents who: // 1. Analyze your current architecture // 2. Generate the auth controller and procedures // 3. Create database migrations // 4. Write comprehensive tests // 5. Update documentation ``` ## Meet Lia: Your AI Framework Specialist When you use an Igniter.js starter template, you're not just getting a codebase—you're getting **Lia**, a specialized AI agent trained specifically for Igniter.js development. ### How Lia Transforms Your AI Assistant **Before MCP Integration:** Your AI: "I see you have a Next.js project. Let me try to understand the structure..." **After MCP Integration:** Lia-Enhanced AI: "I can see this is an Igniter.js project with feature-based architecture. Your auth module is in `src/features/auth/`. I'll use the `generateController` tool to add the new endpoint following your established patterns." ### Lia's Capabilities **Contextual Understanding**: Every action starts with comprehensive analysis of your project structure, conventions, and existing patterns. **Tool Prioritization**: Instead of generic approaches, Lia automatically uses specialized Igniter.js tools for maximum accuracy and efficiency. **Pattern Replication**: Learns from your existing code to maintain consistency across your entire application. **Persistent Memory**: Stores architectural decisions and patterns, making future development faster and more consistent. ## Real-World Development Workflow Here's a typical conversation with a Lia-enhanced AI assistant: ### You Ask for a Feature **You:** "Add user profile management to the auth feature" ### Lia Analyzes Context **AI:** "I'll analyze the current auth feature structure..." *Automatically runs analysis on the auth directory* ### Intelligent Implementation **AI:** "I can see you have a `user` controller with basic CRUD. I'll scaffold a `profile` controller following your patterns with Zod validation and the `ensure` plugin." *Uses `generateController` tool* ### Testing and Validation **AI:** "Now I'll test the implementation to ensure it integrates correctly..." *Runs validation using MCP Server tools* ### Knowledge Persistence **AI:** "Implementation complete! I've stored these patterns for future reference." ## Why This Matters for Your Workflow ### Before Igniter.js MCP Server ❌ AI guesses at project structure\ ❌ Manual context switching between tools\ ❌ Inconsistent code patterns\ ❌ Repeated explanations of architecture\ ❌ Generic solutions that don't fit your app ### After Igniter.js MCP Server ✅ AI deeply understands your project\ ✅ Seamless tool integration\ ✅ Consistent, pattern-aware code\ ✅ Persistent architectural knowledge\ ✅ Framework-specific, optimized solutions ## Advanced: Custom Rules for Maximum Productivity Every Igniter.js starter includes custom rules that transform your AI assistant's behavior. These rules create a specialized development environment where: * **File operations start with analysis** to understand context before making changes * **Specialized tools are prioritized** over generic approaches * **Architectural patterns are maintained** automatically across features * **Development workflows are optimized** for Igniter.js best practices The more you work with Lia-enhanced AI, the smarter it becomes. Every decision, pattern, and insight is stored, creating a continuously improving development assistant that understands your specific project better than any generic AI could. ## Start Building with AI-Native Development Ready to experience the future of collaborative coding? Choose from our collection of official starter templates, each pre-configured with MCP Server support: ### Choose Your Stack Select from Next.js, TanStack Start, Bun, Express, or Deno starters ### Install MCP Server Add the configuration to your preferred AI tool (see tabs above) ### Start Conversing Begin with simple questions like: * "What's the current health status of my project?" * "Show me all API endpoints" * "Analyze the auth feature for potential issues" ## Integration Examples ### Creating a Complete Feature ```typescript // You: "Create a posts feature with CRUD operations and real-time updates" // Lia-enhanced AI automatically: // 1. Analyzes your Prisma schema // 2. Generates controller with type-safe actions // 3. Creates validation schemas with Zod // 4. Implements real-time SSE streaming // 5. Generates API client with React hooks // 6. Writes comprehensive tests // 7. Updates documentation ``` ### Debugging with Context ```typescript // You: "Why is the user creation endpoint failing?" // Lia-enhanced AI: // 1. Analyzes the user controller // 2. Checks validation schemas // 3. Reviews database schema // 4. Examines recent error logs // 5. Identifies the issue: missing required field // 6. Proposes and implements the fix // 7. Runs tests to verify the solution ``` ## Community and Next Steps We're building the future of AI-native development, and we'd love to hear your experience! * **Share Your Projects**: What are you building with Igniter.js and AI? Let us know on [Twitter](https://twitter.com/igniterjs) * **Join the Discussion**: Connect with other developers in our [Discord community](https://discord.gg/igniterjs) * **Contribute**: Help improve the MCP Server on [GitHub](https://github.com/felipebarcelospro/igniter-js) ## Resources * [MCP Server Documentation](/docs/mcp-server) * [Custom Rules Guide](/docs/ai-integration/custom-rules) * [Starter Templates](/templates) * [GitHub Repository](https://github.com/felipebarcelospro/igniter-js) *** The world's most AI-native framework is ready for you. Start building smarter, faster, and with unprecedented collaboration between you and your AI coding assistant. --- # Introducing Igniter.js v1: A Type-Safe TypeScript Framework, Built by AI Agents for AI Agents > After 1.5 years of development, 4,000+ tests, and 13 production-ready packages — Igniter.js v1 is here. A fully type-safe TypeScript framework designed so AI coding agents produce consistent, scalable, and secure code from day one. URL: https://igniterjs.com/blog/igniterjs-v1-launch ## Two Years Ago, I Saw the Problem Coming It was late 2024. My developer community — 11,000+ subscribers of Vibe Dev — was hitting the same wall over and over. AI coding tools like Cursor and Copilot were getting shockingly good at generating code. But every agent built differently. One used Next.js with tRPC. Another spun up Express with handwritten routes. A third produced a NestJS monolith with half the types missing. The result? Projects that worked on day one fell apart by week three. No consistency. No guardrails. No shared DNA between what one agent built and another maintained. I asked myself: *what if, instead of forcing AI agents to learn yet another framework, I built a framework designed for them from the ground up?* Igniter.js was born as a human-AI collaboration experiment. For 1.5 years, I worked alongside AI agents — the same ones my community was struggling with — to build a production-grade TypeScript framework. Every line of code, every architectural decision, every adapter was shaped by both human judgment and agent feedback. The framework was built *by* agents, *for* agents. Today, I'm shipping v1. ## The Philosophy: Four Principles That Drive Every Decision Igniter.js isn't just another framework. It's a bet on where software development is heading — a world where humans and AI build together, and the code needs to work for both. **100% Type Safety, Zero Compromises.** When an AI agent generates code, types aren't a nice-to-have — they're the difference between a function that compiles and one that crashes at runtime. Every Igniter.js package exports fully typed APIs. No `any`. No escape hatches. No "trust me, it works." **AGENTS.md in Every Package.** Documentation isn't an afterthought here. Every package ships an `AGENTS.md` file that AI coding tools can read directly from `node_modules`. An agent doesn't need to guess the API — it reads the file and knows exactly how to use `IgniterStore`, `IgniterJobs`, or `IgniterAgent` immediately. This is documentation as a first-class API for AI. **Adapter Architecture — No Vendor Lock-In.** Swap Redis for SQLite. Exchange Express for Bun. Trade Discord for Telegram. Every integration point uses an adapter pattern so you're never trapped by yesterday's decisions. **Built for Real-World Testing.** The framework ships with an MCP Server that AI agents can use to test endpoints, debug issues, and validate behavior directly inside the IDE — before marking any task complete. ## The Ecosystem: 13 Packages, One Coherent Vision Each library solves a specific pain point in AI-assisted development. Here's the tour. ### @igniter-js/core — The Declarative Builder Every AI agent builds API routes differently. Core gives you a single, type-safe builder that wires context, telemetry, store, plugins, and configuration into one coherent application shell. ```ts import { Igniter } from "@igniter-js/core"; const app = Igniter.create() .withContext<{ db: Database }>() .withConfig({ basePATH: "/api/v1" }) .withStore(storeManager) .withTelemetry(telemetryManager) .addPlugin("auth", authPlugin) .build(); ``` Controllers, queries, and mutations are defined via dedicated factories — `createIgniterController`, `createIgniterQuery`, `createIgniterMutation` — so every route is fully typed from input to response. ### @igniter-js/store — Unified State, Any Backend AI agents struggle with state management across requests. Store provides a unified Pub/Sub and caching API regardless of storage backend, with type-safe event schemas enforced at compile time. ```ts import { IgniterStore, IgniterStoreRedisAdapter, IgniterStoreEvents } from "@igniter-js/store"; import { z } from "zod"; const UserEvents = IgniterStoreEvents.create("user") .event("created", z.object({ userId: z.string(), email: z.string().email() })) .event("deleted", z.object({ userId: z.string() })) .build(); const store = IgniterStore.create() .withAdapter(IgniterStoreRedisAdapter.create({ redis })) .withService("my-api") .addEvents(UserEvents) .build(); await store.events.publish("user.created", { userId: "abc", email: "dev@igniter.dev" }); ``` ### @igniter-js/jobs — Async Processing That Doesn't Break Silently Async processing is where AI-generated code often fails silently. Jobs gives you declarative, typed queue definitions with built-in telemetry, retry logic, and multi-tenant scope isolation. ```ts import { IgniterJobs } from "@igniter-js/jobs"; import { IgniterJobsBullMQAdapter } from "@igniter-js/jobs/adapters"; const jobs = IgniterJobs.create() .withAdapter(IgniterJobsBullMQAdapter.create({ connection })) .withContext<{ db: Database }>(async () => ({ db: await getDb() })) .job("sendWelcomeEmail", { input: z.object({ userId: z.string() }), handler: async ({ input, context }) => { const user = await context.db.user.findUnique({ where: { id: input.userId } }); await mailer.send({ to: user.email, template: "welcome" }); }, }) .build(); await jobs.sendWelcomeEmail.dispatch({ userId: "abc" }); ``` ### @igniter-js/agents — Strongly-Typed AI Agent Framework Building AI agents requires messy tool definitions. Agents gives you typed tool registration with auto-generated schemas, multi-agent orchestration, MCP integration, and persistent memory — all validated at compile time. ```ts import { IgniterAgent, IgniterAgentTool, IgniterAgentToolset } from "@igniter-js/agents"; import { openai } from "@ai-sdk/openai"; import { z } from "zod"; const searchDocs = IgniterAgentTool.create("searchDocs") .withDescription("Search the project documentation") .withInput(z.object({ query: z.string() })) .withExecute(async ({ query }) => { return await docsIndex.search(query); }) .build(); const toolset = IgniterAgentToolset.create("utils") .addTool(searchDocs) .build(); const agent = IgniterAgent.create("assistant") .withModel(openai("gpt-4")) .addToolset(toolset) .build(); const result = await agent.generate({ chatId: "chat_123", userId: "user_123", context: {} }); ``` ### @igniter-js/bot — One Command, Multiple Platforms Building a bot for one platform is easy. For three? It's a nightmare. Bots unifies the API across Telegram, WhatsApp, and Discord with a single builder. ```ts import { IgniterBot, telegram, discord, memoryStore } from "@igniter-js/bot"; const bot = IgniterBot.create() .withHandle("@demo_bot") .withSessionStore(memoryStore()) .addAdapters({ telegram: telegram({ token: process.env.TELEGRAM_TOKEN! }), discord: discord({ token: process.env.DISCORD_TOKEN!, applicationId: process.env.DISCORD_APP_ID! }), }) .addCommand("start", { name: "start", description: "Greets the user", handle: async (ctx) => { await ctx.reply("👋 Welcome to Igniter.js!"); }, }) .build(); await bot.start(); ``` ### @igniter-js/caller — Type-Safe HTTP Client, Schema-Driven Frontend agents often craft malformed API calls. Caller generates fully-typed clients with built-in caching, retry logic, interceptors, and telemetry — all from schema definitions. ```ts import { IgniterCaller } from "@igniter-js/caller"; const client = IgniterCaller.create() .withBaseUrl("/api") .withHeaders({ "Content-Type": "application/json" }) .build(); const user = await client.get("/users/abc").send(); // Fully typed response ``` ### @igniter-js/cli — One Command to Start ```bash npx create-igniter-app@latest my-app ``` The CLI scaffolds your project with starters for Next.js, Express, Bun, and TanStack Start — plus add-ons for auth, database, bots, jobs, store, telemetry, and more. ### @igniter-js/collections — Declarative Data Access with a Prisma-like API AI agents write inconsistent data access patterns. Collections gives you a schema-first, typed query layer that treats files (Markdown, JSON) and key-value stores as structured databases. ```ts import { IgniterCollections, IgniterCollectionModel } from "@igniter-js/collections"; import { NodeFsAdapter } from "@igniter-js/collections/adapters"; import { z } from "zod"; const Posts = IgniterCollectionModel.create("posts") .withBasePath("content/posts") .withSchema(z.object({ title: z.string(), published: z.boolean(), tags: z.array(z.string()) })) .build(); const docs = IgniterCollections.create() .withAdapter(new NodeFsAdapter()) .addCollection(Posts) .build(); const published = await docs.posts.findMany({ where: { published: true } }); ``` ### @igniter-js/connectors — OAuth, Webhooks, and Third-Party Integrations Every SaaS app needs external integrations. Connectors handles OAuth flows, webhook verification, and credential encryption with multi-tenant scope isolation — so agents don't have to reinvent the wheel. ```ts import { IgniterConnector, IgniterConnectorManager } from "@igniter-js/connectors"; const slack = IgniterConnector.create() .withConfig(z.object({ webhookUrl: z.string().url() })) .addAction("notify", { input: z.object({ message: z.string() }), handler: async ({ input, config }) => { await fetch(config.webhookUrl, { method: "POST", body: JSON.stringify({ text: input.message }) }); }, }) .build(); const manager = IgniterConnectorManager.create() .withDatabase(adapter) .addScope("organization", { required: true }) .addConnector("slack", slack) .build(); const scoped = manager.scope("organization", "org_123"); await scoped.connect("slack", { webhookUrl: "https://hooks.slack.com/..." }); await scoped.action("slack", "notify").call({ message: "Deploy complete!" }); ``` ### @igniter-js/logger — Structured Logging, Enforced AI agents produce terrible debug logs. Logger wraps Pino with a builder API, typed log levels, and built-in transports (console, file, HTTP) — making logs structured, searchable, and consistent across every Igniter.js package. ```ts import { IgniterLogger, IgniterLogLevel } from "@igniter-js/logger"; const logger = IgniterLogger.create() .withLevel(IgniterLogLevel.INFO) .withAppName("my-api") .withComponent("auth") .build(); logger.info("User signed up", { userId: "abc", plan: "pro" }); ``` ### @igniter-js/mail — Typed Email Templates with React Email Email is deceptively complex. Mail gives you a clean, typed API with React-based templates, provider abstraction (Resend, Postmark, SendGrid, SMTP), optional queue delivery, and full telemetry on every send. ```ts import { IgniterMail } from "@igniter-js/mail"; const mail = IgniterMail.create() .withFrom("hello@igniter.dev") .withAdapter("resend", process.env.RESEND_API_KEY!) .addTemplate("welcome", welcomeTemplate) .build(); await mail.send({ to: "dev@igniter.dev", template: "welcome", data: { name: "Felipe" } }); ``` ### @igniter-js/telemetry — Auto-Instrumented Observability AI agents rarely add proper observability. Telemetry gives you a typed event registry, session-based context propagation via AsyncLocalStorage, privacy-safe redaction, and 10 transport adapters (Logger, HTTP, OTLP, Sentry, Slack, Discord, Telegram, and more). ```ts import { IgniterTelemetry, IgniterTelemetryEvents, LoggerTransportAdapter } from "@igniter-js/telemetry"; import { z } from "zod"; const JobsEvents = IgniterTelemetryEvents.namespace("igniter.jobs") .event("job.completed", z.object({ "ctx.job.id": z.string(), "ctx.job.duration": z.number() })) .build(); const telemetry = IgniterTelemetry.create() .withService("my-api") .withEnvironment(process.env.NODE_ENV!) .addEvents(JobsEvents) .addTransport(LoggerTransportAdapter.create({ logger: console })) .withRedaction({ denylistKeys: ["password", "secret"] }) .build(); telemetry.emit("igniter.jobs.job.completed", { attributes: { "ctx.job.id": "job_123", "ctx.job.duration": 142 }, }); ``` ### @igniter-js/mcp-server — AI Agents as First-Class Citizens Agents need to read docs, test endpoints, and validate code. The MCP Server gives them a direct line to do this inside the IDE, turning Cursor or Claude Code into a framework expert. It exposes tools for CLI automation, API testing, documentation fetching, GitHub management, and more — all over STDIO. ```bash npx @igniter-js/mcp-server ``` ## What Comes Next v1 is the foundation. Here's what's on the horizon: * **Templates.** Production-ready starters for every stack — Next.js, Express, Bun, Deno. * **Deeper AI Integration.** Tighter agent workflows, auto-generated AGENTS.md improvements, and MCP-powered testing loops. * **Studio v2.** Interactive API playground built on Scalar, already in development. Igniter.js is open source, MIT licensed, and built in Brazil for developers everywhere. It's the result of 1.5 years of betting that humans and AI can build better software together — not by treating agents as tools, but by treating them as teammates. [Star the project on GitHub](https://github.com/felipebarcelospro/igniter-js) · [Read the docs](https://igniter.dev) · [Join the community](https://discord.gg/igniter) *** **Ready to build?** ```bash npx create-igniter-app@latest my-app ``` --- # Introducing Igniter.js: The Type-Safe Framework for Modern Full-Stack Development > Discover how Igniter.js eliminates the friction of full-stack development with end-to-end type safety, real-time capabilities, and an exceptional developer experience. Built for the AI-assisted coding era. URL: https://igniterjs.com/blog/introducing-igniter-js The modern web development landscape presents a paradox: we have more powerful tools than ever, yet building full-stack applications remains unnecessarily complex. Type safety breaks at API boundaries, state synchronization requires intricate solutions, and backend infrastructure demands expertise in multiple systems. **Igniter.js** solves these fundamental challenges by treating your entire application as a unified, type-safe system. Created by [Felipe Barcelos](https://github.com/felipebarcelospro), this framework emerges from years of real-world experience building scalable applications and recognizing critical gaps in existing solutions. ## The Full-Stack Development Problem Modern applications typically involve juggling multiple technologies, each with its own paradigms: ### Type Safety Boundaries Even with TypeScript on both frontend and backend, the communication layer—APIs, database queries, client-server interactions—often lacks proper type safety. This leads to: ❌ Runtime errors from mismatched types\ ❌ Manual synchronization of types across codebases\ ❌ Integration bugs discovered only in production\ ❌ Time wasted debugging trivial type mismatches ### Complex State Management Keeping client state synchronized with server data requires: ❌ Intricate caching strategies\ ❌ Manual cache invalidation logic\ ❌ Real-time update implementations\ ❌ Optimistic update patterns\ ❌ Error state handling Each of these adds complexity and maintenance burden. ### Backend Infrastructure Maze Building robust backend services means integrating: ❌ Database ORMs\ ❌ Caching systems\ ❌ Background job queues\ ❌ Pub/sub messaging\ ❌ Real-time WebSocket servers\ ❌ Telemetry and monitoring Each system requires separate configuration and rarely shares type information. ### Fragmented Developer Experience Developers constantly switch between: ❌ Different mental models for frontend vs backend\ ❌ Multiple toolchains and build processes\ ❌ Separate debugging approaches\ ❌ Disconnected testing strategies This context-switching reduces productivity and increases cognitive load. ## Enter Igniter.js: A Unified Solution Igniter.js addresses these challenges through a **unified, type-safe approach** that treats your entire application as a cohesive system. Igniter.js is built on three principles: 1. **End-to-End Type Safety**: Every piece of data flowing through your application is type-safe, from database queries to UI components 2. **Developer Experience First**: Intuitive APIs, excellent tooling, and minimal boilerplate 3. **Unified Backend Architecture**: All backend services work together seamlessly with shared type safety ## Key Features ### 1. Type-Safe Controllers and Actions Define your API with complete type safety and automatic validation: ```typescript // features/users/controllers/users.controller.ts import { igniter } from '@/igniter' import { z } from 'zod' export const userController = igniter.controller({ path: '/users', actions: { // Type-safe query with automatic validation getUser: igniter.query({ path: '/:id', query: z.object({ id: z.string().uuid() }), handler: async ({ request, response, context }) => { const user = await context.db.user.findUnique({ where: { id: request.query.id } }) if (!user) { return response.notFound('User not found') } return response.success(user) } }), // Type-safe mutation with validation createUser: igniter.mutate({ path: '/', method: 'POST', body: z.object({ name: z.string().min(1), email: z.string().email() }), handler: async ({ request, response, context }) => { const user = await context.db.user.create({ data: request.body }) return response.success({ user }, { status: 201 }) } }) } }) ``` The beauty is on the client side—consuming this API is equally type-safe: ```tsx 'use client' import { api } from '@/igniter.client' function UserProfile({ userId }: { userId: string }) { // Fully typed with automatic caching and revalidation const userQuery = api.users.getUser.useQuery({ query: { id: userId } }) const createUserMutation = api.users.createUser.useMutation({ onSuccess: (data) => { console.log('User created:', data.user) } }) if (userQuery.isLoading) return
Loading...
if (userQuery.isError) return
Error: {userQuery.error.message}
return (

{userQuery.data?.name}

{userQuery.data?.email}

) } ``` Unlike some solutions, Igniter.js achieves this type safety through TypeScript's type inference—no build step required. Your IDE provides instant autocomplete and error checking. ### 2. Procedures: Reusable Type-Safe Middleware Create powerful, composable middleware that extends your application context: ```typescript // procedures/auth.procedure.ts export const auth = igniter.procedure({ handler: async (options: { required: boolean }, { response, context }) => { const user = await getCurrentUser(context.env.SECRET) // If auth is required but there's no user, stop the request if (options.required && !user) { return response.unauthorized('Authentication required') } // The returned object merges into context // Now context.auth.user is available in controllers! return { auth: { user } } } }) // Usage in controller export const userController = igniter.controller({ path: '/users', actions: { getCurrentUser: igniter.query({ path: '/me', use: [auth({ required: true })], // TypeScript knows context.auth.user exists! handler: async ({ context, response }) => { const user = context.auth.user // Fully typed! return response.success(user) } }) } }) ``` ### 3. Real-Time Updates by Default Igniter.js makes real-time synchronization trivial through automatic revalidation: ```typescript // Backend: Regular query and mutation export const postsController = igniter.controller({ path: '/posts', actions: { list: igniter.query({ path: '/', stream: true, // Enable real-time streaming handler: async ({ context, response }) => { const posts = await context.db.post.findMany() return response.success({ posts }) } }), create: igniter.mutate({ path: '/', body: z.object({ title: z.string(), content: z.string() }), handler: async ({ body, context, response }) => { const newPost = await context.db.post.create({ data: body }) // Automatically triggers revalidation for all clients! return response.created(newPost).revalidate(['posts.list']) } }) } }) ``` ```tsx // Frontend: Standard useQuery - automatically updates in real-time function PostsList() { const postsQuery = api.posts.list.useQuery() return ( ) } // When ANY user creates a post, ALL users see it instantly! // No WebSockets, no manual refetching, no additional complexity. ``` Igniter.js uses Server-Sent Events (SSE) under the hood, providing efficient server-to-client updates without the complexity of WebSocket infrastructure. ### 4. Background Jobs with Type Safety Handle async processing with a powerful, type-safe job system: ```typescript // Define jobs with type validation export const jobs = igniter.jobs.merge({ emails: igniter.jobs.router({ jobs: { sendWelcome: igniter.jobs.register({ name: 'sendWelcome', input: z.object({ userId: z.string(), email: z.string().email() }), handler: async ({ input }) => { await sendEmail({ to: input.email, template: 'welcome', data: { userId: input.userId } }) } }) } }) }) // Enqueue from anywhere export const userController = igniter.controller({ path: '/users', actions: { create: igniter.mutate({ path: '/', body: z.object({ name: z.string(), email: z.string().email() }), handler: async ({ body, context, response }) => { const user = await context.db.user.create({ data: body }) // Enqueue welcome email job with full type safety await igniter.jobs.emails.enqueue({ task: 'sendWelcome', input: { userId: user.id, email: user.email } }) return response.success({ user }) } }) } }) ``` ## Framework-Agnostic Architecture Igniter.js integrates seamlessly with any JavaScript runtime and framework. Write once, deploy anywhere: ```typescript // app/api/[...igniter]/route.ts import { igniter } from '@/igniter' export const { GET, POST, PUT, DELETE, PATCH } = igniter.nextjs() ``` ```typescript // server.ts import express from 'express' import { igniter } from './igniter' const app = express() app.use('/api', igniter.express()) app.listen(3000) ``` ```typescript // server.ts import { igniter } from './igniter' Bun.serve({ port: 3000, fetch: igniter.fetch }) ``` ```typescript // worker.ts import { igniter } from './igniter' export default { fetch: igniter.fetch } ``` Use Igniter.js with React, Vue, Svelte, Angular, React Native, or any frontend framework. The type-safe client adapts to your chosen stack. ## Performance and Scalability Built for production from day one: ### Performance Features ✅ **Zero Runtime Overhead**: Client code is fully tree-shakeable\ ✅ **Minimal Bundle Size**: Only ship what you use\ ✅ **Fast Cold Starts**: Optimized for serverless environments\ ✅ **Efficient Serialization**: Optimized data transfer\ ✅ **Edge-Ready**: Native support for edge runtimes ### Scalability Architecture ✅ **Horizontal Scaling**: Stateless design enables easy scaling\ ✅ **Edge Deployment**: Works on Cloudflare Workers, Vercel Edge\ ✅ **Background Processing**: Reliable job queues with Redis/BullMQ\ ✅ **Real-time Streaming**: Efficient SSE for live data\ ✅ **Intelligent Caching**: Built-in query caching with smart invalidation\ ✅ **Database Agnostic**: Works with Prisma, Drizzle, or any ORM ## Getting Started Create a new Igniter.js project in under 2 minutes: ### Initialize Project ```bash npx @igniter-js/cli init my-app ``` Choose your preferred setup: * Next.js + React * TanStack Start * Bun + React * Express.js API * Custom setup ### Install Dependencies ```bash cd my-app npm install ``` ```bash cd my-app pnpm install ``` ```bash cd my-app yarn install ``` ```bash cd my-app bun install ``` ### Start Development ```bash npm run dev ``` Your app is now running at `http://localhost:3000` with full type safety! ## Comparison with Existing Solutions ### vs. tRPC While tRPC provides excellent type safety for APIs, Igniter.js offers: ✅ Integrated job queues\ ✅ Real-time updates out of the box\ ✅ AI-powered development tools\ ✅ More comprehensive DX features ### vs. Next.js Next.js is a fantastic React framework, but doesn't provide: ✅ Backend abstractions\ ✅ Type safety across the full stack\ ✅ Built-in state management\ ✅ Real-time capabilities Igniter.js complements Next.js by providing the backend architecture. ### vs. Remix Remix offers great full-stack capabilities but lacks: ✅ Framework-agnostic design\ ✅ The same level of type safety\ ✅ AI integration\ ✅ Built-in job queues ### vs. T3 Stack The T3 Stack combines excellent tools but requires: ❌ Significant configuration\ ❌ Multiple separate integrations\ ❌ Manual setup for queues and real-time Igniter.js provides all features integrated out of the box. ## What's Next? Explore the ecosystem: * [Quick Start Guide](/docs/getting-started/quick-start) * [Starter Templates](/templates) * [Core Concepts](/docs/core-concepts) * [API Reference](/docs/api-reference) * [Real-Time Guide](/docs/advanced-features/real-time) ## Join the Community * [GitHub Repository](https://github.com/felipebarcelospro/igniter-js) * [Documentation](/docs) * [Discord Community](https://discord.gg/igniterjs) * [Twitter](https://twitter.com/igniterjs) ## Conclusion Igniter.js represents a new paradigm in full-stack development where type safety, developer experience, and modern capabilities are fundamental design principles, not afterthoughts. By eliminating traditional boundaries between frontend and backend, Igniter.js enables you to build more reliable, maintainable, and feature-rich applications with significantly less complexity. Whether you're building a simple CRUD app, a complex enterprise system, or an AI-powered platform, Igniter.js provides the tools you need to focus on delivering value to your users. Get started with Igniter.js today and experience the future of full-stack development. Choose a [starter template](/templates) and build your first feature in minutes. *** *Igniter.js is created and maintained by [Felipe Barcelos](https://github.com/felipebarcelospro) and the open-source community. Thank you to all contributors shaping the future of full-stack development.* --- # Introducing Igniter Studio: Your Interactive API Development Playground > Stop switching between tools. Igniter Studio brings interactive API testing, real-time monitoring, and AI-powered insights directly into your development workflow. Built on Scalar, designed for the future. URL: https://igniterjs.com/blog/introducing-igniter-studio Modern API development shouldn't require juggling multiple applications. Yet developers constantly switch between their code editor, terminal, and separate API testing tools like Postman or Insomnia. This context-switching destroys focus and slows development. **Igniter Studio** eliminates this friction by providing a beautiful, interactive API playground built directly into your Igniter.js application. But this is just the beginning—we're building toward a complete AI-powered command center for modern development. ## The Context-Switching Problem A typical development workflow looks like this: ### Write Code Make changes in your code editor ### Start Server Switch to terminal, run development server ### Test API Switch to Postman/Insomnia, manually configure request ### Check Logs Switch back to terminal to view logs ### Debug Issue Switch back to code editor Each context switch breaks your flow and consumes mental energy. **What if all of this happened in one place?** ## Introducing Igniter Studio Igniter Studio is an interactive API playground that lives alongside your application, automatically consuming your OpenAPI specification to provide a rich, type-aware testing interface. Built on [Scalar API Reference](https://github.com/scalar/scalar), it offers a modern, beautiful UI that makes API exploration intuitive and enjoyable. ### Get Started in Seconds Launch Igniter Studio by adding a single flag to your development command: ```bash npx @igniter-js/cli dev --docs ``` That's it! Navigate to `/docs` on your local server and you'll see your entire API ready to explore. Igniter Studio automatically detects your API structure from the generated OpenAPI specification. No manual setup, no configuration files—it just works. ## See It in Action Watch how seamlessly Igniter Studio integrates into your development workflow: