Installation
Get started with Bunbox in minutes
Prerequisites
Before you begin, make sure you have Bun installed:
curl -fsSL https://bun.sh/install | bashCreate a New Project
Create a new project with bun create:
bun create bunbox my-app
cd my-app
bun installThis will create a new Bunbox project with all the necessary dependencies.
Start Development Server
Start the development server:
bun devYour app will be available at http://localhost:3000.
Project Structure
A typical Bunbox project looks like this:
my-app/
āāā app/
ā āāā page.tsx # Home page (/)
ā āāā layout.tsx # Root layout
ā āāā index.css # Global styles
ā āāā about/
ā ā āāā page.tsx # About page (/about)
ā āāā api/
ā āāā users/
ā āāā route.ts # API route (/api/users)
āāā public/
ā āāā robots.txt # Static files
āāā bunbox.config.ts # Configuration
āāā package.json
āāā tsconfig.json
Configuration
Bunbox works with zero configuration, but you can customize it using bunbox.config.ts:
import { defineConfig } from "@ademattos/bunbox";
export default defineConfig({
port: 3000,
appDir: "./app",
publicDir: "./public",
});What's Next?
- Learn about routing and file-based navigation
- Create your first API route
- Explore Data Loading