npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bunigniter

v0.6.6

Published

CodeIgniter 3-style Full Stack MVC Framework for Bun

Readme

🔥 BunIgniter

CodeIgniter 3-Style Full Stack MVC Framework for Bun

A full-stack MVC web framework built on Bun + Bun.serve + Bun SQL + a custom template engine. It combines the familiar MVC patterns of CodeIgniter 3 with AdonisJS Ace-style CLI scaffolding.


🛠 Tech Stack

| Component | Technology | Version | |-----------|-----------|---------| | Runtime | Bun | Latest | | HTTP Server | Bun.serve | Built-in (SIMD accelerated routing) | | Database | Bun SQL | Built-in (SQLite/PostgreSQL/MySQL) | | Template Engine | Custom built-in | Zero external dependencies (PHP/CI3 friendly) | | Testing | bun:test | Built-in |

✨ Features

| Feature | Description | |---------|-------------| | MVC Architecture | Controller / Model / View separation | | CLI Scaffolding | make:scaffold auto-generates full CRUD | | Session Drivers | Interchangeable Memory / File / Redis (SessionDriver interface) | | CSRF Protection | Bun.CSRF built-in + Double Submit Cookie (JS-readable) | | Authentication | bcrypt-based Auth + authGuard / guestGuard | | Validation | 20+ rules, CI3-style pipe syntax | | File Uploads | MIME/extension/size validation, UUID/hash naming | | Email | SMTP / sendmail (Bun.spawn/Bun.$) / log driver + template rendering | | Cache | Memory / File / Redis drivers, remember() callback | | WebSocket | Pub/Sub channels, Bun.serve websocket integration | | CORS Middleware | Origin/method/header customization | | Rate Limiting | Sliding window, IP-based, X-RateLimit-* headers | | Route Model Binding | Automatic DB lookup from params + 404 | | OpenAPI / Swagger | Auto-generate OpenAPI 3.0 spec from Router | | Pagination | HTML navigation / API metadata | | Logging | File + console, level filtering, log rotation | | Integration Testing | IntegrationTestClient (automated HTTP requests) | | Queue / Job System | Memory / Redis drivers, delayed execution, retries, failure handling | | Scheduled Jobs | Bun.cron() in-process + OS-level cron | | Queue Dashboard | HTML monitoring + JSON API | | Redis Pub/Sub | BroadcastQueue, multi-server job distribution | | Template Engine | Custom built-in — {{ }}, , , include(), slot system | | Query Builder | Active Record pattern, auto dialect switching for SQLite/PostgreSQL/MySQL | | Biome | Lint + format (bun run check) | | Archive | Bun.Archive built-in (tar/gzip) | | Shell | Bun.spawn / Bun.$ built-in | | Audit Log | Model event tracking + logging integration | | Worker Pool | Bun.Worker parallel job processing | | Distributed Lock | Redis Lua script atomic locking | | Audit Log UI | HTML dashboard + SSE real-time | | SSE | Server-Sent Events manager, channels, history | | CLI REPL | AdonisJS Ace-style interactive shell | | Image Editing | Bun.Image-based resize/rotate/convert | | Cryptography | Bun.CryptoHasher + Bun.hash + Bun.password |

🚀 Quick Start

git clone <repo-url> bunigniter && cd bunigniter
bun install
bun run dev        # http://localhost:3000

📁 Project Structure

bunigniter/
├── system/core/          # Framework core (do not modify)
├── system/helpers/       # Global helper functions
├── app/config/           # Configuration (app, database, routes, email, cache, queue, scheduler)
├── app/controllers/      # Controllers
├── app/models/           # Models
├── app/views/            # Templates (.html)
├── app/views/layout/     # Layout templates
├── app/views/partials/   # Partial templates (for include)
├── app/middleware/        # Middleware
├── app/helpers/          # Custom helpers
├── app/libraries/        # Custom libraries
├── cli/commands/         # CLI commands
├── database/migrations/  # Migrations
├── database/seeds/       # Seeds
├── storage/              # logs, sessions, cache
├── public/               # Static files (css, js, uploads)
├── tests/                # Test files
└── docs/user-guide/      # Feature-specific guides

⌨️ CLI Summary

bun run bi make:scaffold post --fields=title:string,content:text  # Full CRUD scaffold
bun run bi make:scaffold post --api --fields=title:string         # API-only scaffold
bun run bi migrate                                               # Run migrations
bun run bi migrate:rollback --steps=3                            # Rollback migrations
bun run bi db:seed                                               # Run seeders
bun run bi list:routes                                           # List registered routes

🧪 Tests

bun test   # 620 pass, 0 fail

🔍 Lint & Format (Biome)

bun run check       # Lint + format check
bun run check:fix   # Auto-fix
bun run lint        # Lint only
bun run format      # Format only

🔄 CI3 ↔ BunIgniter

| CI3 | BunIgniter | |-----|-----------| | CI_Controller | Controller | | CI_Model | Model<T> | | $this->load->view() | this.view() | | $this->db->insert() | model.create() | | $this->db->insert() + insert_id() | qb.insertReturning() | | $this->form_validation | validate() | | $this->ion_auth->login() | Auth.attempt() | | $this->upload->do_upload() | Upload.save() | | $this->input->cookie() | getCookie() | | $this->input->set_cookie() | setCookie() | | $this->load->view('partials/header') | <? include('partials/header') ?> | | $layout['title'] = '...' | <!-- slot:title -->...<!-- endslot --> | | <?php echo $title; ?> | {{ title }} | | <?php echo htmlspecialchars($x); ?> | {{ x }} (auto) or <?= escapeHtml(x) ?> | | CI Zip | Archive (Bun.Archive) | | PHP exec() | Shell (Bun.spawn) |

📖 Detailed Guides

| Guide | Description | |-------|-------------| | Getting Started | Installation, environment variables, project structure | | CLI Commands | Scaffolding, migrations, seeding | | Routing | Route definitions, resources, groups, model binding | | Controllers | Controller class, Context, responses | | Models | CRUD, pagination, transactions | | Views & Templates | Template syntax, layouts, slots, include | | Database | Configuration, migrations, seeding | | Middleware | Pipeline, built-in middleware | | Authentication | Auth, authGuard, password hashing | | Validation | 20+ rules, custom messages | | CSRF Protection | Double Submit Cookie | | Session | Memory / File / Redis drivers | | File Upload | Single/multi upload, validation | | Pagination | HTML / API | | Email | SMTP / sendmail / log | | Cache | Memory / File / Redis, remember() | | Queue / Job System | Background jobs, delayed execution, retries | | Scheduled Jobs | Bun.cron(), in-process + OS-level | | Queue Dashboard | HTML monitoring + JSON API | | Redis Pub/Sub | Multi-server job distribution | | Cookies | Bun.Cookie / CookieMap | | Archive | Bun.Archive (tar/gzip) | | Shell | Bun.spawn / Bun.$ | | Audit Log | Model event tracking | | Worker Pool | Bun.Worker parallel processing | | Distributed Lock | Redis atomic locking | | SSE | Server-Sent Events real-time | | Image Editing | Bun.Image resize/convert | | Cryptography | Hash/HMAC/password/UUID | | REPL | Interactive shell | | WebSocket | Pub/Sub, Bun.serve integration | | CORS | Origins, preflight | | Rate Limiting | Sliding window, IP-based | | Route Model Binding | Automatic DB lookup | | OpenAPI / Swagger | Auto-generated spec, Swagger UI | | Logging | File + console, rotation | | Testing | Unit / integration tests | | Helper Functions | URL, string, date, currency |

📜 License

MIT