Skip to content

elevenyellow/OneJs_Boilerplate

Repository files navigation

OneJs Boilerplate

A modern, type-safe, and feature-rich framework for enterprise-grade web applications.

Bun Elysia.js Prisma TypeScript License


OneJs is a high-performance boilerplate built on top of Elysia.js and Bun, implementing Hexagonal Architecture and Domain-Driven Design (DDD). It provides a robust foundation for building scalable, maintainable, and type-safe backend services.

✨ Key Features

  • 🚀 Extreme Performance - Leverages Bun's runtime and Elysia's optimized router.
  • 🏗️ Architectural Excellence - Strict Hexagonal Architecture and DDD principles.
  • 💉 Powerful DI - Built-in Dependency Injection container with decorator support.
  • 📡 Event-Driven - Seamless communication using a built-in Event Bus.
  • 👷 Background Processing - Managed background tasks with BullMQ & Redis.
  • 🛡️ Built-in Security - JWT and Clerk authentication strategies out of the box.
  • 🗄️ Schema Harmony - Automated Prisma schema merging for multi-module projects.

🛠️ Tech Stack

Category Technology
Runtime Bun
Web Framework Elysia.js
Database/ORM PostgreSQL & Prisma
Task Queue BullMQ & Redis
Code Quality Biome
Environment Docker / Podman

🏗️ Architecture at a Glance

OneJs enforces a clear separation of concerns, ensuring your domain logic remains pure and decoupled from infrastructure details.

graph TD
    subgraph Infrastructure [Infrastructure Layer]
        Controllers[Controllers / API]
        Persistence[Prisma / Repositories]
        External[External Adapters]
    end

    subgraph Application [Application Layer]
        UseCases[Use Cases]
        Services[Application Services]
    end

    subgraph Domain [Domain Layer]
        Entities[Entities]
        ValueObjects[Value Objects]
        Events[Domain Events]
    end

    Infrastructure --> Application
    Application --> Domain
    Infrastructure --> Domain
Loading

🚀 Quick Start

  1. Clone & Install

    git clone <repository-url>
    cd OneJs_Boilerplate
    bun install
  2. Launch Dev Environment

    bun run start:api:dev

    This starts the DB, merges schemas, runs migrations, and launches the API server.

📖 Documentation

Explore our comprehensive guides to master OneJs:

🤝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  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 checkout -b feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

5 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors