New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

swiftjs-core

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swiftjs-core

SwiftJS - A fast, modern, and type-safe web framework for Node.js

latest
Source
npmnpm
Version
0.8.2
Version published
Maintainers
1
Created
Source

swiftjs-core

A fast, modern, and type-safe web framework for Node.js and Bun.

npm version

Features

  • 🚀 Blazing Fast - High-performance radix tree router with 53k+ req/sec.
  • 📁 File-based Routing - Next.js-style automatic route discovery.
  • 🔒 Type-safe - End-to-end type safety with Zod validation.
  • 🔌 Plugin System - Fastify-inspired extensible architecture.
  • 📊 Observability - Built-in Prometheus metrics, tracing, and health checks.
  • 🕒 Jobs & Scheduling - Native task scheduler for Cron and background jobs.
  • 🛡️ Security - CSRF protection, SQLi detection, and security headers.
  • 📡 Real-time - Seamless WebSockets and Server-Sent Events (SSE).
  • 🌐 Multi-runtime - Run anywhere: Node.js, Bun, or Edge.

Installation

npm install swiftjs-core zod

Quick Start

import { createApp } from 'swiftjs-core';

const app = createApp({ port: 3000 });

// Simple route
app.get('/', () => ({ message: 'Hello SwiftJS!' }));

// Route with params
app.get('/users/:id', (ctx) => ({
  userId: ctx.params.id
}));

// Route with validation
import { z } from 'swiftjs-core';
app.post('/login', (ctx) => {
  return { success: true };
}, {
  body: z.object({
    username: z.string(),
    password: z.string()
  })
});

app.listen();

File-based Routing

SwiftJS automatically maps files in your routes directory to URLs.

src/routes/
├── index.get.ts      → GET /
├── users.post.ts     → POST /users
└── users/[id].get.ts   → GET /users/:id

Advanced Features

Observability

import { observabilityPlugin } from 'swiftjs-core';
app.register(observabilityPlugin());

Background Jobs

import { jobsPlugin } from 'swiftjs-core';
app.register(jobsPlugin());
app.scheduler.addJob({
  name: 'cleanup',
  schedule: { cron: '0 0 * * *' },
  handler: async () => { /* ... */ }
});

Documentation

For full documentation, visit the docs directory or the official website.

License

MIT

Keywords

swiftjs

FAQs

Package last updated on 02 Mar 2026

Did you know?

Socket

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.

Install

Related posts