
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A lightweight React framework built with Bun, featuring file-based routing, SSR streaming, and ISR.
This framework is written in Bun and requires Bun to run.
pages/ directory structurepages/api/bunx bunact create my-app
cd my-app
bun dev
bun run build
my-app/
├── pages/
│ ├── page.tsx # Main page
│ ├── layout.tsx # Layout component
│ ├── not-found.tsx # 404 page
│ ├── loading.tsx # Loading UI
│ ├── error.tsx # Error boundary
│ └── api/
│ └── hello.ts # API endpoint
├── public/ # Static files
└── proxy.ts # Global middleware (optional)
// pages/page.tsx
export const Page = async ({ params, searchParams, cookies, headers }) => {
const data = await fetch('...')
return {
metadata: {
title: 'My Page',
description: '...',
},
default: () => <div>{/* ... */}</div>,
}
}
pages/
├── [id]/page.tsx # Matches /123
├── [...slug]/page.tsx # Matches /a/b/c
└── [[...slug]]/page.tsx # Matches / or /a/b/c
import { Image } from 'bunact/ui/Image'
<Image
src="/photo.jpg"
width={800}
height={600}
alt="Photo"
quality={80}
/>
// Fill mode
<div style={{ position: 'relative', width: '100%', height: '400px' }}>
<Image
src="/banner.jpg"
fill
objectFit="cover"
alt="Banner"
/>
</div>
// pages/blog/[id]/page.tsx
export const revalidate = 60 // Revalidate every 60 seconds
export const BlogPost = async ({ params }) => {
const post = await fetchPost(params.id)
return {
default: () => <article>{/* ... */}</article>,
}
}
// pages/api/users/[id].ts
export const GET = async (request: Request, { params }) => {
const user = await db.user.findById(params.id)
return Response.json(user)
}
export const POST = async (request: Request) => {
const body = await request.json()
const user = await db.user.create(body)
return Response.json(user, { status: 201 })
}
# .env
SECRET_KEY=server-only-value # Server-only
BUNACT_PUBLIC_API_URL=https://api.com # Available on client
// Server component
const secret = process.env.SECRET_KEY // Server-only
const apiUrl = process.env.BUNACT_PUBLIC_API_URL // Server + Client
Create a bunact.config.ts (or .js, .mjs) file in your project root to customize framework behavior:
// bunact.config.ts
import type { BunactConfig } from 'bunact'
export default {
port: 4000,
constants: {
server: {
defaultPort: 4000,
},
cache: {
maxIsrCacheSize: 2000,
maxImageCacheSizeMB: 1000,
},
},
plugins: [
{
name: 'my-plugin',
setup: async (config) => {
console.log('Plugin initialized!')
},
},
],
} satisfies BunactConfig
Available configuration options:
port - Development server port (default: 3000)pagesDir - Pages directory path (default: pages)publicDir - Public assets directory (default: public)cacheDir - Cache directory (default: .bunact/cache)constants - Override framework constantsplugins - Add custom pluginsMIT
FAQs
A lightweight React framework with SSR and SSG support
We found that bunact 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.