Skip to content

felipebarcelospro/igniter-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ Igniter.js

The End-to-End Typesafe Full-stack TypeScript Framework

Built for Humans and Code Agents

npm version TypeScript License: MIT Documentation


✨ What is Igniter.js?

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.

πŸš€ Quick Start

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

🎯 Key Features

  • πŸ”’ End-to-End Type Safety - Define once, use everywhere with full TypeScript inference
  • ⚑ Zero Code Generation - No build steps, no schemas to sync
  • πŸ”Œ Framework Agnostic - Works with Next.js, Express, Bun, and more
  • πŸŽ›οΈ Built-in Features - Queues, Real-time, Caching, and Telemetry
  • πŸ€– Code Agent Optimized - Optimized for code agents and AI assistance
  • πŸ“¦ Plugin System - Extensible and modular architecture

πŸ“– Documentation & Resources

πŸ› οΈ Development

# Interactive development dashboard
npx @igniter-js/cli@latest dev

# Build your project
npm run build

# Run tests
npm test

🌟 Example

// 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>
  );
}

🀝 Community & Support

  • πŸ› Issues - Report bugs and request features
  • πŸ’¬ Discussions - Ask questions and share ideas
  • 🀝 Contributing - Help make Igniter.js better

πŸ“„ License

MIT License - see the LICENSE file for details.


Made with ❀️ by the Igniter.js team

igniterjs.com β€’ GitHub β€’ npm

About

Igniter is a modern, type-safe HTTP framework designed to streamline the development of scalable TypeScript applications.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages