The End-to-End Typesafe Full-stack TypeScript Framework
Built for Humans and Code Agents
[](https://www.npmjs.com/package/@igniter-js/core) [](https://www.typescriptlang.org/) [](https://opensource.org/licenses/MIT) [](https://igniterjs.com)Igniter.js is a modern, full-stack TypeScript framework that eliminates the friction between your backend and frontend. Define your API once, get fully-typed clients everywhereβno code generation, no manual synchronization, just pure end-to-end type safety.
Perfect for building scalable APIs, real-time applications, and modern web services.
Get up and running in seconds:
# Create a new project
npx @igniter-js/cli@latest init my-app
# Or add to existing project
npm install @igniter-js/core zod
# Interactive development dashboard
npx @igniter-js/cli@latest dev
# Build your project
npm run build
# Run tests
npm test
// Define your API
// features/users/controllers/users.controller.ts
export const userController = igniter.controller({
path: '/users',
actions: {
getUser: igniter.query({
path: '/:id' as const,
handler: async ({ request, response, context, query }) => {
const user = await context.db.user.findUnique({
where: { id: input.id }
});
if (!user) {
throw new Error('User not found');
}
return user;
},
}),
createUser: igniter.muate({
path: '/' as const,
body: z.object({
name: z.string(),
email: z.string().email()
})
handler: async ({ request, response, context, query }) => {
return await context.db.user.create({
data: input
});
},
}),
}
})
// Use in your React app with full type safety
import { api } from './igniter.client';
function UserProfile({ userId }: { userId: string }) {
const currentUser = api.user.getUser.useQuery({
enabled: !!userId,
staleTime: 5000,
refetchOnWindowFocus: false,
params: {
id: userId
},
onSuccess: (data) => {
console.log('Successfully fetched current user:', data);
},
onError: (error) => {
console.error('Error fetching current user:', error);
},
});
if (currentUser.isLoading) return <div>Loading user...</div>;
if (currentUser.isError) return <div>Error to load user: {postsQuery.error.message}</div>;
return (
<div>
<h1>{currentUser?.name}</h1>
<p>{currentUser?.email}</p>
</div>
);
}
MIT License - see the LICENSE file for details.
Made with β€οΈ by the Igniter.js team
igniterjs.com β’ GitHub β’ npm