elysiajs-ddd

Structure ElysiaJS backend APIs with Domain-Driven Design and Prisma persistence.

Updated Dec 22, 2025
One-click install
npx skills add https://github.com/0xkynz/codekit --skill elysiajs-ddd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elysiajs-ddd
Source: https://github.com/0xkynz/codekit/tree/main/templates/skills/elysiajs-ddd
Command: npx skills add https://github.com/0xkynz/codekit --skill elysiajs-ddd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing backend APIs at scale often becomes tangled between domain rules and technical concerns. This Skill presents a Domain-Driven Design approach with a clean, layered architecture using ElysiaJS, Prisma for persistence, and Better Auth for security to reduce drift and improve maintainability.

Core Features & Use Cases

  • DDD-aligned folder structure separating domain, application, and infrastructure layers.
  • Prisma ORM integration with a modular domain-driven approach for persistent storage.
  • Thin controllers that delegate to use cases, enabling testability and clear boundaries.

Quick Start

Set up the project and start experimenting with the DDD-based ElysiaJS backend.

Frequently Asked Questions about elysiajs-ddd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a scalable ElysiaJS backend with Domain-Driven Design?

Structure an ElysiaJS backend using Domain-Driven Design by separating it into pure domain, application, and infrastructure layers with Prisma for persistence and Better Auth for security to reduce code drift.

How does Prisma integrate with a DDD layered architecture?

Prisma integrates with a DDD layered architecture by acting as the infrastructure persistence layer, implementing repository interfaces defined by the pure domain layer to maintain clean separation of concerns.

Can I use thin controllers in ElysiaJS to delegate business logic to use cases?

Yes, you can use thin controllers in ElysiaJS that delegate directly to use cases, enabling clear boundaries and high testability by keeping orchestration logic in the application layer.

Does Domain-Driven Design work for ElysiaJS APIs with bounded contexts like user and order modules?

Domain-Driven Design works for ElysiaJS APIs by applying bounded contexts to modules like user, order, and payment, ensuring domain rules remain isolated and maintainable at scale.

What is the best way to handle authentication across bounded contexts in a Prisma backend?

The best way to handle authentication across bounded contexts is using Better Auth integrated with Prisma, providing a unified security infrastructure layer that spans all modular domain boundaries.

When do I need a pure domain layer in my ElysiaJS API?

You need a pure domain layer in your ElysiaJS API when your project requires scalable, maintainable code with clear boundaries, isolating domain rules from technical concerns like Prisma persistence and authentication.