Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

burger-api

isfhan183MIT0.2.3TypeScript support: included

BurgerAPI logo

burger-api, burger-api-framework, bun, bunjs, bun-framework, fast-backend, javascript-backend, high-performance, esm, typescript, openapi, swagger-ui, declarative-routing, api-framework, modern-backend, backend-framework, server, bun-native, js-backend, fast-api, scalable-backend, backend-development, modern-api, api-development, backend-engine, efficient, minimalist-backend, bun-powered, open-source, typescript-backend, performance, rapid-development, web-framework, api-server, dynamic-routing, backend-routing, extensible, modular, declarative-api, lightweight, contemporary-backend, fast-javascript, bun-js-framework, bun-backend, bun-api-framework, pakistan-backend, pakistan-api-framework, pakistan-api-server, pakistan-backend-framework, pakistan-bunjs-framework, pakistan-javascript-framework

readme

BurgerAPI logo

Under Development License Bun Version

burger-api is a modern, open source API framework built on Bun.js. It combines the simplicity of file-based routing with powerful features like built-in middleware, Zod-based schema validation, and automatic OpenAPI generation. Designed for high performance and ease-of-use, burger-api leverages Bun's native modules to deliver blazing-fast API responses while keeping your codebase clean and maintainable.

This project is under active development and should not be used in production yet.

📚 Table of Contents

📖 Documentation

For detailed documentation and examples, visit the BurgerAPI official docs.

🚀 Overview

burger-api is built to offer a robust developer experience through:

  • Bun-Native Performance:
    Leverages Bun's high-performance HTTP server.

  • 📁 File-Based Routing:
    Automatically registers API routes from your file structure using a clear naming convention.

  • 🔄 Middleware Architecture:
    Supports both global and route-specific middleware.

  • Type-Safe Validation:
    Utilizes Zod for request validation, ensuring full type safety and automatic error reporting.

  • 📚 Automatic OpenAPI Generation:
    Generates a complete OpenAPI 3.0 specification (with support for tags, summaries, descriptions, operationId, deprecated status, externalDocs, and more) directly from your routes and Zod schemas.

  • 🔍 Swagger UI Integration:
    Provides an out-of-the-box Swagger UI endpoint for interactive API documentation.

📣 Changelog

Latest Version: 0.2.0 (April 26, 2025)

  • Performance & Core Improvements:
    • Optimized framework core and improved middleware handling
    • Enhanced OpenAPI documentation and route tracking
    • Updated ID preprocessing logic in schema validation
    • Improved type definitions across the framework

For a complete list of changes, please check the Changelog file.

🎯 What's Coming Next?

We're actively enhancing burger-api with powerful new features Stay tuned for updates as we continue to build and improve burger-api! We're committed to making it the best API framework for Bun.js.

🤝 Contributing

We welcome contributions from the community! If you have suggestions or improvements, please open an issue or submit a pull request. Let's build something amazing together.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

The MIT License is a permissive license that is short and to the point. It lets people do anything they want with your code as long as they provide attribution back to you and don't hold you liable.

changelog

📣 Release Notes

Version 0.2.0 (April 26, 2025)

  • Performance & Core Improvements:
    • Optimized framework core and improved middleware handling
    • Enhanced OpenAPI documentation and route tracking
    • Updated ID preprocessing logic in schema validation
    • Improved type definitions across the framework

Version 0.1.5 (April 2, 2025)

  • 🔧 Dependencies & Build:

    • Updated dependencies to latest versions
    • Enhanced build process with tsc-alias
    • Improved TypeScript configuration
  • 📦 Package Updates:

    • Updated zod to version ^3.24.2
    • Updated zod-to-json-schema to version ^3.24.5
    • Updated TypeScript peer dependency to ^5.7.3
  • Performance & Core Improvements:

    • Enhanced request handling and middleware execution in Burger class
    • Implemented trie structure for optimized route management
    • Improved route collection and validation in ApiRouter
    • Enhanced OpenAPI integration with better route handling

Version 0.1.4 (March 23, 2025)

  • 🎨 Code Quality & Standards:

    • Added Prettier configuration for consistent code style
    • Enhanced code formatting and structure across the codebase
    • Improved type definitions and safety
    • Enhanced error handling and response formatting
  • 🔄 Refactoring and Improvements:

    • Enhanced page routing and server response handling
    • Improved import paths configuration
    • Updated request/response handling
    • Enhanced server initialization process

Version 0.1.1 (March 15, 2025)

  • 🔧 Middleware Improvements:
    • Updated middleware to use BurgerNext type for next function
    • Enhanced type safety in middleware chain

Version 0.1.0 (March 10, 2025)

  • 🎨 Static Page Serving:
    • Basic support for serving static .html files
    • File-based routing for pages
    • Support for route grouping with (group) syntax
    • Support for dynamic route with [slug] syntax

Version 0.0.39 (February 25, 2025)

  • 🚀 Initial release with core API features
  • ⚡ Bun-native HTTP server implementation
  • 📁 File-based API routing
  • ✅ Zod schema validation
  • 📚 OpenAPI/Swagger integration
  • 🔄 Middleware system