Skip to content

ambrizals/bun-elysia-template

Repository files navigation

🚀 Bun + Elysia.js Template

A modern, type-safe API template built with Bun and Elysia.js, featuring:

  • Blazing Fast - Powered by Bun's JavaScript runtime and Elysia's performance
  • 🛠 Type Safety - Built with TypeScript and TypeBox for end-to-end type safety
  • 📚 OpenAPI - Automatic API documentation with Swagger UI
  • 🗄 Database - Database integration with Drizzle ORM
  • 🔄 Hot Reload - Development server with hot module replacement

🏁 Getting Started

Prerequisites

  • Bun (v1.0.0 or later)
  • Node.js (v18 or later, though Bun includes its own runtime)

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/bun-elysia-template.git
    cd bun-elysia-template
  2. Install dependencies:

    bun install
  3. Set up environment variables:

    cp .env.template .env
    # Edit .env with your configuration

🚀 Development

Available Scripts

  • bun run dev - Start the development server with hot reload
  • bun run build - Build the application for production
  • bun run start - Start the production server

Project Structure

.
├── src/
│   ├── common/         # Common code
│   ├── config/         # Configuration files
│   ├── controllers/    # Request handlers
│   ├── infra/          # Infrastructure code (database, cache, etc.)
│   ├── modules/        # Feature modules
│   └── routes/         # API route definitions
├── drizzle/            # Database migrations and schema
├── .env.template       # Environment variables template
└── package.json        # Project dependencies and scripts

📚 API Documentation

When the development server is running, you can access:

🛠 Technologies Used

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🙏 Acknowledgments

  • Elysia.js for the amazing framework
  • Bun for the fast JavaScript runtime
  • All contributors who have helped shape this project especially for darwin.

About

My preferences template for elysia library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages