
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@pulzar/core
Advanced tools
Next-generation Node.js framework for ultra-fast web applications with zero-reflection DI, GraphQL, WebSockets, events, and edge runtime support
Next-generation TypeScript framework for ultra-fast web applications
Built on Fastify with zero-reflection dependency injection, GraphQL, WebSockets, events, and edge runtime support
Documentation • Quick Start • Examples • API Reference • Discord
Pulzar Core is a production-ready TypeScript framework that combines the speed of Fastify with modern development patterns. Built for developers who need blazing-fast performance without sacrificing developer experience.
npm install @pulzar/core
# or
yarn add @pulzar/core
# or
pnpm add @pulzar/core
import { Pulzar, Controller, Get, Injectable } from "@pulzar/core";
@Injectable()
class UserService {
getUsers() {
return [
{ id: 1, name: "Alice" },
{ id: 2, name: "Bob" },
];
}
}
@Controller("/api/users")
class UserController {
constructor(private userService: UserService) {}
@Get("/")
async getUsers() {
return this.userService.getUsers();
}
}
const app = new Pulzar({
controllers: [UserController],
providers: [UserService],
});
app.listen(3000, () => {
console.log("🚀 Server running at http://localhost:3000");
});
import { JWTGuard, RequireAuth, RequireRoles } from "@pulzar/core";
@Controller("/api/admin")
class AdminController {
@Get("/users")
@RequireAuth()
@RequireRoles("admin")
async getUsers() {
return await this.userService.getUsers();
}
}
const app = new Pulzar({
auth: {
jwt: {
secret: process.env.JWT_SECRET,
algorithm: "HS256",
},
},
});
Pulzar uses zero-reflection DI for maximum performance:
import { Injectable, Inject, Singleton, RequestScoped } from "@pulzar/core";
@Injectable({ scope: "singleton" })
class DatabaseService {
query(sql: string) {
return { result: "data" };
}
}
@Injectable({ scope: "request" })
class UserService {
constructor(
@Inject("DatabaseService") private db: DatabaseService,
@Inject("LOGGER") private logger: Logger
) {}
async getUser(id: string) {
this.logger.info(`Getting user ${id}`);
return this.db.query(`SELECT * FROM users WHERE id = ?`);
}
}
Comprehensive auth system with multiple strategies:
import { JWTGuard, SessionGuard, OAuth2Guard } from "@pulzar/core";
// JWT Authentication
const jwtGuard = new JWTGuard({
secret: process.env.JWT_SECRET,
algorithm: "HS256",
issuer: "your-app",
});
// Session-based Authentication
const sessionGuard = new SessionGuard({
store: new RedisSessionStore(),
secret: process.env.SESSION_SECRET,
maxAge: 24 * 60 * 60 * 1000, // 24 hours
});
// OAuth2 Integration
@Controller("/auth")
class AuthController {
@Post("/login")
async login(@Body() credentials: LoginDto) {
const user = await this.authService.validateUser(credentials);
return this.jwtGuard.signToken(user);
}
@Get("/profile")
@RequireAuth()
async getProfile(@CurrentUser() user: User) {
return user;
}
}
Powerful event streaming with multiple adapters:
import { EventBus, Event, EventHandler } from "@pulzar/core";
@Event("user.created")
class UserCreatedEvent {
constructor(
public readonly userId: string,
public readonly email: string
) {}
}
@EventHandler(UserCreatedEvent)
class SendWelcomeEmailHandler {
async handle(event: UserCreatedEvent) {
await this.emailService.sendWelcomeEmail(event.email);
}
}
// Emit events
await this.eventBus.emit(new UserCreatedEvent("123", "user@example.com"));
// Configure adapters
const app = new Pulzar({
events: {
adapter: "kafka", // or 'nats', 'redis', 'memory'
kafka: {
brokers: ["localhost:9092"],
clientId: "pulzar-app",
},
},
});
Built-in GraphQL support with automatic schema generation:
import { Resolver, Query, Mutation, Args } from "@pulzar/core";
@Resolver()
class UserResolver {
constructor(private userService: UserService) {}
@Query(() => [User])
async users() {
return this.userService.findAll();
}
@Mutation(() => User)
async createUser(@Args("input") input: CreateUserInput) {
return this.userService.create(input);
}
}
const app = new Pulzar({
graphql: {
path: "/graphql",
playground: true,
introspection: true,
},
});
Real-time communication with WebSocket support:
import { WebSocketGateway, Subscribe, Emit } from "@pulzar/core";
@WebSocketGateway("/ws")
class ChatGateway {
@Subscribe("message")
handleMessage(client: WebSocket, data: any) {
// Broadcast to all clients
this.broadcast("message", data);
}
@Emit("user-joined")
onUserJoin(userId: string) {
return { userId, timestamp: new Date() };
}
}
Deploy to edge environments:
import { EdgeAdapter } from "@pulzar/core/edge";
// Cloudflare Workers
export default EdgeAdapter.cloudflare(app);
// Vercel Edge Functions
export default EdgeAdapter.vercel(app);
// Deno Deploy
export default EdgeAdapter.deno(app);
import { Config } from "@pulzar/core";
@Config()
class AppConfig {
@Env("PORT", { default: 3000 })
port: number;
@Env("DATABASE_URL", { required: true })
databaseUrl: string;
@Env("JWT_SECRET", { required: true })
jwtSecret: string;
@Env("REDIS_URL", { default: "redis://localhost:6379" })
redisUrl: string;
}
import { Pulzar } from "@pulzar/core";
const app = new Pulzar({
// Core configuration
port: 3000,
host: "0.0.0.0",
// Database
database: {
url: process.env.DATABASE_URL,
type: "postgresql",
},
// Authentication
auth: {
jwt: {
secret: process.env.JWT_SECRET,
expiresIn: "1d",
},
session: {
store: "redis",
secret: process.env.SESSION_SECRET,
},
},
// Events
events: {
adapter: "kafka",
kafka: {
brokers: ["localhost:9092"],
},
},
// GraphQL
graphql: {
path: "/graphql",
playground: process.env.NODE_ENV === "development",
},
// WebSockets
websockets: {
path: "/ws",
cors: true,
},
// OpenAPI
openapi: {
title: "My API",
version: "1.0.0",
path: "/docs",
},
// Observability
tracing: {
enabled: true,
serviceName: "my-app",
},
});
// Main framework
export * from "@pulzar/core";
// Edge runtime adapters
export * from "@pulzar/core/edge";
// Testing utilities
export * from "@pulzar/core/testing";
Comprehensive testing utilities included:
import { createTestApp, MockService } from "@pulzar/core/testing";
describe("UserController", () => {
let app: TestApp;
let userService: MockService<UserService>;
beforeEach(async () => {
app = await createTestApp({
controllers: [UserController],
providers: [
{
provide: UserService,
useClass: MockService,
},
],
});
userService = app.get(UserService);
});
it("should get users", async () => {
userService.getUsers.mockResolvedValue([{ id: 1, name: "Alice" }]);
const response = await app.inject({
method: "GET",
url: "/api/users",
});
expect(response.statusCode).toBe(200);
expect(response.json()).toEqual([{ id: 1, name: "Alice" }]);
});
});
Pulzar Core is built for speed:
# Basic HTTP
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├───────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼──────────┤
│ Req/Sec │ 28,191│ 30,207│ 30,975│ 31,135│ 29,967 │ 1,012.46│ 31,135 │
│ Latency │ 2ms │ 3ms │ 5ms │ 6ms │ 3.32ms │ 1.12ms │ 25ms │
Pulzar Core works great with:
We welcome contributions! Please see our Contributing Guide.
git clone https://github.com/pulzar-framework/pulzar.git
cd pulzar
npm install
npm run build
npm test
MIT © Pulzar Team
Built with ❤️ by the Pulzar team and powered by:
⭐ Star us on GitHub • 💬 Join Discord • 🐦 Follow on Twitter
Made with ❤️ for the developer community
FAQs
Next-generation Node.js framework for ultra-fast web applications with zero-reflection DI, GraphQL, WebSockets, events, and edge runtime support
The npm package @pulzar/core receives a total of 13 weekly downloads. As such, @pulzar/core popularity was classified as not popular.
We found that @pulzar/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.